Database Corruption again

Hi all,

My node updated it self last night and again it has cause an error on a database.

I’ve followed the commands to fix a malford db but the resulted file is only 300meg big, the original db is nearly 2.5gig.

Does this mean that the db is not fixable and the my node maybe lost. I’m really hoping it can be fix as i’ve been running this node nearly a year.

Any help anyone can provide i would be really greatful.

Thanks

Ian,

This is what i see in the logs

2020-07-01T15:22:08.664Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-01T15:22:08.719Z INFO Operator email {“Address”: " "}
2020-07-01T15:22:08.719Z INFO Operator wallet {“Address”: " "}
2020-07-01T15:22:09.943Z INFO Telemetry enabled
2020-07-01T15:22:09.976Z INFO db.migration.42 Drop used serials table
Error: Error creating tables for master database on storagenode: migrate: database disk image is malformed

storj.io/storj/storagenode/storagenodedb.(*DB).Migration.func10:1455
storj.io/storj/private/migrate.Func.Run:263
storj.io/storj/private/migrate.(*Migration).Run.func1:171
storj.io/storj/private/dbutil/txutil.withTxOnce:75
storj.io/storj/private/dbutil/txutil.WithTx:36
storj.io/storj/private/migrate.(*Migration).Run:170
storj.io/storj/storagenode/storagenodedb.(*DB).MigrateToLatest:293
main.cmdRun:180
storj.io/private/process.cleanup.func1.4:359
storj.io/private/process.cleanup.func1:377
github.com/spf13/cobra.(*Command).execute:840
github.com/spf13/cobra.(*Command).ExecuteC:945
github.com/spf13/cobra.(*Command).Execute:885
storj.io/private/process.ExecWithCustomConfig:88
storj.io/private/process.ExecCustomDebug:70
main.main:320
runtime.main:203

Which db file is this ?

Hi nerdarwork.

I believe it to be the used_serial.db that is the problem. that is the one i was referening to above

If you have followed the steps correctly for fixing malformed DB then you are fine to proceed with replacing corrupted DB with fixed DB file.

nerdatwork,

Thanks for the info.

I did what you said and it’s fixed. I really wasn’t sure about replacing the db until you said thats what i needed to do.

1 Like

Good luck :+1: @ianllew600 . Using @ before username sends a notification :slight_smile:

The same exact thing happened to me with the latest update. Mine is 1.8g and it’s taking forever to rebuild, I too have been running this for over a year, I really hope all the downtime doesn’t get me disqualified. I have 73gb of ram in my server but haven’t been able to figure out how to run a repair with the tmpfs command to make this go faster. Anyone have any advice in this regard?

You can take this as an example

the /data # and sqlite> are not part of the command :slight_smile: