From: Hugo Mills <hugo@carfax.org.uk>
To: Cesar Strauss <cesar.strauss@inpe.br>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Unable to mount, corrupt leaf
Date: Tue, 28 May 2019 18:54:03 +0000 [thread overview]
Message-ID: <20190528185403.GE21741@carfax.org.uk> (raw)
In-Reply-To: <23b224cf-1e0f-267f-8fbb-74eaf2b6937a@inpe.br>
[-- Attachment #1: Type: text/plain, Size: 2716 bytes --]
On Tue, May 28, 2019 at 03:39:36PM -0300, Cesar Strauss wrote:
> Hello,
>
> After a BTRFS partition becoming read-only under use, it cannot be
> mounted anymore.
>
> The output is:
>
> # mount /dev/sdb5 /mnt/disk1
> mount: /mnt/disk1: wrong fs type, bad option, bad superblock on
> /dev/sdb5, missing codepage or helper program, or other error.
>
> Kernel output:
> [ 2042.106654] BTRFS info (device sdb5): disk space caching is enabled
> [ 2042.799537] BTRFS critical (device sdb5): corrupt leaf: root=2
> block=199940210688 slot=31, unexpected item end, have 268450090
> expect 14634
You have bad RAM.
The item end it's got on the disk:
>>> hex(268450090)
'0x1000392a'
The item end it should have (based on the other items and their
lengths and positions):
>>> hex(14634)
'0x392a'
The good checksum on the block (it hasn't complained about the
csum, so it's good) indicates that the corruption happened in memory
at some point. The bit-flip in the data would strongly suggest that
it's caused by a stuck memory cell -- i.e. bad hardware.
Run memtest86 for a minimum of 8 hours (preferably 24) and see what
shows up. Then fix the hardware.
Hugo.
> [ 2042.807879] BTRFS critical (device sdb5): corrupt leaf: root=2
> block=199940210688 slot=31, unexpected item end, have 268450090
> expect 14634
> [ 2042.807947] BTRFS error (device sdb5): failed to read block groups: -5
> [ 2042.832362] BTRFS error (device sdb5): open_ctree failed
>
> # btrfs check /dev/sdb5
> Opening filesystem to check...
> incorrect offsets 14634 268450090
> incorrect offsets 14634 268450090
> incorrect offsets 14634 268450090
> incorrect offsets 14634 268450090
> ERROR: cannot open file system
>
> Giving -s and -b options to "btrfs check" made no difference.
>
> The usebackuproot mount option made no difference.
>
> "btrfs restore" was successful in recovering most of the files,
> except for a couple instances of "Error copying data".
>
> System information:
>
> OS: Arch Linux
>
> $ uname -a
> Linux rescue 5.1.4-arch1-1-ARCH #1 SMP PREEMPT Wed May 22 08:06:56
> UTC 2019 x86_64 GNU/Linux
>
> $ btrfs --version
> btrfs-progs v5.1
>
> I have since updated the kernel, with no difference:
>
> $ uname -a
> Linux rescue 5.1.5-arch1-2-ARCH #1 SMP PREEMPT Mon May 27 03:37:39
> UTC 2019 x86_64 GNU/Linux
>
> Before making any recovery attempts, or even restoring from backup,
> I would like to ask for the best option to proceed.
>
> Thanks,
>
> Cesar
--
Hugo Mills | You've read the project plan. Forget that. We're
hugo@... carfax.org.uk | going to Do Stuff and Have Fun doing it.
http://carfax.org.uk/ |
PGP: E2AB1DE4 | Jeremy Frey
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2019-05-28 18:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 18:39 Unable to mount, corrupt leaf Cesar Strauss
2019-05-28 18:54 ` Hugo Mills [this message]
2019-05-28 19:25 ` Cesar Strauss
2019-05-28 18:56 ` Hans van Kranenburg
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=20190528185403.GE21741@carfax.org.uk \
--to=hugo@carfax.org.uk \
--cc=cesar.strauss@inpe.br \
--cc=linux-btrfs@vger.kernel.org \
/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