linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bad tree block - data rescue possible?
@ 2019-09-30  6:22 Felix Koop
  2019-09-30  6:32 ` Qu Wenruo
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Koop @ 2019-09-30  6:22 UTC (permalink / raw)
  To: linux-btrfs

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
[  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.


-- 
Mit freundlichen Grüßen

Felix Koop
fkoop@fkoop.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bad tree block - data rescue possible?
  2019-09-30  6:22 Bad tree block - data rescue possible? Felix Koop
@ 2019-09-30  6:32 ` Qu Wenruo
  0 siblings, 0 replies; 2+ messages in thread
From: Qu Wenruo @ 2019-09-30  6:32 UTC (permalink / raw)
  To: Felix Koop, linux-btrfs


[-- Attachment #1.1: Type: text/plain, Size: 2058 bytes --]



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.
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-30  6:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-30  6:22 Bad tree block - data rescue possible? Felix Koop
2019-09-30  6:32 ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).