Re: tree first key mismatch detected (reproducible error)

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

 




On 2020/1/26 下午7:17, Thorsten Hirsch wrote:
> Thank you, Martin. So I started memtester yesterday and meanwhile it
> has run 90 loops w/o any errors.
> Back to btrfs:
> 
> - I could restore pretty much all data with "btrfs restore", except
> for some virtualbox disk images
> - "btrfs check --init-extent-tree" took some hours to finish, but I
> still couldn't mount the partition due to multiple "corrupt leaf"
> errors

That's due to a bug in btrfs-progs where extent item generation is not
reset properly.

You can either use the devel branch
https://github.com/kdave/btrfs-progs/tree/devel

Or at least apply this commit to fix it, while without using all other
patches which may break --init-extent-tree.
https://github.com/kdave/btrfs-progs/commit/8d45dc270a3791d7217625190c9fc8f7cc129285

Or, you can just use v5.3 to skip such warning and do a full balance to
reset the whole extent tree and call it a day.

Thanks,
Qu

> - mounting with "-o backuproot" resulted in the same error
> - "btrfs rescue super-recover" said everything was fine
> - after "btrfs rescue chunk-recover" or "btrfs check --repair" there
> was only 1 "corrupt leaf" error left, but mounting was still not
> possible
> 
> So basically the mount errors after "btrfs check --init-extent-tree"
> and all later commands looked like this:
> 
> [64385.439530] BTRFS critical (device nvme0n1p3): corrupt leaf:
> block=156450816 slot=30 extent bytenr=51548897280 len=262144 invalid
> generation, have 315981823 expect (0, 2265510]
> [64385.440779] BTRFS error (device nvme0n1p3): block=156450816 read
> time tree block corruption detected
> [64385.440785] BTRFS error (device nvme0n1p3): failed to read block groups: -5
> [64385.493696] BTRFS error (device nvme0n1p3): open_ctree failed
> mount: /mnt/nvme: wrong fs type, bad option, bad superblock on
> /dev/nvme0n1p3, missing codepage or helper program, or other error.
> 
> Then I gave up and called mkfs.btrfs. Currently the restored data is
> on its way back to the device.
> 

Attachment: signature.asc
Description: OpenPGP digital signature


[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