On 2018/11/3 上午1:18, M. Klingmann wrote: > On 02.11.2018 at 15:45 Qu Wenruo wrote: >> On 2018/11/2 下午10:30, M. Klingmann wrote: >>> On 31.10.2018 at 01:03 Qu Wenruo wrote: >>>> My plan for such recovery is: >>>> >>>> 1) btrfs ins dump-super to make sure system chunk array is valid >>>> 2) btrfs-find-root to find any valid chunk tree blocks >>>> 3) pass that chunk tree bytenr to btrfs-restore >>>> Unfortunately, btrfs-restore doesn't support specifying chunk root >>>> yet. But it's pretty easy to add such support. >>>> >>>> So, please provide the "btrfs ins dump-super -Ffa" output to start with. >>> Following your plan, I did 1) and 2). >>> As 2) failed (see below), is there anything I can do to find the tree >>> bytenr to supply btrfs-restore with it? >>> >>> 1) Here's the output given by "btrfs-show-super -Ffa": >>> >>> superblock: bytenr=65536, device=sdcard.iso >>> --------------------------------------------------------- >>> csum 0xb8e15dd7 [match] > [snip] >>> 2) "btrfs-find-root" yields "Couldn't read chunk root; Open ctree failed". >> It's not plain "btrfs-find-root" but "btrfs-find-root -o 5". >> >> And you should use btrfs-progs v4.17.1, not the old v4.4. >> The ability to continue search even if chunk tree get corrupted is added >> in v4.5, and I strongly recommend to use latest (v4.17.1) for a lot of >> fixes and extra debug output. >> >> If you can't find any handy way to update btrfs-progs, you could use >> Archlinux iso as a rescue OS to use the latest btrfs-progs. > > Using Archlinux in fact is the easiest way to use version 4.17.1 > (Archlinux for 2018-11-01). > > Here's the output from "btrfs-find-root sdcard.iso": > > WARNING: cannot read chunk root, continue anyway > Superblock thinks the generation is 1757933 > Superblock thinks the level is 0 > > Here's the output using "btrfs-find-root -o 5 sdcard.iso": > > WARNING: cannot read chunk root, continue anyway > Superblock doesn't contain generation info for root 5 > Superblock doesn't contain the level info for root 5
No other output at all? That means the whole 8M range of system chunk get corrupted. Thus really no way to get any meaningful data out of the filesystem, unfortunately. Thanks, Qu > >> For 3), I could easily add such feature btrfs-restore, or just use >> manually patching your superblock to continue. >> So as soon as your "btrfs-find-root -o 5" gets some valid output, I >> could continue the work. >> > Thank you. >
signature.asc
Description: OpenPGP digital signature