I have a node that I run under Docker that won’t start due to the following error:
-25T13:55:27Z ERROR failure during run {"Process": "storagenode", "error": "Failed to create storage node peer: hashstore: read config/storage/hashstore/121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6/s1/meta/hashtbl-000000000000000b: input/output error\n\tstorj.io/storj/storagenode/hashstore.(*roBigPageCache).ReadRecord:622\n\tstorj.io/storj/storagenode/hashstore.(*HashTbl).Range:293\n\tstorj.io/storj/storagenode/hashstore.OpenHashTbl:175\n\tstorj.io/storj/storagenode/hashstore.OpenTable:117\n\tstorj.io/storj/storagenode/hashstore.NewStore:276\n\tstorj.io/storj/storagenode/hashstore.New:100\n\tstorj.io/storj/storagenode/piecestore.(*HashStoreBackend).getDB:252\n\tstorj.io/storj/storagenode/piecestore.NewHashStoreBackend:117\n\tstorj.io/storj/storagenode.New:604\n\tmain.cmdRun:84\n\tmain.newRunCmd.func1:33\n\tstorj.io/common/process.InitBeforeExecute.func1.2:389\n\tstorj.io/common/process.InitBeforeExecute.func1:407\n\tgithub.com/spf13/cobra.(*Command).execute:985\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:1117\n\tgithub.com/spf13/cobra.(*Command).Execute:1041\n\tstorj.io/common/process.ExecWithCustomOptions:115\n\tmain.main:34\n\truntime.main:283", "errorVerbose": "Failed to create storage node peer: hashstore: read config/storage/hashstore/121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6/s1/meta/hashtbl-000000000000000b: input/output error\n\tstorj.io/storj/storagenode/hashstore.(*roBigPageCache).ReadRecord:622\n\tstorj.io/storj/storagenode/hashstore.(*HashTbl).Range:293\n\tstorj.io/storj/storagenode/hashstore.OpenHashTbl:175\n\tstorj.io/storj/storagenode/hashstore.OpenTable:117\n\tstorj.io/storj/storagenode/hashstore.NewStore:276\n\tstorj.io/storj/storagenode/hashstore.New:100\n\tstorj.io/storj/storagenode/piecestore.(*HashStoreBackend).getDB:252\n\tstorj.io/storj/storagenode/piecestore.NewHashStoreBackend:117\n\tstorj.io/storj/storagenode.New:604\n\tmain.cmdRun:84\n\tmain.newRunCmd.func1:33\n\tstorj.io/common/process.InitBeforeExecute.func1.2:389\n\tstorj.io/common/process.InitBeforeExecute.func1:407\n\tgithub.com/spf13/cobra.(*Command).execute:985\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:1117\n\tgithub.com/spf13/cobra.(*Command).Execute:1041\n\tstorj.io/common/process.ExecWithCustomOptions:115\n\tmain.main:34\n\truntime.main:283\n\tmain.cmdRun:86\n\tmain.newRunCmd.func1:33\n\tstorj.io/common/process.InitBeforeExecute.func1.2:389\n\tstorj.io/common/process.InitBeforeExecute.func1:407\n\tgithub.com/spf13/cobra.(*Command).execute:985\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:1117\n\tgithub.com/spf13/cobra.(*Command).Execute:1041\n\tstorj.io/common/process.ExecWithCustomOptions:115\n\tmain.main:34\n\truntime.main:283"}
Error: Failed to create storage node peer: hashstore: read config/storage/hashstore/121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6/s1/meta/hashtbl-000000000000000b: input/output error
I have checked the permissions for that file and they seem to be correct, and everything should be able to run without any problems, but it seems that something has broken.
If I delete the file, it complains that it doesn’t exist, so I don’t know how to proceed to recover this node.
When recreating the Hashtable, you have to scan for 0 byte sized logs, and delete them, the start the script. If it fails at a certain point, take a look, at which file this happened, you can back it up and delete it from the corresponding folder, then start the script again. Hashtable seems to perform faster but I hope fixing hashtables over time wont be the status quo. I had it 1 or 2 times, the hashtable got corrupted, and had to fix it.
It may not rebuilt all hashtable, so it would start to fail audits for not scanned logs due to “file not found”. I would recommend to finish the rebuild.
Even if it’s not 0 bytes, you can delete it (you can still back it up), since it’s corrupted and wont benefit you in any case. This small data loss wont be an issue for the audit score. I deleted one or two non 0 byte files, and my audit score did not drop.