-
If
/dev/sda1
is a btrfs filesystem with subvol'sroot
andpersistent
-
And I've set the default subvol to
root
-
Also, I've mounted
/dev/sda1
(againroot
is default) to/
-
And I've mounted
/dev/sda1
subvolid=0 to/btrfs
, so I can access all the other subvols (yes/
now exists as a duplicate/btrfs/root
which I find desirable so everything in here is treated as being on the same filesystem)
What differences are there between:
-
mount /dev/sda1 -o subvol=persistent /persistent
-
mount --bind /btrfs/persistent /persistent
I'm thinking along the lines of not immediately seen differences, such as being treated differently on whether going into persistent
crosses to a different filesystem in a cp -x
(cp --one-file-system
). Both options should be treated as going into a different filesystem, so there's no difference here – I just discussed this as the kind of difference that might exist, one that isn't readily apparent.
Best Answer
If mount propagation is enabled (see
man mount_namespaces
) future submounts will be copied between the mounts if created using a bind mount.