-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rebuild miner database(metadata) after a corruption #4075
Comments
since 0.7.0: #3837 (comment) |
slack convo dump 1
used level db tool to repair however,
|
@jennijuju sorry I don't understand, does it mean I've got to start a new miner ? |
my db is corrupted |
Daemon: 0.8.0+git.2c1d96bc.dirty+api0.16.0 Here are the log : The only way to restart the miner was to remove "000253.log" as proposed by @Meatball |
We got into a similar situation with fatal error: |
Obviously, you can't delete a file and call it a day, but as an exercise, I deleted the corrupted file and the node got working again. But some hours later, other file got corrupted and the node became unusable again. Just leaving this comment if anyone else is thinking that deleting database files is a good idea. It might to temporarily make your Lotus node be up again, but just use that time to do things you need to nuke it and start from zero. |
I got myself a corrupted database because a 256GB RAM instance run OOM earlier this morning. I was eventually able to recover using a tweak suggested (renaming Lotus seems to be eating all RAM and swap even if I’m not pushing anything after we push a good amount of deals out there. |
It's complicated to do this from on-chain info. The simplest thing to do is probably:
|
Closed by #5755 |
Related #3840
Another miner reported that after using level db repair tool to recover from error
ERROR: starting node: could not build arguments for function "github.com/filecoin-project/lotus/node/modules/lp2p".StartListening.func1 (/home/mcloud/ceph/current/lotus-0.8.0/node/modules/lp2p/addrs.go:98): failed to build host.Host: could not build arguments for function "reflect".makeFuncStub (/usr/local/go/src/reflect/asm_amd64.s:12): failed to build lp2p.BaseIpfsRouting: could not build arguments for function "reflect".makeFuncStub (/usr/local/go/src/reflect/asm_amd64.s:12): failed to build dtypes.MetadataDS: received non-nil error from function "reflect".makeFuncStub (/usr/local/go/src/reflect/asm_amd64.s:12): opening datastore /metadata: leveldb/journal: block/chunk corrupted: missing chunk part (0 bytes) [file=15008041.log])
, he gotopening datastore /staging: file does not exist for table 18
.In this case, we think that he may be able to re-init a new miner with the actor id and owner key and be able to prove the existing sectors, however, this miner won't be able to add new sectors and get new deals because the indices can not be catch up.
Ideally, we should provide a way to rebuild the database with something like
lotus-mienr recover
The text was updated successfully, but these errors were encountered: