]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mount: add details about mtab and --namespace to mount.8
authorKarel Zak <kzak@redhat.com>
Thu, 19 Jul 2018 09:41:31 +0000 (11:41 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 19 Jul 2018 09:41:31 +0000 (11:41 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/mount.8
sys-utils/umount.8

index a27fcf086072a3c88a1251633a657ff7e15b10cf..a04a11a67b40d3b533d2230dbd73fda2f24782c2 100644 (file)
@@ -238,11 +238,15 @@ and
 .B umount
 traditionally maintained a list of currently mounted filesystems in the file
 .IR /etc/mtab .
-This real mtab file is still supported, but on current Linux systems it is
-better to make it a symlink to
+The support for regular classic
+.IR /etc/mtab
+is completely disabled in compile time by default, because on current Linux
+systems it is better to make it a symlink to
 .I /proc/mounts
-instead, because a regular mtab file maintained in userspace cannot reliably
+instead. The regular mtab file maintained in userspace cannot reliably
 work with namespaces, containers and other advanced Linux features.
+If the regular mtab support is enabled than it's possible to
+use the file as well as the symlink.
 .sp
 If no arguments are given to
 .BR mount ,
@@ -648,6 +652,15 @@ is on a read-only filesystem.
 Perform mount in namespace specified by \fIns\fR.
 \fIns\fR is either PID of process running in that namespace
 or special file representing that namespace.
+.sp
+.BR mount (8)
+switches to the namespace when it reads /etc/fstab, writes /etc/mtab (or writes to /run/mount) and calls
+.BR mount(2)
+system call, otherwise it runs in the original namespace. It means that the target namespace does not have
+to contain any libraries or another requirements necessary to execute
+.BR mount(2)
+command.
+.sp
 See \fBnamespaces\fR(7) for more information.
 .TP
 .BR \-O , " \-\-test\-opts " \fIopts
@@ -2452,18 +2465,22 @@ to the mount.<suffix> helpers.  All other options are used in a
 comma-separated list as argument to the \fB\-o\fR option.
 
 .SH FILES
+See also "\fBThe files /etc/fstab, /etc/mtab and /proc/mounts\fR" section above.
 .TP 18n
 .I /etc/fstab
 filesystem table
 .TP
+.I /run/mount
+libmount private runtime directory
+.TP
 .I /etc/mtab
-table of mounted filesystems
+table of mounted filesystems or symlink to /proc/mounts
 .TP
 .I /etc/mtab\s+3~\s0
-lock file
+lock file (unused on systems with mtab symlink)
 .TP
 .I /etc/mtab.tmp
-temporary file
+temporary file (unused on systems with mtab symlink)
 .TP
 .I /etc/filesystems
 a list of filesystem types to try
index 18ed3a2398ec8ed33c91a26f6b306162f8fcf311..cad7d2aae1a5b37f1cf87b1a3cd1b5169989264a 100644 (file)
@@ -132,6 +132,15 @@ server or a network partition. Remounts of the share will not be possible.
 Perform umount in namespace specified by \fIns\fR.
 \fIns\fR is either PID of process running in that namespace
 or special file representing that namespace.
+.sp
+.BR umount (8)
+switches to the namespace when it reads /etc/fstab, writes /etc/mtab (or writes to /run/mount) and calls
+.BR umount(2)
+system call, otherwise it runs in the original namespace. It means that the target namespace does not have
+to contain any libraries or another requirements necessary to execute
+.BR umount(2)
+command.
+.sp
 See \fBnamespaces\fR(7) for more information.
 .TP
 .BR \-n , " \-\-no\-mtab"