kubo icon indicating copy to clipboard operation
kubo copied to clipboard

IPFS Files root not avialable fix in 'ipfs repo fsck'

Open Kubuxu opened this issue 8 years ago • 4 comments
trafficstars

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).

Kubuxu avatar May 20 '17 14:05 Kubuxu

Should we prompt or output a warning and suggest the user rerun with a flag?

kevina avatar May 22 '17 00:05 kevina

I think asking the user to pass a special flag would be good.

whyrusleeping avatar May 23 '17 16:05 whyrusleeping

#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.

kevina avatar Dec 01 '17 21:12 kevina

ipfs repo migrate followed by ipfs repo verify is the way to go. I suggest to close this thread

StEvUgnIn avatar May 22 '25 10:05 StEvUgnIn