[yast-devel] Mounting Btrfs subvolumes when there are no snapshots
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? Cheers -- Ancor González Sosa YaST Team at SUSE Software Solutions -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Wed, Oct 14, 2020 at 4:56 AM Ancor Gonzalez Sosa <ancor@suse.de> 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 it. 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@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Wed, Oct 14, 2020 at 10:56:23AM +0200, Ancor Gonzalez Sosa 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.
The default subvolume was not .snapshots/1/snapshot several years ago.
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.
I assume YaST did the same setup so that user can later install snapper and make rollbacks without having to fiddle with fstab first. ciao Arvin -- Arvin Schnell, <aschnell@suse.com> Senior Software Engineer, Research & Development SUSE Software Solutions Germany GmbH Maxfeldstraße 5 90409 Nürnberg Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (3)
-
Ancor Gonzalez Sosa
-
Arvin Schnell
-
Neal Gompa