From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: btrfs check inconsistency with raid1, part 1
Date: Mon, 14 Dec 2015 11:51:57 +0000 (UTC) [thread overview]
Message-ID: <pan$c4332$ebbeb2d6$2298daa7$4db71b7a@cox.net> (raw)
In-Reply-To: CAJCQCtRzQ=9NbaaajPuoP2KOCvOd_rFT6P990aU=-EOo8dKS1A@mail.gmail.com
Chris Murphy posted on Mon, 14 Dec 2015 00:24:21 -0700 as excerpted:
>> Personally speaking, it may be a false alert from btrfsck.
>> So in this case, I can't provide much help.
>>
>> If you're brave enough, mount it rw to see what will happen(although it
>> may mount just OK).
>
> I'm brave enough. I'll give it a try tomorrow unless there's another
> request for more info before then.
Given the off-by-one generations and my own btrfs raid1 experience, I'm
guessing the likely result is a good mount and either no problems or a
good initial mount but lockup once you try actually doing too much (like
actually reading the affected blocks) with the filesystem.
Looks like a normal generation-out-of-sync condition, common with forced
unsynced/not-remounted-ro shutdowns. If so, btrfs should redirect reads
to the updated current generation device, but you'll need to do a scrub
to get everything 100% back in sync.
The catch I found, at least when I still had the then-failing (but not
failed, it was just finding more and more sectors that needed redirected
to spares) ssd still in my raid1, also with an on-boot service that read
a rather large dir into cache, was that after so many errors from the
failing device, instead of continuing to redirect errors to the good
device, btrfs just gives up, which resulted in a system crash, here.
But when there weren't that many errors on the failing device, or when I
intercepted the boot process and mounted everything but didn't run normal
post-mount services (systemd emergency target instead of my usual default
multi-user) so the service that cached that dir didn't have a chance to
run, so all those errors didn't trigger, I could still mount normally,
and from there, I could run scrub, which took care of the problem without
triggering the usual too many errors crash, and after scrub, I could
invoke normal multi-user mode and start all services including the
caching service, and go about my usual business.
So if I'm correct, mount normally and scrub, and you should be fine, tho
you may have to abort a normal boot if it accesses too many bad files, in
ordered to be able to finish the scrub before a crash.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
prev parent reply other threads:[~2015-12-14 11:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 4:16 btrfs check inconsistency with raid1, part 1 Chris Murphy
2015-12-14 5:48 ` Qu Wenruo
2015-12-14 7:24 ` Chris Murphy
2015-12-14 8:04 ` Qu Wenruo
2015-12-14 17:59 ` Chris Murphy
2015-12-20 22:32 ` Chris Murphy
[not found] ` <CAJCQCtSEx_wYPkfazik0bcpQwXxJCA=O5f0o6RbxON4jjB4q7A@mail.gmail.com>
[not found] ` <5677592F.5000202@cn.fujitsu.com>
2015-12-21 2:12 ` Chris Murphy
2015-12-21 2:23 ` Qu Wenruo
2015-12-21 2:46 ` Chris Murphy
2015-12-22 1:05 ` Kai Krakow
2015-12-22 1:22 ` Qu Wenruo
2015-12-22 1:48 ` Kai Krakow
2015-12-22 2:15 ` Qu Wenruo
2015-12-22 4:21 ` Chris Murphy
2015-12-22 10:23 ` Duncan
2015-12-22 15:44 ` Austin S. Hemmelgarn
2015-12-29 21:33 ` Chris Murphy
2015-12-14 11:51 ` Duncan [this message]
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='pan$c4332$ebbeb2d6$2298daa7$4db71b7a@cox.net' \
--to=1i5t5.duncan@cox.net \
--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