On 2017-11-01 13:52, Andrei Borzenkov wrote:
01.11.2017 15:01, Austin S. Hemmelgarn пишет:
...
The default subvolume is what gets mounted if you don't specify a
subvolume to mount.  On a newly created filesystem, it's subvolume ID 5,
which is the top-level of the filesystem itself.  Debian does not
specify a subvo9lume in /etc/fstab during the installation, so setting
the default subvolume will control what gets mounted.  If you were to
add a 'subvolume=' or 'subvolid=' mount option to /etc/fstab for that
filesystem, that would override the default subvolume.

The reason I say to set the default subvolume instead of editing
/etc/fstab is a pretty simple one though.  If you edit /etc/fstab and
don't set the default subvolume, you will need to mess around with the
bootloader configuration (and possibly rebuild the initramfs) to make
the system bootable again, whereas by setting the default subvolume, the
system will just boot as-is without needing any other configuration
changes.

That breaks as soon as you have nested subvolumes that are not
explicitly mounted because they are lost in new snapshot.

Unless they have been created manually, there won't be any such subvolumes on a Debian system. Debian treats BTRFS no different from any other filesystem during the install, so you get no subvolumes whatsoever (in contrast to Fedora and SUSE treating BTRFS as a volume manager and not a filesystem, and thus having subvolumes all over the place in a default install).

Regardless of if you update /etc/fstab to point to the new subvolume or not, any old ones need to be either copied (the preferred method for stuff that isn't supposed to be equivalent to a separate filesystem), or have entries put in /etc/fstab.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to