From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Thorsten Hirsch <t.hirsch@web.de>, linux-btrfs@vger.kernel.org
Subject: Re: tree first key mismatch detected (reproducible error)
Date: Sun, 26 Jan 2020 21:03:28 +0800 [thread overview]
Message-ID: <f82e8a59-8d20-b689-4adb-6953cb6d6c88@gmx.com> (raw)
In-Reply-To: <CAH+WbHyR7HC0-S3oaamk+1omON+JrBbq-MYku1k4mxAdhWJTMA@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2062 bytes --]
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-01-26 13:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-25 11:37 tree first key mismatch detected (reproducible error) Thorsten Hirsch
2020-01-25 11:46 ` Andrei Borzenkov
2020-01-25 12:23 ` Qu Wenruo
2020-01-25 15:44 ` Thorsten Hirsch
2020-01-25 16:01 ` Martin Raiber
2020-01-26 11:17 ` Thorsten Hirsch
2020-01-26 13:03 ` Qu Wenruo [this message]
2020-01-25 12:15 ` Qu Wenruo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f82e8a59-8d20-b689-4adb-6953cb6d6c88@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=t.hirsch@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox