Re: (One more) BTRFS damaged FS... Any hope ?

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

 



Hi again Chris, and many thanks again,

Le 10/03/2020 à 04:46, Chris Murphy a écrit :
> 
> Yep, this suggests a crash or power fail during fsync.

This wouldn't susrprise me much, the laptop belonging to a kid who I
know for sure doesn't pay much attention to battery level and
experiments running out of battery quite often...

> Maybe the first 50 lines of the btrfs check are useful to get an idea
> what's going on, but without it, it's hard to say what's wrong or what
> to do.

Here it comes...:

[root@zafu ~]# btrfs check /dev/sdb1 |& head -64
parent transid verify failed on 8176123904 wanted 183574 found 183573
parent transid verify failed on 8176123904 wanted 183574 found 183573
Ignoring transid failure
[1/7] checking root items
[2/7] checking extents
ref mismatch on [5685248 16384] extent item 1, found 0
backref 5685248 root 258 not referenced back 0x564b1f957480
incorrect global backref count on 5685248 found 1 wanted 0
backpointer mismatch on [5685248 16384]
owner ref check failed [5685248 16384]
ref mismatch on [10420224 16384] extent item 1, found 0
backref 10420224 root 258 not referenced back 0x564b248ea1c0
incorrect global backref count on 10420224 found 1 wanted 0
backpointer mismatch on [10420224 16384]
owner ref check failed [10420224 16384]
ref mismatch on [10436608 16384] extent item 1, found 0
backref 10436608 root 258 not referenced back 0x564b248ea2c0
incorrect global backref count on 10436608 found 1 wanted 0
backpointer mismatch on [10436608 16384]
owner ref check failed [10436608 16384]
ref mismatch on [10534912 16384] extent item 1, found 0
backref 10534912 root 7 not referenced back 0x564b248ea3c0
incorrect global backref count on 10534912 found 1 wanted 0
backpointer mismatch on [10534912 16384]
owner ref check failed [10534912 16384]
ref mismatch on [11567104 16384] extent item 1, found 0
backref 11567104 root 7 not referenced back 0x564b1f9bce50
incorrect global backref count on 11567104 found 1 wanted 0
backpointer mismatch on [11567104 16384]
owner ref check failed [11567104 16384]
ref mismatch on [11862016 16384] extent item 1, found 0
backref 11862016 root 7 not referenced back 0x564b1f9bcfd0
incorrect global backref count on 11862016 found 1 wanted 0
backpointer mismatch on [11862016 16384]
owner ref check failed [11862016 16384]
ref mismatch on [13639680 4096] extent item 1, found 0
incorrect local backref count on 13639680 root 258 owner 949178 offset 0
found 0 wanted 1 back 0x564b248eb0c0
backref disk bytenr does not match extent record, bytenr=13639680, ref
bytenr=0
backpointer mismatch on [13639680 4096]
owner ref check failed [13639680 4096]
ref mismatch on [13758464 4096] extent item 1, found 0
incorrect local backref count on 13758464 root 258 owner 769574 offset 0
found 0 wanted 1 back 0x564b248ec030
backref disk bytenr does not match extent record, bytenr=13758464, ref
bytenr=0
backpointer mismatch on [13758464 4096]
owner ref check failed [13758464 4096]
ref mismatch on [13963264 4096] extent item 1, found 0
incorrect local backref count on 13963264 root 258 owner 1041188 offset
0 found 0 wanted 1 back 0x564b248eda50
backref disk bytenr does not match extent record, bytenr=13963264, ref
bytenr=0
backpointer mismatch on [13963264 4096]
owner ref check failed [13963264 4096]
ref mismatch on [13971456 8192] extent item 1, found 0
incorrect local backref count on 13971456 root 258 owner 306160 offset 0
found 0 wanted 1 back 0x564b248edcb0
backref disk bytenr does not match extent record, bytenr=13971456, ref
bytenr=0
backpointer mismatch on [13971456 8192]
owner ref check failed [13971456 8192]
ref mismatch on [13979648 4096] extent item 1, found 0
incorrect local backref count on 13979648 root 258 owner 306185 offset 0
found 0 wanted 1 back 0x564b248edde0
backref disk bytenr does not match extent record, bytenr=13979648, ref
bytenr=0
backpointer mismatch on [13979648 4096]
owner ref check failed [13979648 4096]
ref mismatch on [13996032 4096] extent item 1, found 0
incorrect local backref count on 13996032 root 258 owner 739868 offset 0
found 0 wanted 1 back 0x564b248ee2a0
backref disk bytenr does not match extent record, bytenr=13996032, ref
bytenr=0
backpointer mismatch on [13996032 4096]



[root@zafu ~]# btrfs check -b /dev/sdb1 |& head -64
[1/7] checking root items
[2/7] checking extents
ref mismatch on [3819245568 4096] extent item 1, found 0
incorrect local backref count on 3819245568 root 257 owner 736217 offset
0 found 0 wanted 1 back 0x55f5e4931c00
backref disk bytenr does not match extent record, bytenr=3819245568, ref
bytenr=0
backpointer mismatch on [3819245568 4096]
owner ref check failed [3819245568 4096]
ref mismatch on [3819421696 4096] extent item 1, found 0
incorrect local backref count on 3819421696 root 257 owner 736218 offset
0 found 0 wanted 1 back 0x55f5e49327e0
backref disk bytenr does not match extent record, bytenr=3819421696, ref
bytenr=0
backpointer mismatch on [3819421696 4096]
owner ref check failed [3819421696 4096]
ref mismatch on [3821916160 4096] extent item 1, found 0
incorrect local backref count on 3821916160 root 257 owner 736219 offset
0 found 0 wanted 1 back 0x55f5e1ee28e0
backref disk bytenr does not match extent record, bytenr=3821916160, ref
bytenr=0
backpointer mismatch on [3821916160 4096]
owner ref check failed [3821916160 4096]
ref mismatch on [3822043136 4096] extent item 1, found 0
incorrect local backref count on 3822043136 root 257 owner 736220 offset
0 found 0 wanted 1 back 0x55f5e1ee3130
backref disk bytenr does not match extent record, bytenr=3822043136, ref
bytenr=0
backpointer mismatch on [3822043136 4096]
owner ref check failed [3822043136 4096]
ref mismatch on [3822174208 4096] extent item 1, found 0
incorrect local backref count on 3822174208 root 257 owner 736222 offset
0 found 0 wanted 1 back 0x55f5e1ee3f70
backref disk bytenr does not match extent record, bytenr=3822174208, ref
bytenr=0
backpointer mismatch on [3822174208 4096]
owner ref check failed [3822174208 4096]
ref mismatch on [3822448640 4096] extent item 1, found 0
incorrect local backref count on 3822448640 root 257 owner 736223 offset
0 found 0 wanted 1 back 0x55f5e1ee4c80
backref disk bytenr does not match extent record, bytenr=3822448640, ref
bytenr=0
backpointer mismatch on [3822448640 4096]
owner ref check failed [3822448640 4096]
ref mismatch on [3822665728 4096] extent item 1, found 0
incorrect local backref count on 3822665728 root 257 owner 736224 offset
0 found 0 wanted 1 back 0x55f5e1ee5bf0
backref disk bytenr does not match extent record, bytenr=3822665728, ref
bytenr=0
backpointer mismatch on [3822665728 4096]
owner ref check failed [3822665728 4096]
ref mismatch on [3823845376 4096] extent item 1, found 0
incorrect local backref count on 3823845376 root 257 owner 736225 offset
0 found 0 wanted 1 back 0x55f5e1754b30
backref disk bytenr does not match extent record, bytenr=3823845376, ref
bytenr=0
backpointer mismatch on [3823845376 4096]
owner ref check failed [3823845376 4096]
ref mismatch on [3824963584 4096] extent item 1, found 0
incorrect local backref count on 3824963584 root 257 owner 736227 offset
0 found 0 wanted 1 back 0x55f5e175adc0
backref disk bytenr does not match extent record, bytenr=3824963584, ref
bytenr=0
backpointer mismatch on [3824963584 4096]
owner ref check failed [3824963584 4096]
ref mismatch on [3825586176 4096] extent item 1, found 0
incorrect local backref count on 3825586176 root 257 owner 736228 offset
0 found 0 wanted 1 back 0x55f5e3999990
backref disk bytenr does not match extent record, bytenr=3825586176, ref
bytenr=0
backpointer mismatch on [3825586176 4096]
owner ref check failed [3825586176 4096]
ref mismatch on [3825590272 4096] extent item 1, found 0
incorrect local backref count on 3825590272 root 257 owner 736229 offset
0 found 0 wanted 1 back 0x55f5e3999ac0
backref disk bytenr does not match extent record, bytenr=3825590272, ref
bytenr=0
backpointer mismatch on [3825590272 4096]
owner ref check failed [3825590272 4096]
ref mismatch on [3825844224 4096] extent item 1, found 0
incorrect local backref count on 3825844224 root 257 owner 736230 offset
0 found 0 wanted 1 back 0x55f5e399b3b0
backref disk bytenr does not match extent record, bytenr=3825844224, ref
bytenr=0
backpointer mismatch on [3825844224 4096]
owner ref check failed [3825844224 4096]
ref mismatch on [3825905664 4096] extent item 1, found 0
incorrect local backref count on 3825905664 root 257 owner 736231 offset
0 found 0 wanted 1 back 0x55f5e399b870


Unhappy as it can be...


> Another option is to zero the log tree, which will mean anything that
> was being fsync'd at the time is probably lost. It could fix the file
> system problem, but then result in user space data loss, depending on
> what was happening at the time of the power loss or crash.
> 
> # btrfs rescue zero-log /dev/

There was no important user data that couldn't be lost, so if it allows
rescueing the FS, then...

[root@zafu ~]# btrfs rescue zero-log /dev/sdb1
parent transid verify failed on 8176123904 wanted 183574 found 183573
parent transid verify failed on 8176123904 wanted 183574 found 183573
Ignoring transid failure
Clearing log on /dev/sdb1, previous log_root 8179646464, level 0

[root@zafu ~]# LC_MESSAGES=C mount -t btrfs /dev/sdb1 /mnt/hd
mount: /mnt/hd: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error.

[root@zafu ~]# LC_MESSAGES=C mount -t btrfs -o usebackuproot /dev/sdb1
/mnt/hd

[root@zafu ~]# mount
[...]
/dev/sdb1 on /mnt/hd type btrfs
(rw,relatime,space_cache,clear_cache,subvolid=5,subvol=/)

There it mounts !

[root@zafu ~]# ll /mnt/hd
total 0
drwxr-xr-x 1 root root 234 17 janv. 20:18 @
drwxr-xr-x 1 root root  12 14 oct.   2018 @data
drwxr-xr-x 1 root root  82 27 juil.  2018 @home
drwxr-xr-x 1 root root 210 12 févr. 12:00 timeshift-btrfs

[root@zafu ~]# ll /mnt/hd/@
total 16
drwxr-xr-x 1 root root 2534  5 janv. 13:30 bin
drwxr-xr-x 1 root root  516 17 janv. 20:19 boot
drwxr-xr-x 1 root root    0 22 juil.  2018 cdrom
drwxr-xr-x 1 root root    0 14 oct.   2018 data
drwxr-xr-x 1 root root  894 22 juil.  2018 dev
drwxr-xr-x 1 root root 4476 23 janv. 09:51 etc
drwxr-xr-x 1 root root    0 22 juil.  2018 home
lrwxrwxrwx 1 root root   32 17 janv. 20:18 initrd.img ->
boot/initrd.img-5.3.0-26-generic
lrwxrwxrwx 1 root root   32  5 janv. 17:37 initrd.img.old ->
boot/initrd.img-5.3.0-24-generic
drwxr-xr-x 1 root root  580  6 sept.  2019 lib
drwxr-xr-x 1 root root   40 26 juin   2018 lib64
drwxr-xr-x 1 root root   54 10 déc.   2018 media
drwxr-xr-x 1 root root   18 22 juil.  2018 mnt
drwxr-xr-x 1 root root   60  6 sept.  2019 opt
drwxr-xr-x 1 root root    0 24 avril  2018 proc
drwx------ 1 root root  190 28 juil.  2018 root
drwxr-xr-x 1 root root  156 14 oct.   2018 run
drwxr-xr-x 1 root root 4810  5 janv. 13:34 sbin
drwxr-xr-x 1 root root    0 26 juin   2018 srv
drwxr-xr-x 1 root root    0 24 avril  2018 sys
drwxrwxrwt 1 root root 1188 12 févr. 15:30 tmp
drwxr-xr-x 1 root root   84 27 avril  2019 usr
drwxr-xr-x 1 root root  110  9 déc.  10:08 var
lrwxrwxrwx 1 root root   29 17 janv. 20:18 vmlinuz ->
boot/vmlinuz-5.3.0-26-generic
lrwxrwxrwx 1 root root   29  5 janv. 17:37 vmlinuz.old ->
boot/vmlinuz-5.3.0-24-generic

[root@zafu ~]# umount /mnt/hd


[root@zafu ~]# LC_MESSAGES=C mount -t btrfs /dev/sdb1 /mnt/hd

[root@zafu ~]# ll /mnt/hd/@
total 16
drwxr-xr-x 1 root root 2534  5 janv. 13:30 bin
drwxr-xr-x 1 root root  516 17 janv. 20:19 boot
drwxr-xr-x 1 root root    0 22 juil.  2018 cdrom
drwxr-xr-x 1 root root    0 14 oct.   2018 data
drwxr-xr-x 1 root root  894 22 juil.  2018 dev
drwxr-xr-x 1 root root 4476 23 janv. 09:51 etc
drwxr-xr-x 1 root root    0 22 juil.  2018 home
lrwxrwxrwx 1 root root   32 17 janv. 20:18 initrd.img ->
boot/initrd.img-5.3.0-26-generic
lrwxrwxrwx 1 root root   32  5 janv. 17:37 initrd.img.old ->
boot/initrd.img-5.3.0-24-generic
drwxr-xr-x 1 root root  580  6 sept.  2019 lib
drwxr-xr-x 1 root root   40 26 juin   2018 lib64
drwxr-xr-x 1 root root   54 10 déc.   2018 media
drwxr-xr-x 1 root root   18 22 juil.  2018 mnt
drwxr-xr-x 1 root root   60  6 sept.  2019 opt
drwxr-xr-x 1 root root    0 24 avril  2018 proc
drwx------ 1 root root  190 28 juil.  2018 root
drwxr-xr-x 1 root root  156 14 oct.   2018 run
drwxr-xr-x 1 root root 4810  5 janv. 13:34 sbin
drwxr-xr-x 1 root root    0 26 juin   2018 srv
drwxr-xr-x 1 root root    0 24 avril  2018 sys
drwxrwxrwt 1 root root 1188 12 févr. 15:30 tmp
drwxr-xr-x 1 root root   84 27 avril  2019 usr
drwxr-xr-x 1 root root  110  9 déc.  10:08 var
lrwxrwxrwx 1 root root   29 17 janv. 20:18 vmlinuz ->
boot/vmlinuz-5.3.0-26-generic
lrwxrwxrwx 1 root root   29  5 janv. 17:37 vmlinuz.old ->
boot/vmlinuz-5.3.0-24-generic
[root@zafu ~]# umount /mnt/hd

Looks much happier now !

However :

[root@zafu ~]# !523
btrfs check /dev/sdb1 |& head -64
[1/7] checking root items
[2/7] checking extents
ref mismatch on [3819245568 4096] extent item 1, found 0
incorrect local backref count on 3819245568 root 257 owner 736217 offset
0 found 0 wanted 1 back 0x5559746ca680
backref disk bytenr does not match extent record, bytenr=3819245568, ref
bytenr=0
backpointer mismatch on [3819245568 4096]
owner ref check failed [3819245568 4096]
ref mismatch on [3819421696 4096] extent item 1, found 0
incorrect local backref count on 3819421696 root 257 owner 736218 offset
0 found 0 wanted 1 back 0x5559746cb260
backref disk bytenr does not match extent record, bytenr=3819421696, ref
bytenr=0
backpointer mismatch on [3819421696 4096]
owner ref check failed [3819421696 4096]
ref mismatch on [3821916160 4096] extent item 1, found 0
incorrect local backref count on 3821916160 root 257 owner 736219 offset
0 found 0 wanted 1 back 0x5559755abd60
backref disk bytenr does not match extent record, bytenr=3821916160, ref
bytenr=0
backpointer mismatch on [3821916160 4096]
owner ref check failed [3821916160 4096]
ref mismatch on [3822043136 4096] extent item 1, found 0
incorrect local backref count on 3822043136 root 257 owner 736220 offset
0 found 0 wanted 1 back 0x5559755ac5b0
backref disk bytenr does not match extent record, bytenr=3822043136, ref
bytenr=0
backpointer mismatch on [3822043136 4096]
owner ref check failed [3822043136 4096]
ref mismatch on [3822174208 4096] extent item 1, found 0
incorrect local backref count on 3822174208 root 257 owner 736222 offset
0 found 0 wanted 1 back 0x5559755ad3f0
backref disk bytenr does not match extent record, bytenr=3822174208, ref
bytenr=0
backpointer mismatch on [3822174208 4096]
owner ref check failed [3822174208 4096]
ref mismatch on [3822448640 4096] extent item 1, found 0
incorrect local backref count on 3822448640 root 257 owner 736223 offset
0 found 0 wanted 1 back 0x5559755ae100
backref disk bytenr does not match extent record, bytenr=3822448640, ref
bytenr=0
backpointer mismatch on [3822448640 4096]
owner ref check failed [3822448640 4096]
ref mismatch on [3822665728 4096] extent item 1, found 0
incorrect local backref count on 3822665728 root 257 owner 736224 offset
0 found 0 wanted 1 back 0x5559755af070
backref disk bytenr does not match extent record, bytenr=3822665728, ref
bytenr=0
backpointer mismatch on [3822665728 4096]
owner ref check failed [3822665728 4096]
ref mismatch on [3823845376 4096] extent item 1, found 0
incorrect local backref count on 3823845376 root 257 owner 736225 offset
0 found 0 wanted 1 back 0x555974e2d300
backref disk bytenr does not match extent record, bytenr=3823845376, ref
bytenr=0
backpointer mismatch on [3823845376 4096]
owner ref check failed [3823845376 4096]
ref mismatch on [3824963584 4096] extent item 1, found 0
incorrect local backref count on 3824963584 root 257 owner 736227 offset
0 found 0 wanted 1 back 0x555974e334d0
backref disk bytenr does not match extent record, bytenr=3824963584, ref
bytenr=0
backpointer mismatch on [3824963584 4096]
owner ref check failed [3824963584 4096]
ref mismatch on [3825586176 4096] extent item 1, found 0
incorrect local backref count on 3825586176 root 257 owner 736228 offset
0 found 0 wanted 1 back 0x555977015850
backref disk bytenr does not match extent record, bytenr=3825586176, ref
bytenr=0
backpointer mismatch on [3825586176 4096]
owner ref check failed [3825586176 4096]
ref mismatch on [3825590272 4096] extent item 1, found 0
incorrect local backref count on 3825590272 root 257 owner 736229 offset
0 found 0 wanted 1 back 0x555977015980
backref disk bytenr does not match extent record, bytenr=3825590272, ref
bytenr=0
backpointer mismatch on [3825590272 4096]
owner ref check failed [3825590272 4096]
ref mismatch on [3825844224 4096] extent item 1, found 0
incorrect local backref count on 3825844224 root 257 owner 736230 offset
0 found 0 wanted 1 back 0x555977017150
backref disk bytenr does not match extent record, bytenr=3825844224, ref
bytenr=0
backpointer mismatch on [3825844224 4096]
owner ref check failed [3825844224 4096]
ref mismatch on [3825905664 4096] extent item 1, found 0
incorrect local backref count on 3825905664 root 257 owner 736231 offset
0 found 0 wanted 1 back 0x555977017610

So still not absolutely happy :\

Many thanks however, at least the FS mounts after zeroeing the log...

Kind regards.

ॐ

-- 
Swâmi Petaramesh <swami@xxxxxxxxxxxxxx> PGP 9076E32E



[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