From: Chris Murphy <lists@colorremedies.com>
To: Hendrik Friedel <hendrik@friedels.name>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Debian Jessie: How to set rootflags=degraded
Date: Tue, 16 Aug 2016 13:39:54 -0600 [thread overview]
Message-ID: <CAJCQCtRmcHCKGRUSFfDhCs8iy5nTvW2HTQnWsDF1N7f_s03G1Q@mail.gmail.com> (raw)
In-Reply-To: <em5669168d-5565-4286-9e94-0d18f614ee57@laptophendrik>
On Tue, Aug 16, 2016 at 1:31 PM, Hendrik Friedel <hendrik@friedels.name> wrote:
> Hello,
>
> I am using a raid1 under debian Jessie, because I need to decrease the
> likelyhood of unavailability of the system.
> Unfortunately I found, that when removing one of the drives, the system will
> not boot up. Instead initramfs will show up and tell me that the root volume
> could not be mounted.
>
> I read here:
> https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg31265.html
> that adding rootflags=degraded.
>
> Furthermore I see that this is not yet default -at least in Ubuntu-
> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1229456?comments=all
>
> But that it should work by modifying /etc/grub.d/10_linux:
> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1229456/comments/3
> GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol},degraded
> ${GRUB_CMDLINE_LINUX}"
>
> when doing that and running grub-mkconfig and update-grub, I still get no
> entry with with "degraded" in /etc/grub.cfg.
Well it belongs in /boot/grub2/grub.cfg so maybe you're looking at a
stale file? Otherwise I'm not sure why it wouldn't include degraded.
>
> Can someone tell me, how to achieve this? I've been seaching for very long
> now and I am surprised, that I don't find any answer.
The additional issue is that there's a udev rule (check the archives)
that prevents the volume from being considered ready unless all
devices are found. So even with degraded, out of the box this won't
boot on systemd systems at least, because the mount attempt never
happens. Just be aware that booting degraded unattended really isn't a
great idea because Btrfs doesn't have any concept right now of faulty
devices, so it's likely to cause more problems than it solves. If for
any reason one of the drives becomes available slightly later than the
other, using degraded by default can cause an otherwise healthy volume
to be mounted degraded, SILENTLY. And if this happens to alternate
devices where both devices get separately modified while degraded,
it'll corrupt the entire file system. So you're really better off
choosing another solution until Btrfs matures with this use case in
mind.
--
Chris Murphy
prev parent reply other threads:[~2016-08-16 19:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 19:31 Debian Jessie: How to set rootflags=degraded Hendrik Friedel
2016-08-16 19:39 ` Chris Murphy [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=CAJCQCtRmcHCKGRUSFfDhCs8iy5nTvW2HTQnWsDF1N7f_s03G1Q@mail.gmail.com \
--to=lists@colorremedies.com \
--cc=hendrik@friedels.name \
--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).