From: Karel Zak Date: Fri, 28 Apr 2023 08:19:52 +0000 (+0200) Subject: mount: (man) add note about namespaces to subdir= desc X-Git-Tag: v2.39~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2186677456f2a03d6645874ccc3e675f204cdb5b;p=thirdparty%2Futil-linux.git mount: (man) add note about namespaces to subdir= desc Addresses: https://github.com/util-linux/util-linux/pull/2198 Signed-off-by: Karel Zak --- diff --git a/sys-utils/mount.8.adoc b/sys-utils/mount.8.adoc index e39ac766b6..4b11ef9ae3 100644 --- a/sys-utils/mount.8.adoc +++ b/sys-utils/mount.8.adoc @@ -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*.