Bad tree block, on root filesystem after reset
Hi,
Today my laptop messed-up my display configuration between 2 screens. I had to reset it, but my btrfs root partition is no longer mountable. I have the following output in dmesg :
device fsid f9264db3-f277-47b6-bd8f-57d0a67c93a7 devid 1 transid 78577 /dev/sda2
btrfs: force clearing of disk cache
btrfs bad tree block start 0 18565984256
btrfs bad tree block start 0 18565984256
trfs: failed to read tree root on sda2
btrfs: open_ctree failed
I downloaded the latest btrfs-progs, but getting strange output from several of the programs:
# ./btrfs-debug-tree /dev/sda2 btrfs-debug-tree: root-tree.c:46: btrfs_find_last_root: Assertion `!(path->slots[0] == 0)' failed.
But find-root program found things
# ./btrfs-find-root /dev/sda2 Super think's the tree root is at 18564399104, chunk root 20971520 Well block 13139611648 seems great, but generation doesn't match, have=78267, want=78578 Well block 13154590720 seems great, but generation doesn't match, have=78266, want=78578 Well block 13160091648 seems great, but generation doesn't match, have=78265, want=78578 Well block 23123091456 seems great, but generation doesn't match, have=78456, want=78578 Well block 23598575616 seems great, but generation doesn't match, have=78506, want=78578 Well block 23600107520 seems great, but generation doesn't match, have=78507, want=78578 Well block 23601156096 seems great, but generation doesn't match, have=78508, want=78578 Well block 23601225728 seems great, but generation doesn't match, have=78509, want=78578 No more metdata to scan, exiting
I tried restoring my data with
# btrfs-restore -v -t 13154590720 /dev/sda2 /mnt/sda2/@home/recovery/ parent transid verify failed on 13154590720 wanted 78578 found 78266 parent transid verify failed on 13154590720 wanted 78578 found 78266 parent transid verify failed on 13154590720 wanted 78578 found 78266 parent transid verify failed on 13154590720 wanted 78578 found 78266 Ignoring transid failure Check tree block failed, want=29360128, have=0 Check tree block failed, want=29360128, have=0 Check tree block failed, want=29360128, have=0 Check tree block failed, want=29360128, have=0 Check tree block failed, want=29360128, have=0 read block failed check_tree_block Couldn't setup device tree btrfs-restore: extent_io.c:602: free_extent_buffer: Assertion `!(eb->refs < 0)' failed.
Is there anything I can do to debug or grab a few bits before reformatting?
Thanks,
Maxime
Quoted 5 lines · cwillu
On Tue, Apr 9, 2013 at 11:18 AM, Maxime Nicco <[email protected] <mailto:[email protected]>> wrote:
Hi,
Quoted 7 lines
Today my laptop messed-up my display configuration between 2 screens. I had to reset it, but my btrfs root partition is no longer mountable.
I have the following output in dmesg :What kernel is this on, and have you tried mounting with -o recovery?
Oups i forgot to mention my kernel, my system was on 3.8, and i work from a live cd in 3.5.
I already tried mounting with -o recovery, here the result
# mount -t btrfs -o recovery /dev/sda2 /mnt/sda2
mount: wrong fs type, bad option, bad superblock on /dev/sda2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or sothe dmesg look like this
device fsid f9264db3-f277-47b6-bd8f-57d0a67c93a7 devid 1 transid 78577 /dev/sda2 btrfs bad tree block start 0 18565984256
btrfs bad tree block start 0 18565984256
btrfs: enabling auto recovery
btrfs: failed to read tree root on sda2
btrfs bad tree block start 0 18565984256
btrfs bad tree block start 0 18565984256
btrfs: failed to read tree root on sda2
parent transid verify failed on 18563280896 wanted 78576 found 78578 parent transid verify failed on 18563280896 wanted 78576 found 78578 btrfs read error corrected: ino 1 off 18563280896 (dev /dev/sda2 sector 38894232)
btrfs: failed to read tree root on sda2
btrfs bad tree block start 0 18565726208
btrfs bad tree block start 0 18565726208
btrfs: failed to read tree root on sda2
btrfs bad tree block start 0 18564616192
btrfs bad tree block start 0 18564616192
btrfs: failed to read tree root on sda2
btrfs: open_ctree failed