I’m thinking this is really bad, folks. I have a couple backup files to compare and test against for safety, but I’m getting a stone wall.
Starting with a find root btrfs-find-root -a fc39.raw.disk
, I get the really long, 200 ish, list of “bad blocks”.
I’m getting the following results using a series of btrfs check -r <block> -s <super> fc39.raw.disk
the first in the chain gives this:
using SB copy 2, bytenr 274877906944
Opening filesystem to check...
parent transid verify failed on 822913368064 wanted 420465 found 419921
checksum verify failed on 822913368064 wanted 0x47180c50 found 0xad52f1e7
checksum verify failed on 822913368064 wanted 0x47180c50 found 0xad52f1e7
bad tree block 822913368064, bytenr mismatch, want=822913368064, have=0
Couldn't read tree root
ERROR: cannot open file system
Assuming that the “couldn’t read tree root” is a deeper problem, I searched for a block that didn’t have that issue, had the smallest number of checksum errors et al, and which was closest to the top of the chain. Results:
btrfs check -r 822769500160 -s 0 fc39.raw.disk
using SB copy 0, bytenr 65536
Opening filesystem to check...
parent transid verify failed on 822769500160 wanted 420465 found 419917
checksum verify failed on 822769500160 wanted 0x40a0ba19 found 0x14b83719
parent transid verify failed on 822769500160 wanted 420465 found 419917
Ignoring transid failure
checksum verify failed on 823433723904 wanted 0x00a06b01 found 0x456ef27c
checksum verify failed on 823433723904 wanted 0x00406def found 0x1d612e9e
checksum verify failed on 823433723904 wanted 0x00406def found 0x1d612e9e
bad tree block 823433723904, bytenr mismatch, want=823433723904, have=18446635083965854016
ERROR: failed to read block groups: Input/output error
ERROR: cannot open file system
I then tried the repair switch, with this result:
$ btrfs check --repair --tree-root 822769500160 -s 0 fc39.raw.disk
enabling repair mode
using SB copy 0, bytenr 65536
WARNING:
Do not use --repair unless you are advised to do so by a developer
or an experienced user, and then only after having accepted that no
fsck can successfully repair all types of filesystem corruption. E.g.
some software or hardware bugs can fatally damage a volume.
The operation will start in 10 seconds.
Use Ctrl-C to stop it.
10 9 8 7 6 5 4 3 2 1
Starting repair.
Opening filesystem to check...
parent transid verify failed on 822769500160 wanted 420465 found 419917
checksum verify failed on 822769500160 wanted 0x40a0ba19 found 0x14b83719
parent transid verify failed on 822769500160 wanted 420465 found 419917
Ignoring transid failure
checksum verify failed on 823433723904 wanted 0x00a06b01 found 0x456ef27c
checksum verify failed on 823433723904 wanted 0x00406def found 0x1d612e9e
checksum verify failed on 823433723904 wanted 0x00406def found 0x1d612e9e
bad tree block 823433723904, bytenr mismatch, want=823433723904, have=18446635083965854016
ERROR: failed to read block groups: Input/output error
ERROR: cannot open file system
I refuse to believe that recovery from a bad shutdown is this hard or hidden.