Re: Can't mount btrfs - bad tree block start

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14.10.2013, at 03:16, Wang Shilong <wangsl.fnst@xxxxxxxxxxxxxx> wrote:

> On 10/14/2013 06:01 AM, Marius Kittelmann wrote:
>> Hello,
>> 
>> after a power outage, I can't mount one of my btrfs fs anymore.
>> The mount output is:
>> 
>> [root@absolut ~]# mount /dev/mapper/wdb
>> mount: wrong fs type, bad option, bad superblock on /dev/mapper/wdb,
>>        missing codepage or helper program, or other error
>> 
>>        In some cases useful info is found in syslog - try
>>        dmesg | tail or so.
>> 
>> dmesg output:
>> 
>> [ 4675.304832] device fsid cdb5080d-8aa3-4938-ad38-f4ff4c6efa7c devid 1 transid 212017 /dev/mapper/wdb
>> [ 4675.305768] btrfs: disk space caching is enabled
>> [ 4675.789190] btrfs bad tree block start 6226359148539426339 2665114812416
>> [ 4675.798276] btrfs bad tree block start 3867827444190911355 2665114812416
>> [ 4675.833689] btrfs: open_ctree failed
>> 
>> If I try mounting with '-o ro,recovery', dmesg gives me:
>> 
>> [ 4820.176934] device fsid cdb5080d-8aa3-4938-ad38-f4ff4c6efa7c devid 1 transid 212017 /dev/mapper/wdb
>> [ 4820.178198] btrfs: enabling auto recovery
>> [ 4820.178208] btrfs: disk space caching is enabled
>> [ 4820.224417] btrfs bad tree block start 6226359148539426339 2665114812416
>> [ 4820.224739] btrfs bad tree block start 3867827444190911355 2665114812416
>> [ 4820.225072] btrfs bad tree block start 6226359148539426339 2665114812416
>> [ 4820.225418] btrfs bad tree block start 3867827444190911355 2665114812416
>> [ 4820.683797] btrfs bad tree block start 6226359148539426339 2665114812416
>> [ 4820.684527] btrfs bad tree block start 3867827444190911355 2665114812416
>> [ 4820.698474] parent transid verify failed on 936925569024 wanted 212015 found 212017
>> [ 4820.702996] parent transid verify failed on 936925569024 wanted 212015 found 212017
>> [ 4820.703017] btrfs: failed to read tree root on dm-8
>> [ 4820.713317] parent transid verify failed on 936932843520 wanted 212014 found 212016
>> [ 4820.716356] parent transid verify failed on 936932843520 wanted 212014 found 212016
>> [ 4820.716377] btrfs: failed to read tree root on dm-8
>> [ 4820.799898] btrfs: open_ctree failed
>> 
>> btrfs-image produces the following output and the output file is empty:
>> 
>> [root@absolut ~]# btrfs-image -c9 -t4 /dev/mapper/wdb wdb-image
>> Check tree block failed, want=2665114812416, have=6226359148539426339
>> Check tree block failed, want=2665114812416, have=6226359148539426339
>> Check tree block failed, want=2665114812416, have=3867827444190911355
>> Check tree block failed, want=2665114812416, have=3867827444190911355
>> Check tree block failed, want=2665114812416, have=3867827444190911355
>> read block failed check_tree_block
>> Couldn't setup device tree
>> Open ctree failed
>> create failed (Success)
>> 
>> System info:
>> 
>> Kernel: 3.10.13-1-lts
>> btrfs-progs from arch-linux repo (btrfs-progs 0.20rc1.3-1)
>> FS is inside a dm-crypt on a 3TB drive
>> 
>> Is there any chance to recover from these errors or restore some of the files
> Firstly, try to update your btrfs-progs:
> 
> git pull http://github.com/btrfs-progs.git integration-20131008
> 
> then, you can try to recover bad supers(if existed):
> 
> btrfs rescue super-recover -v /dev/mapper/wdb

The superblocks seem fine:

[mkaay@absolut btrfsprogs]$ sudo ./btrfs rescue super-recover -v /dev/mapper/wdb
All Devices:
        Device: id = 1, name = /dev/mapper/wdb

Before Recovering:
        [All good supers]:
                device name = /dev/mapper/wdb
                superblock bytenr = 65536

                device name = /dev/mapper/wdb
                superblock bytenr = 67108864

                device name = /dev/mapper/wdb
                superblock bytenr = 274877906944

        [All bad supers]:

All supers are valid, no need to recover

> If we recover bad supers successfully, but we can still not mount.
> (Or all the supers have been valid). Try:
> 
> btrfs-zero-log  /dev/mapper/wdb

Unfortunately btrfs-zero-log outputs the following:

[mkaay@absolut btrfsprogs]$ sudo ./btrfs-zero-log /dev/mapper/wdb 
Check tree block failed, want=2665114812416, have=6226359148539426339
Check tree block failed, want=2665114812416, have=6226359148539426339
Check tree block failed, want=2665114812416, have=3867827444190911355
Check tree block failed, want=2665114812416, have=3867827444190911355
Check tree block failed, want=2665114812416, have=3867827444190911355
read block failed check_tree_block
Couldn't setup device tree

Is there anything else I could try?

> See whether helps.
> 
> Hoping it will help,
> 
> Thanks,
> Wang
>> 
>> Any help would be appreciated.
>> Thanks,
>> 
>> Marius
> 

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux