Mailinglist Archive: yast-devel (18 mails)

< Previous Next >
Re: [yast-devel] Mounting Btrfs subvolumes when there are no snapshots
On Wed, Oct 14, 2020 at 4:56 AM Ancor Gonzalez Sosa <ancor@xxxxxxx> wrote:

As part of the current effort to improve how we display Btrfs subvolumes
in the Partitioner I was checking how we mount them.

We always create a fstab entry for each subvolume like /home, /var...
That makes a lot of sense when the system has support for snapshots,
because the default subvolume is .snapshots/1/snapshot, so those fstab
entries are needed to make the content of each subvolume available in
the expected location.

But when there are no snapshots, the default subvolume is the top-level
one (in openSUSE) or the "@" (in SLE). All other subvolumes are children
of that one, which means their content would be already available in the
expected location. But still we redundantly mount all those subvolumes
via fstab. I find that not only redundant but even confusing. If the
users decides to umount, let's say, /home... they will see the content
is still there after unmounting, which may be puzzling.

Does somebody know what's the purpose of mounting those subvolumes when
there are no snapshots?

Well, ignoring that I think that the openSUSE layout hierarchy
probably doesn't make sense to begin with... I believe the reason for
creating the fstab entries is so that people know how to partially
mount the filesystem for data recovery purposes. Without those mount
point descriptions, it's not particularly easy to figure out how to do

But yeah, when implementing Btrfs for Fedora, I deliberately did not
copy the idea of nesting the subvolumes because it provides little
value and makes things somewhat confusing. The behavior around nested
subvolumes is weird to me, and not necessarily intuitive. Instead, all
subvolumes in the Fedora layout are top-level and quite simple,
mapping cleanly to how partitions work and making it very
straightforward and reasonable for having fstab(5) entries and not
causing surprising behavior if snapshotting is configured.

真実はいつも一つ!/ Always, there's only one truth!
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >