How to recover this btrfs error?
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.
Related videos on Youtube
Sibbo
Updated on September 18, 2022Comments
-
Sibbo over 1 year
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 thebtrfs 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.-
basic6 almost 9 yearsAsking the obvious: Hard drive defective? If you have a bad drive, no wonder there are checksum errors. If so, replacing that drive should probably be the first thing to do.
-
Sibbo almost 9 yearsAs of now the question is one year old, and the HDD is still working fine.
-
basic6 almost 9 yearsSo no smart errors, relevant smart values look ok and badblocks read-only test found no error? Or has nothing been checked and you're assuming it still works fine because it still runs? Bad drives usually start corrupting data long before they die. On the other hand, maybe your drive is healthy, but does btrfs dev stats / list any errors and what does btrfs fi df / say?
-
-
Sibbo over 9 yearsThank you. I'll try that if I the partition still exists.