From: Eric Levy <contact@ericlevy.name>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: property designating root subvolumes
Date: Mon, 14 Nov 2022 18:23:55 -0500 [thread overview]
Message-ID: <VB2DLR.FVM1D1665BSY2@ericlevy.name> (raw)
The file system allows one subvolume per partition to be designated as
the default, and no more than one would be sensible. Generally, for
partitions organized with a base file hierarchy constituted of multiple
subvolumes, the one representing the root mount would be designated as
the default. Although this association is not required, it is a
reasonable assumption, enough so that some tools depend on it for
certain features. For example, the rEFInd bootloader scans a BTRFS file
system for a Linux-based OS by attempting to identify a root file
hierarchy on the default subvolume. However, in such usage, the
constraint of one subvolume designated per partition is limiting. In
principle, a bootloader might support multiple operating systems
installed on the same partition, as long as each root partition may be
separately indicated. To support such usage, it might be helpful if a
property, separate from the designation of a default subvolume, was
supported. As a property, it would be allowed to be assigned
arbitrarily to any number of subvolumes.
Presently, rEFInd supports multiple operating systems on different
subvolumes of the same partition only by static configuration. Such a
constraint is particularly cumbersome because any operation for
installing the bootloader utilizes configuration only on the active
operating system.
In principle, the broader concept might be extended further, adding
even more properties, for supporting yet further use cases. As one
example, a subvolume might be selected as containing configuration
information applicable to the bootloader, regardless of the active
operating system. Such a feature would facilitate synchronization of
bootloader settings for installation tools across all operating systems
on a partition. Yet, even the single new property would support cleaner
semantics for greater flexibility of usage.
Note that for such a feature to work properly, the file system would
need to enforce that the property not be inherited by child volumes,
that is, snapshots derived from a subvolume with the property enabled.
Furthermore, some thought must be given to the case of the user
enabling the property for a subvolume having an ancestor with the
property already enabled. In such a case, it most likely is desired
that the property would be disabled for the ancestor.
next reply other threads:[~2022-11-14 23:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 23:23 Eric Levy [this message]
2022-11-15 17:50 ` property designating root subvolumes Andrei Borzenkov
2022-11-15 18:13 ` Eric Levy
2022-11-15 18:23 ` Goffredo Baroncelli
2022-11-15 18:45 ` Eric Levy
2022-11-16 19:09 ` Goffredo Baroncelli
2022-11-16 21:08 ` Eric Levy
2022-11-16 21:37 ` Graham Cobb
2022-11-16 23:00 ` Eric Levy
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=VB2DLR.FVM1D1665BSY2@ericlevy.name \
--to=contact@ericlevy.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