]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mount: (man) add note about namespaces to subdir= desc
authorKarel Zak <kzak@redhat.com>
Fri, 28 Apr 2023 08:19:52 +0000 (10:19 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 28 Apr 2023 08:19:52 +0000 (10:19 +0200)
Addresses: https://github.com/util-linux/util-linux/pull/2198
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/mount.8.adoc

index e39ac766b6ddec9daacc6e31654abaa675d516ae..4b11ef9ae340e7b330b896113566b5d8430385a9 100644 (file)
@@ -698,7 +698,11 @@ ____
 Allow to make a target directory (mountpoint) if it does not exist yet. The optional argument _mode_ specifies the filesystem access mode used for *mkdir*(2) in octal notation. The default mode is 0755. This functionality is supported only for root users or when *mount* is executed without suid permissions. The option is also supported as *x-mount.mkdir*, but this notation is deprecated since v2.30. See also *--mkdir* command line option.
 
 **X-mount.subdir=**__directory__::
-Allow mounting sub-directory from a filesystem instead of the root directory. For now, this feature is implemented by temporary filesystem root directory mount in unshared namespace and then bind the sub-directory to the final mount point and umount the root of the filesystem. The sub-directory mount shows up atomically for the rest of the system although it is implemented by multiple *mount*(2) syscalls. This feature is EXPERIMENTAL.
+Allow mounting sub-directory from a filesystem instead of the root directory. For now, this feature is implemented by temporary filesystem root directory mount in unshared namespace and then bind the sub-directory to the final mount point and umount the root of the filesystem. The sub-directory mount shows up atomically for the rest of the system although it is implemented by multiple *mount*(2) syscalls.
++
+Note that this feature will not work in session with an unshared private mount namespace (after "unshare --mount). If you want to use it in a mount namespace, then it requires "unshare --mount --propagation shared".
++
+This feature is EXPERIMENTAL.
 
 *X-mount.owner*=_username_|_UID_, *X-mount.group*=_group_|_GID_::
 Set _mountpoint_'s ownership after mounting. Names resolved in the target mount namespace, see *-N*.