[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-btrfs
Subject:    Re: Bad tree block - data rescue possible?
From:       Qu Wenruo <quwenruo.btrfs () gmx ! com>
Date:       2019-09-30 6:32:18
Message-ID: 5786af09-a2b8-b29c-1475-61996c8aa8d0 () gmx ! com
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


On 2019/9/30 下午2:22, Felix Koop wrote:
> Hello,
> 
> please help. I have a btrfs filesystem that does not mount any more.
> This is the error I get:
> 
> root@tuxedo:~# mount -t btrfs /dev/md/8 /archive/
> mount: /archive: wrong fs type, bad option, bad superblock on /dev/md8,
> missing codepage or helper program, or other error.
> 
> root@tuxedo:~# btrfs check --readonly /dev/md/8
> Opening filesystem to check...
> checksum verify failed on 525573472256 found 34F97C00 wanted 15AEE1E6
> checksum verify failed on 525573472256 found 34F97C00 wanted 15AEE1E6
> checksum verify failed on 525573472256 found 72A4DA2D wanted 5756BAAD
> checksum verify failed on 525573472256 found 34F97C00 wanted 15AEE1E6
> bad tree block 525573472256, bytenr mismatch, want=525573472256,
> have=6438209987097185951
> ERROR: cannot open file system
> 
> 
> relevant dmesg:
> 
> [  288.589999] BTRFS info (device md8): disk space caching is enabled
> [  288.590004] BTRFS info (device md8): has skinny extents
> [  291.596699] BTRFS error (device md8): bad tree block start
> 6438209987097185951 525573472256
> [  291.608786] BTRFS error (device md8): bad tree block start
> 2211084770032297782 525573472256
> [  291.608844] BTRFS error (device md8): failed to read block groups:
> -5

Extent tree corruption.

If it's not hardware to blame, it means we didn't write some tree blocks
to disk. Looks like a bug in v5.2.0~v5.2.14. Have you mounted the fs
using those affected kernels?

btrfs-restore is able to get around the corrupted extent tree.
Or you can try this patchset: (based on v5.2)
https://patchwork.kernel.org/project/linux-btrfs/list/?series=170715

With that patchset applied, you can go mount it with "ro,rescue=skipbg",
then try to grab as much data as possible.

Thanks,
Qu

> [  291.660214] BTRFS error (device md8): open_ctree failed
> 
> 
> I am currently running kernel 4.15, but I tried also a 5.0 kernel and could not \
> mount the data either. btrfs is version 4.20.2 on ubuntu disco. 
> 


["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic