From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Several questions regarding btrfs
Date: Wed, 1 Nov 2017 12:15:02 +0000 (UTC) [thread overview]
Message-ID: <pan$8b220$9c430bf3$f61d549b$3a5859fa@cox.net> (raw)
In-Reply-To: 1509480384.1662.84.camel@gmail.com
ST posted on Tue, 31 Oct 2017 22:06:24 +0200 as excerpted:
> Also another questions in this regard - I tried to "set-default" and
> then reboot and it worked nice - I landed indeed in the snapshot, not
> top-level volume. However /etc/fstab didn't change and actually showed
> that top-level volume should have been mounted instead. It seems that
> "set-default" has higher precedence than fstab...
> 1. is it true?
> 2. how do they actually interact?
> 3. such a discrepancy disturbs me, so how should I tune fstab to reflect
> the change? Or maybe I should not?
For most distros, for root, the /etc/fstab entry is a dummy of sorts.
The kernel must have the information for root before it can read
/etc/fstab, and it's usually either fed to the kernel on the kernel
commandline (via root=, rootfstype= and rootflags=) or configured in the
initr*, tho those may be indirectly sourced from /etc/fstab via scripts
that set them up, and there's a kernel default that applies without a
configured commandline, that distros may setup for their own defaults.
The /etc/fstab entry may be used when remounting root writable, as it's
normally mounted read-only first and only remounted writable later, but
some distros may either do that without reading the fstab entry as well,
or be configured to leave root mounted read-only (as I've configured my
system here, on gentoo).
So presumably whatever's actually being used by your kernel to find the
root to mount, the commandline, the initr*, or the configured kernel
defaults, doesn't have a specific subvolume option and (for btrfs), is
simply depending on the btrfs default subvolume being pointed at the
right subvolume. As such, configuring btrfs to point at a different
subvolume "just works", since it's just using the filesystem default
subvolume in the first place.
Which should work fine as long as whatever configured default subvolume
ends up having a valid root configuration. I'd thus be most worried
about testing that you can point it at whatever you are using as a backup
and/or emergency boot and maintenance image, and successfully boot from
that, should the default subvolume get screwed up and become unbootable
for whatever reason. Of course that'll require being able to either know
where the kernel is getting its root information in ordered to change it,
or at minimum, being able to successfully override it with a higher
priority config, when necessary.
--
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
next prev parent reply other threads:[~2017-11-01 12:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-31 16:23 Several questions regarding btrfs ST
2017-10-31 17:45 ` Austin S. Hemmelgarn
2017-10-31 18:51 ` Andrei Borzenkov
2017-10-31 19:07 ` Austin S. Hemmelgarn
2017-10-31 20:06 ` ST
2017-11-01 12:01 ` Austin S. Hemmelgarn
2017-11-01 14:05 ` ST
2017-11-01 15:31 ` Lukas Pirl
2017-11-01 17:20 ` Austin S. Hemmelgarn
2017-11-02 9:09 ` ST
2017-11-02 11:01 ` Austin S. Hemmelgarn
2017-11-02 15:59 ` ST
[not found] ` <E7316F3D-708C-4D5E-AB4B-F54B0B8471C1@rqc.ru>
2017-11-02 16:28 ` ST
2017-11-02 17:13 ` Austin S. Hemmelgarn
2017-11-02 17:32 ` Andrei Borzenkov
2017-11-01 17:52 ` Andrei Borzenkov
2017-11-01 18:28 ` Austin S. Hemmelgarn
2017-11-01 12:15 ` Duncan [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-10-31 16:29 ST
2017-11-06 21:48 ` waxhead
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$8b220$9c430bf3$f61d549b$3a5859fa@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;
as well as URLs for NNTP newsgroup(s).