How to recover this btrfs error?
I have a btrfs file system that cannot be mounted anymore. I resetted the computer and after boot a Java process crashed, showing a core dump with much btrfs stuff on the stack. After that happened, the computer was basically unusable, as starting processes didn't work anymore.
So since the computer itself was unusable, I decided to "rescue" the file system with a Ubuntu 14.04 Desktop disc.
I tried btrfs rescure chunk-recover
, and it asked me if the chunk tree should be rebuild. I answered yes. Now, it seems like it is completely broken. The FS cannot be mounted anymore, and now the btrfs check
output looks like this:
root@ubuntu:/dev# btrfs check /dev/mapper/encrypted
checksum verify failed on 20971520 found B89CA074 wanted EDB30E17
checksum verify failed on 20971520 found B89CA074 wanted EDB30E17
checksum verify failed on 20971520 found B89CA074 wanted EDB30E17
checksum verify failed on 20971520 found B89CA074 wanted EDB30E17
Csum didn't match
Couldn't read chunk root
Couldn't open file system
Trying to mount gives this error:
[90746.734393] btrfs: device fsid ee55dbb6-e359-42cc-bf76-9973ed5cf4ff devid 1 transid 6036 /dev/dm-0
[90746.844751] btrfs: device fsid ee55dbb6-e359-42cc-bf76-9973ed5cf4ff devid 1 transid 6036 /dev/dm-0
[91441.004757] btrfs: device fsid ee55dbb6-e359-42cc-bf76-9973ed5cf4ff devid 1 transid 6036 /dev/mapper/encrypted
[91441.006465] btrfs: disk space caching is enabled
[91441.008592] btrfs: dm-0 checksum verify failed on 20971520 wanted EDB30E17 found B89CA074 level 0
[91441.009034] btrfs: dm-0 checksum verify failed on 20971520 wanted EDB30E17 found B89CA074 level 0
[91441.009065] btrfs: failed to read chunk root on dm-0
[91441.025106] btrfs: open_ctree failed
I tried btrfs check
with --repair
, --init-csum-tree
and --init-extent-tree
, but it changed nothing.
Your checksums are not matching. That's not good.
If you haven't fixed this yet, you can try upgrading your btrfs-tools and using btrfs check --fix-crc and it should resolve your checksum issues. You might want to take a btrfs-image of your metadata first.