summaryrefslogtreecommitdiffstats
path: root/sys-utils/mount.8
diff options
context:
space:
mode:
authorKarel Zak2012-07-17 22:02:35 +0200
committerKarel Zak2012-07-17 22:02:35 +0200
commitaedeaa40d1cf5eb687a575b322a09a9a48ced623 (patch)
treeb7dba13be34a5afaa13486f524e11fcaaabea1f6 /sys-utils/mount.8
parentlibmount: allow to disable swap between source and target (diff)
downloadkernel-qcow2-util-linux-aedeaa40d1cf5eb687a575b322a09a9a48ced623.tar.gz
kernel-qcow2-util-linux-aedeaa40d1cf5eb687a575b322a09a9a48ced623.tar.xz
kernel-qcow2-util-linux-aedeaa40d1cf5eb687a575b322a09a9a48ced623.zip
mount: (new) add --source and --target
In some cases (for example if only one mount argument is given) may be mount request ambivalent: # mount /foo and fstab: /dev/sda5 /foo rw 0 0 /foo /bar bind 0 0 the new options allows to be more explicit # mount --target /foo (mounts /dev/sda5) # mount --source /foo (binds /foo to /bar) It's possible to use the options together # mount --source /dev/sda2 --target /home Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/mount.8')
-rw-r--r--sys-utils/mount.822
1 files changed, 21 insertions, 1 deletions
diff --git a/sys-utils/mount.8 b/sys-utils/mount.8
index 3ddd3f155..c8b6f41c8 100644
--- a/sys-utils/mount.8
+++ b/sys-utils/mount.8
@@ -99,7 +99,19 @@ If only directory or device is given, for example:
.RE
then mount looks for a mountpoint and if not found then for a device in the
-/etc/fstab file.
+/etc/fstab file. It's possible to use
+.B --target
+or
+.B --source
+options to avoid ambivalent interpretation of the given argument. For example
+.RS
+
+.br
+.BI "mount --target /mountpoint"
+.br
+
+.RE
+
.B The listing and help.
.RS
@@ -557,6 +569,10 @@ Tolerate sloppy mount options rather than failing. This will ignore
mount options not supported by a filesystem type. Not all filesystems
support this option. This option exists for support of the Linux
autofs\-based automounter.
+.IP "\fB\-\-source \fIsrc\fP"
+If only one argument for the mount command is given then the argument might be
+interpreted as target (mountpoint) or source (device). This option allows to
+explicitly define that the argument is mount source.
.IP "\fB\-r, \-\-read\-only\fP"
Mount the filesystem read-only. A synonym is
.BR "\-o ro" .
@@ -733,6 +749,10 @@ mounts all filesystems except those of type
and
.IR ext .
.RE
+.IP "\fB\-\-target \fIdir\fP"
+If only one argument for the mount command is given then the argument might be
+interpreted as target (mountpoint) or source (device). This option allows to
+explicitly define that the argument is mount target.
.IP "\fB\-O, \-\-test-opts \fIopts\fP"
Used in conjunction with
.BR \-a ,