linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Broken filesystem
@ 2019-02-19 10:24 Roderick Johnstone
  2019-02-19 12:34 ` Qu Wenruo
  0 siblings, 1 reply; 8+ messages in thread
From: Roderick Johnstone @ 2019-02-19 10:24 UTC (permalink / raw)
  To: linux-btrfs

Hi

This is on Fedora 28:

# uname -a
Linux mysystem.mydomain 4.20.7-100.fc28.x86_64 #1 SMP Wed Feb 6 19:17:09 
UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

# btrfs --version
btrfs-progs v4.17.1

#   btrfs fi show
Label: none  uuid: 56d0171a-440d-47ff-ad0f-f7f97df31f7b
         Total devices 1 FS bytes used 7.39TiB
         devid    1 size 9.10TiB used 7.50TiB path /dev/md2


My btrfs filesystem is in a bad state after a partial disk failure on 
the md device (raid 6 array) the file system was on.

One of the disks had bad blocks, but instead of being ejected from the 
array, the array hung up. After rebooting to regain access and remove 
the bad disk I am in the following situation:

# mount -t btrfs -o compress-force=zlib,noatime /dev/md2 /mnt/rmj
mount: /mnt/rmj: wrong fs type, bad option, bad superblock on /dev/md2, 
missing codepage or helper program, or other error.
# dmesg
...
   264.527647] BTRFS info (device md2): force zlib compression, level 3
[  264.955360] BTRFS error (device md2): parent transid verify failed on 
5568287064064 wanted 254988 found 94122
[  264.964273] BTRFS error (device md2): open_ctree failed

I can mount and access the filesystem with the usebackuproot option:

# mount -t btrfs -o usebackuproot,compress-force=zlib,noatime /dev/md2 
/mnt/rmj
[  307.542761] BTRFS info (device md2): trying to use backup root at 
mount time
[  307.542768] BTRFS info (device md2): force zlib compression, level 3
[  307.570897] BTRFS error (device md2): parent transid verify failed on 
5568287064064 wanted 254988 found 94122
[  307.570979] BTRFS error (device md2): parent transid verify failed on 
5568287064064 wanted 254988 found 94122
[  431.167149] BTRFS info (device md2): checking UUID tree

But later after a umount there are these messages.

# umount /mnt/rmj
2205.778998] BTRFS error (device md2): parent transid verify failed on 
5568276393984 wanted 254986 found 94117
[ 2205.779008] BTRFS: error (device md2) in __btrfs_free_extent:6831: 
errno=-5 IO failure
[ 2205.779082] BTRFS info (device md2): forced readonly
[ 2205.779087] BTRFS: error (device md2) in btrfs_run_delayed_refs:2978: 
errno=-5 IO failure
[ 2205.779192] BTRFS warning (device md2): btrfs_uuid_scan_kthread 
failed -30

and a subsequent mount without the userbackuproot fails in the same way 
as before.

I have a copy of the important directories, but would like to be able to 
repair the filesystem if possible,

Any advise around repairing the filesystem would be appreciated.

Thanks.

Roderick Johnstone

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Broken Filesystem
@ 2020-01-25 11:34 Hendrik Friedel
  2020-01-25 12:20 ` Qu Wenruo
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Hendrik Friedel @ 2020-01-25 11:34 UTC (permalink / raw)
  To: Btrfs BTRFS

Hello,

I am helping someone here 
https://forum.openmediavault.org/index.php/Thread/29290-Harddrive-Failure-and-Data-Recovery/?postID=226502#post226502 
  to recover his data.
He is new to linux.

Two of his drives have a hardware problem.
btrfs filesystem show /dev/sda
Label: 'sdadisk1' uuid: fdce5ae5-fd6d-46b9-8056-3ff15ce9fa16
Total devices 1 FS bytes used 128.00KiB
devid 1 size 931.51GiB used 4.10GiB path /dev/sda

The 4.1GiB are way less than what was used.


We tried to mount with mount -t btrfs -o 
recovery,nospace_cache,clear_cache

[Sat Jan 18 11:40:29 2020] BTRFS warning (device sda): 'recovery' is 
deprecated, use 'usebackuproot' instead
[Sat Jan 18 11:40:29 2020] BTRFS info (device sda): trying to use backup 
root at mount time
[Sat Jan 18 11:40:29 2020] BTRFS info (device sda): disabling disk space 
caching
[Sat Jan 18 11:40:29 2020] BTRFS info (device sda): force clearing of 
disk cache
[Sun Jan 19 11:58:24 2020] BTRFS warning (device sda): 'recovery' is 
deprecated, use 'usebackuproot' instead
[Sun Jan 19 11:58:24 2020] BTRFS info (device sda): trying to use backup 
root at mount time
[Sun Jan 19 11:58:24 2020] BTRFS info (device sda): disabling disk space 
caching
[Sun Jan 19 11:58:24 2020] BTRFS info (device sda): force clearing of 
disk cache


The mountpoint does not show any data when mounted

Scrub did not help:
btrfs scrub start /dev/sda
scrub started on /dev/sda, fsid fdce5ae5-fd6d-46b9-8056-3ff15ce9fa16 
(pid=19881)

btrfs scrub status /dev/sda
scrub status for fdce5ae5-fd6d-46b9-8056-3ff15ce9fa16
scrub started at Sun Jan 19 12:03:35 2020 and finished after 00:00:00
total bytes scrubbed: 256.00KiB with 0 errors


btrfs check /dev/sda
Checking filesystem on /dev/sda
UUID: fdce5ae5-fd6d-46b9-8056-3ff15ce9fa16
checking extents
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
checking csums
checking root refs
found 131072 bytes used err is 0
total csum bytes: 0
total tree bytes: 131072
total fs tree bytes: 32768
total extent tree bytes: 16384
btree space waste bytes: 123986
file data blocks allocated: 0
referenced 0


Also btrfs restore -i -v /dev/sda /srv/dev-disk-by-label-NewDrive2 | tee 
/restorelog.txt did not help:
It came immediately back with 'Reached the end of the tree searching the 
directory'


btrfs-find-root /dev/sda
Superblock thinks the generation is 8
Superblock thinks the level is 0
It did not finish even in 54 hours

I am out of ideas. Can you give further advice?

Regards,
Hendrik


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

end of thread, other threads:[~2020-01-25 19:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-19 10:24 Broken filesystem Roderick Johnstone
2019-02-19 12:34 ` Qu Wenruo
2019-02-19 12:42   ` Roderick Johnstone
2020-01-25 11:34 Broken Filesystem Hendrik Friedel
2020-01-25 12:20 ` Qu Wenruo
     [not found]   ` <emeee471c5-e6f0-4503-8410-742b05f87305@ryzen>
2020-01-25 13:36     ` Qu Wenruo
2020-01-25 15:22 ` Hugo Mills
2020-01-25 19:46 ` Chris Murphy

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