From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Duncan <1i5t5.duncan@cox.net>, linux-btrfs@vger.kernel.org
Subject: Re: raid1 degraded mount still produce single chunks, writeable mount not allowed
Date: Thu, 2 Mar 2017 20:26:49 +0300 [thread overview]
Message-ID: <7247209c-cd17-d8c6-5f51-a77ff2d9242e@gmail.com> (raw)
In-Reply-To: <pan$a4f49$5a6ddd0a$2183c48a$5df333ac@cox.net>
02.03.2017 16:41, Duncan пишет:
> Chris Murphy posted on Wed, 01 Mar 2017 17:30:37 -0700 as excerpted:
>
>> [1717713.408675] BTRFS warning (device dm-8): missing devices (1)
>> exceeds the limit (0), writeable mount is not allowed
>> [1717713.446453] BTRFS error (device dm-8): open_ctree failed
>>
>> [chris@f25s ~]$ uname
>> -r 4.9.8-200.fc25.x86_64
>>
>> I thought this was fixed. I'm still getting a one time degraded rw
>> mount, after that it's no longer allowed, which really doesn't make any
>> sense because those single chunks are on the drive I'm trying to mount.
>> I don't understand what problem this proscription is trying to avoid. If
>> it's OK to mount rw,degraded once, then it's OK to allow it twice. If
>> it's not OK twice, it's not OK once.
>
> AFAIK, no, it hasn't been fixed, at least not in mainline, because the
> patches to fix it got stuck in some long-running project patch queue
> (IIRC, the one for on-degraded auto-device-replace), with no timeline
> known to me on mainline merge.
>
> Meanwhile, the problem as I understand it is that at the first raid1
> degraded writable mount, no single-mode chunks exist, but without the
> second device, they are created.
Is not it the root cause? I would expect it to create degraded mirrored
chunks that will be synchronized when second device is added back.
(It's not clear to me whether they are
> created with the first write, that is, ignoring any space in existing
> degraded raid1 chunks, or if that's used up first and the single-mode
> chunks only created later, when a new chunk must be allocated to continue
> writing as the old ones are full.)
>
> So the first degraded-writable mount is allowed, because no single-mode
> chunks yet exist, while after such single-mode chunks are created, the
> existing dumb algorithm won't allow further writable mounts, because it
> sees single-mode chunks on a multi-device filesystem, and never mind that
> all the single mode chunks are there, it simply doesn't check that and
> won't allow writable mount because some /might/ be on the missing device.
>
> The patches stuck in queue would make btrfs more intelligent about that,
> having it check each chunk as listed in the chunk tree, and if at least
> one copy is available (as would be the case for single-mode chunks
> created after the degraded mount), writable mount would still be
> allowed. But... that's stuck in a long running project queue with no
> known timetable for merging... <grumble, grumble>... so the only way to
> get it is to go find and merge them yourself, in your own build.
>
Will it replicate single mode chunks when second device is added?
next prev parent reply other threads:[~2017-03-02 17:26 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 0:30 raid1 degraded mount still produce single chunks, writeable mount not allowed Chris Murphy
2017-03-02 10:37 ` Adam Borowski
2017-03-03 5:56 ` Kai Krakow
2017-03-03 10:13 ` Adam Borowski
2017-03-03 12:19 ` Austin S. Hemmelgarn
2017-03-03 20:10 ` Kai Krakow
2017-03-06 13:07 ` Austin S. Hemmelgarn
2017-03-02 13:41 ` Duncan
2017-03-02 17:26 ` Andrei Borzenkov [this message]
2017-03-02 17:58 ` Austin S. Hemmelgarn
2017-03-03 0:47 ` Peter Grandi
2017-03-03 1:15 ` Chris Murphy
2017-03-03 1:18 ` Qu Wenruo
2017-03-03 1:48 ` Chris Murphy
2017-03-04 4:38 ` Chris Murphy
2017-03-04 9:55 ` waxhead
2017-03-03 3:38 ` Duncan
2017-03-03 12:38 ` Austin S. Hemmelgarn
2017-03-05 19:13 ` Peter Grandi
2017-03-05 19:55 ` Peter Grandi
2017-03-06 13:18 ` Austin S. Hemmelgarn
2017-03-09 9:49 ` Peter Grandi
2017-03-09 13:54 ` Austin S. Hemmelgarn
2017-03-03 10:16 ` Anand Jain
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=7247209c-cd17-d8c6-5f51-a77ff2d9242e@gmail.com \
--to=arvidjaar@gmail.com \
--cc=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;
as well as URLs for NNTP newsgroup(s).