Unable to mount filesystem
Hi!
I cannot mount my filesystem anymore. The problem started with it going into read-only mode after the filesystem accidentally became full. At some point the system crashed and after that I got this error. Is it possible to recover the filesystem or at least recover some data from it?
Here is some information from the system:
$ uname -a Linux localhost.localdomain 4.8.6-300.fc25.x86_64 #1 SMP Tue Nov 1 12:36:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux $ btrfs --version btrfs-progs v4.6.1 $ sudo mount /dev/sda4 /mnt mount: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. $ sudo btrfs fi show Label: 'fedora' uuid: 3ddc9cf1-ff3f-4081-900a-4f732838c31b Total devices 1 FS bytes used 208.67GiB devid 1 size 230.04GiB used 212.06GiB path /dev/sda4 $ dmesg | grep -i btrfs [ 5.747551] Btrfs loaded, crc32c=crc32c-intel [ 5.748632] BTRFS: device label fedora devid 1 transid 649633 /dev/sda4 [ 48.663727] BTRFS info (device sda4): disk space caching is enabled [ 48.665184] BTRFS error (device sda4): bad tree block start 0 1234052513792 [ 48.665194] BTRFS warning (device sda4): failed to read tree root [ 48.680625] BTRFS: open_ctree failed $ sudo btrfs check /dev/sda4 checksum verify failed on 1234052513792 found E4E3BDB6 wanted 00000000 checksum verify failed on 1234052513792 found E4E3BDB6 wanted 00000000 bytenr mismatch, want=1234052513792, have=0 Couldn't read tree root Couldn't open file system
$ sudo btrfs restore -l /dev/sda4 checksum verify failed on 1234052513792 found E4E3BDB6 wanted 00000000 checksum verify failed on 1234052513792 found E4E3BDB6 wanted 00000000 bytenr mismatch, want=1234052513792, have=0 Couldn't read tree root Could not open root, trying backup super checksum verify failed on 1234052513792 found E4E3BDB6 wanted 00000000 checksum verify failed on 1234052513792 found E4E3BDB6 wanted 00000000 bytenr mismatch, want=1234052513792, have=0 Couldn't read tree root Could not open root, trying backup super Superblock bytenr is larger than device size Could not open root, trying backup super
--
Wictor Lund
Hi Wictor, Hi List
I'm more or less stuck with the same problem as you. Btrfs on my external drive got corrupted after I moved a lot of files to it and would'n mount anymore.
This happened to me in november 2015 and I haven't tried again since today, as tools and code have matured eventually.
I tried a lot of things, but nothing helped yet :-/
$ uname -a
Quoted 1 line
Linux apc01 4.10.13-1-ARCH #1 SMP PREEMPT Thu Apr 27 12:15:09 CEST
2017 x86_64 GNU/Linux
$ [root@apc01 ~]# btrfs --version
Quoted 1 line
btrfs-progs v4.11.1
$ btrfs fi sh
Quoted 3 lines
Label: '
external_0001' uuid: 6acf5972-91a8-49a1-a5a1-2bcd86b8eb8b
Total devices 1 FS bytes used 2.18TiB
devid 1 size 3.64TiB used 2.19TiB path/dev/mapper/roverlay
1. cloned the drive with dd
2. attached the cloned drive to my computer and created an writable overlay (with losetup and dmsetup), so I can test many things without changing one bit on the cloned drive
3. tried recovery
3a) mount -t btrfs /dev/mapper/roverlay /mnt
Quoted 3 lines
BTRFS info (device dm-0): disk space caching is enabled BTRFS info (device dm-0): has skinny extents
BTRFS error (device dm-0): bad tree block start 11851697049360863559
21053440
Quoted 1 line
BTRFS error (device dm-0): bad tree block start 7989935996922551463
21053440
Quoted 2 lines
BTRFS error (device dm-0): failed to read chunk tree: -5 BTRFS error (device dm-0):
open_ctreefailed
3b) mount -t btrfs -o ro,recovery /dev/mapper/roverlay /mnt same as 3a)
3c) btrfs rescue zero-log /dev/mapper/roverlay
Quoted 7 lines
checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A checksum verify failed on 21053440 found CF3B13F9 wanted 4A9A0385 checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A bytenr mismatch, want=21053440, have=11851697049360863559 Couldn't read chunk tree
ERROR: cannot open ctree
3d) btrfs restore /dev/mapper/roverlay /data/recovery
Quoted 13 lines
checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A checksum verify failed on 21053440 found CF3B13F9 wanted 4A9A0385 checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A bytenr mismatch, want=21053440, have=11851697049360863559 Couldn't read chunk tree
Could not open root, trying backup super
checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A checksum verify failed on 21053440 found CF3B13F9 wanted 4A9A0385 checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A bytenr mismatch, want=21053440, have=11851697049360863559 Couldn't read chunk tree
Quoted 8 lines
Could not open root, trying backup super
checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A checksum verify failed on 21053440 found CF3B13F9 wanted 4A9A0385 checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A bytenr mismatch, want=21053440, have=11851697049360863559 Couldn't read chunk tree
Could not open root, trying backup super
3e) btrfs check -s 0 /dev/mapper/roverlay
Quoted 8 lines
using SB copy 0, bytenr 65536
checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A checksum verify failed on 21053440 found CF3B13F9 wanted 4A9A0385 checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A bytenr mismatch, want=21053440, have=11851697049360863559 Couldn't read chunk tree
ERROR: cannot open file system
3f) btrfs check -s 1 /dev/mapper/roverlay
Quoted 8 lines
using SB copy 1, bytenr 67108864
checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A checksum verify failed on 21053440 found CF3B13F9 wanted 4A9A0385 checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A bytenr mismatch, want=21053440, have=11851697049360863559 Couldn't read chunk tree
ERROR: cannot open file system
3g) btrfs check -s 2 /dev/mapper/roverlay
Quoted 8 lines
using SB copy 2, bytenr 274877906944
checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A checksum verify failed on 21053440 found CF3B13F9 wanted 4A9A0385 checksum verify failed on 21053440 found 42E96418 wanted 277C3E6A bytenr mismatch, want=21053440, have=11851697049360863559 Couldn't read chunk tree
ERROR: cannot open file system
3h) btrfs rescue super-recover -v /dev/mapper/roverlay
Quoted 11 lines
All Devices:
Device: id = 1, name =/dev/mapper/roverlayBefore Recovering:
[All good supers]:
device name =/dev/mapper/roverlaysuperblock bytenr = 65536device name =
/dev/mapper/roverlaysuperblock bytenr = 67108864
Quoted 6 lines
device name =
/dev/mapper/roverlaysuperblock bytenr = 274877906944[All bad supers]:
All supers are valid, no need to recover
3i) btrfs rescue chunk-recover -v /dev/mapper/roverlay
Quoted 4 lines
All Devices:
Device: id = 1, name =/dev/mapper/roverlayScanning: 2127447805952 in dev0chunk-recover.c:129:
process_extent_buffer: BUG_ON exist->nmirrors >= BTRFS_MAX_MIRRORS triggered, value 1
Quoted 5 lines
btrfs[0x463150]
btrfs[0x463fd1]
/usr/lib/libpthread.so.0(+0x7297)[0x7f0efc75a297]
/usr/lib/libc.so.6(clone+0x3f)[0x7f0efc49b1ef]
Aborted (core dumped)
Any more suggestions?
-
andre
Quoted 59 lines · Wictor Lund
Hi!
I cannot mount my filesystem anymore. The problem started with it going into read-only mode after the filesystem accidentally became full. At some point the system crashed and after that I got this error. Is it possible to recover the filesystem or at least recover some data from it?
Here is some information from the system:
$ uname -a Linux localhost.localdomain 4.8.6-300.fc25.x86_64 #1 SMP Tue Nov 1 12:36:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux$ btrfs --version btrfs-progs v4.6.1$ sudo mount /dev/sda4 /mnt mount: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other errorIn some cases useful info is found in syslog - try dmesg | tail or so.
$ sudo btrfs fi show Label: 'fedora' uuid: 3ddc9cf1-ff3f-4081-900a-4f732838c31b Total devices 1 FS bytes used 208.67GiB devid 1 size 230.04GiB used 212.06GiB path /dev/sda4$ dmesg | grep -i btrfs [ 5.747551] Btrfs loaded, crc32c=crc32c-intel [ 5.748632] BTRFS: device label fedora devid 1 transid 649633 /dev/sda4 [ 48.663727] BTRFS info (device sda4): disk space caching is enabled [ 48.665184] BTRFS error (device sda4): bad tree block start 0 1234052513792 [ 48.665194] BTRFS warning (device sda4): failed to read tree root [ 48.680625] BTRFS: open_ctree failed$ sudo btrfs check /dev/sda4 checksum verify failed on 1234052513792 found E4E3BDB6 wanted 00000000 checksum verify failed on 1234052513792 found E4E3BDB6 wanted 00000000 bytenr mismatch, want=1234052513792, have=0 Couldn't read tree root Couldn't open file system$ sudo btrfs restore -l /dev/sda4 checksum verify failed on 1234052513792 found E4E3BDB6 wanted 00000000 checksum verify failed on 1234052513792 found E4E3BDB6 wanted 00000000 bytenr mismatch, want=1234052513792, have=0 Couldn't read tree root Could not open root, trying backup super checksum verify failed on 1234052513792 found E4E3BDB6 wanted 00000000 checksum verify failed on 1234052513792 found E4E3BDB6 wanted 00000000 bytenr mismatch, want=1234052513792, have=0 Couldn't read tree root Could not open root, trying backup super Superblock bytenr is larger than device size Could not open root, trying backup super--
Wictor Lund