If your node was abruptly terminated due to power failure, the database file could be irreversible corrupted, you can see an error Error starting master database on storagenode: database: file is not a database
in your logs.
Find out which database is corrupted
The Storage Node software might not mention which database is corrupted or errors displayed are not immediately understandable to the node operator. In this case we recommend to check all databases, as described in the article How to fix a "database disk image is malformed". Please note - the linked article will not help to recover database in state "file is not a database."
Once you discovered which database is irreversibly corrupted, you can continue with fixing.
Recreate corrupted database(s)
- Stop the storagenode
- Delete the corrupted database(s), include file(s) with
.db-shm
and.db-wal
extensions. - Move all remaining databases (*.db) to the backup folder (the database files are placed in the storage location by default unless you have changed that). Please note, no databases should remain in the current database location, otherwise they will not be recreated in the next steps. The node will recreate all databases only if there wouldn't be any.
- Start the storagenode
it will re-create all databases, but they will be empty. Wait until all migrations are applied. - Stop the storagenode
- Move backed up databases back with replace
- Start the storagenode
- Check your logs
Please note - since we recreated the database(s) from scratch, some statistics such as bandwidth or disk usage and payout information for shutdown satellites (like the now deprecated Stefan, Europe-North-1 and US2 satellites) could be lost, however it will not prevent the storage node from working.
Still have issues?
Ask on the forum!
Comments
0 comments
Please sign in to leave a comment.