kubo
kubo copied to clipboard
IPFS Files root not avialable fix in 'ipfs repo fsck'
Version information: 0.4.9
Type: Bug
Severity: High
Description:
I somehow managed to do this:
~ ipfs files rm -r / ✘
Error: error loading filesroot from DAG: merkledag: not found
~ ipfs files stat / ✘
Error: error loading filesroot from DAG: merkledag: not found
~ ipfs files rm / ✘
Error: error loading filesroot from DAG: merkledag: not found
and this
ipfs daemon
Initializing daemon...
Adjusting current ulimit to 2048...
Successfully raised file descriptor limit to 2048.
^C
Received interrupt signal, shutting down...
(Hit ctrl-c again to force-shutdown the daemon.)
16:24:37.894 ERROR cmd/ipfs: error from node construction: error loading filesroot from DAG: Failed to get block for QmP6wAYvriaFzQjWMb7CPJP6v8LvEuYRh32mEEn6b45WRK: context canceled daemon.go:337
Error: error loading filesroot from DAG: Failed to get block for QmP6wAYvriaFzQjWMb7CPJP6v8LvEuYRh32mEEn6b45WRK: context canceled
Having ipfs repo fsck check for this problem and fixing it under user confirmation (as it might lead to data loss as files root is best effort pinning would be nice).
Should we prompt or output a warning and suggest the user rerun with a flag?
I think asking the user to pass a special flag would be good.
#4446 will you allow you to remove the root. I did it a separate command as removing it (even if the hash no longer exists) could lead to data loss. The assumption is that someone who uses this command knows what they are doing.
ipfs repo migrate followed by ipfs repo verify is the way to go. I suggest to close this thread