Finally made some more progress on one of my melted down btrfs from earlier this year.
First I hacked find-root.c to not stop scanning the disk when it thinks it has found the real root. I wanted it to print out all possible roots. I saved the stderr output to a logfile. About 1226 possible roots were found. Then I used btrfs-restore, iterating over each one of these to attempt to use each one of them as the root and see what files could be found: for temp in `sed 's/^.*block \([0-9]\+\).*$/\1/' log`; do echo $temp; nice ./btrfs-restore -t $temp /dev/mapper/tr5ut-vicep--library /mnt/recovery; done In this way I was able to recover about 36GB of data and the directory structure of what is recovered looks fine. The data also looks fine too by scanning MIME types with "file" and selecting a few text or HTML files to check manually. There is still a lot of data missing though. If I am reading this correctly there was about 300GB of data which compressed to 254GB on-disk. Label: 'vicep-library' uuid: 89b14d35-b31a-4fbe-a2d9-cb83cbcd3851 Total devices 1 FS bytes used 254.35GB devid 1 size 1.00TB used 299.04GB path /dev/dm-27 A lot of my btrfs-restore output looks like this: 318259351552 parent transid verify failed on 318259351552 wanted 575931 found 546662 parent transid verify failed on 318259351552 wanted 575931 found 546662 parent transid verify failed on 318259351552 wanted 575931 found 546662 parent transid verify failed on 318259351552 wanted 575931 found 546662 Ignoring transid failure parent transid verify failed on 318125375488 wanted 541528 found 572360 parent transid verify failed on 318125375488 wanted 541528 found 572360 parent transid verify failed on 318125375488 wanted 541528 found 572360 parent transid verify failed on 318125375488 wanted 541528 found 572360 Ignoring transid failure parent transid verify failed on 561016832 wanted 544038 found 574369 parent transid verify failed on 561016832 wanted 544038 found 574369 parent transid verify failed on 561016832 wanted 544038 found 574369 parent transid verify failed on 561016832 wanted 544038 found 574369 Ignoring transid failure leaf parent key incorrect 561016832 Root objectid is 5 parent transid verify failed on 164073472 wanted 544650 found 562972 parent transid verify failed on 164073472 wanted 544650 found 562972 parent transid verify failed on 164073472 wanted 544650 found 562972 parent transid verify failed on 164073472 wanted 544650 found 562972 Ignoring transid failure leaf parent key incorrect 164073472 Error searching -1 As far as I can see only the #5 root object was found, at least I don't see any others found in the output. This could account for the missing data. How could I get to the other root objects? -- Ryan C. Underwood, <neme...@icequake.net>
signature.asc
Description: Digital signature