[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: btrfs subvolume naming scheme



On 2016-04-23 23:51, Nicholas D Steeves wrote:
Ubuntu avoids using the default subvolume (subvol ID 5).  For the
rootfs their installer creates a subvol called @, for /home it creates
@home, etc.  In fstab the device is specified and subvol=@ is added to
the mount option to specify which subvolume gets mounted.  When the
volume is mounted without a subvol option, it mounts the whole tree.
The tree would be /btrfs/@ and /btrfs/@home if mounted from a rescue
disk.

I think avoiding the default subvolume is the sensible approach. It should be possible to reuse the volume by multiple root filesystems if needed. (Just like this is possible with LVM today.)

I'd personally prefer if we would only mount the btrfs filesystem once, but I don't know what the best guideline here is. If we mount it multiple times at different subvolumes, the output of mount is pretty confusing to the user. The user would of course still be free to mount additional arbitrary subvolumes later and end up with this state.

I think /var/log would be very sensible as a separate subvolume by default. Usually if you want to snapshot your rootfs, you really don't want log files to take part in the snapshotting. I suppose the same argument can be made about /home and a non-tmpfs /tmp. There are also people who want to push for all OS content to be located in /usr, but we still have a lot of content in /var so that doesn't seem feasible in the near time.

Kind regards and thanks for spawning these discussions
Philipp Kern


Reply to: