3544 lines
93 KiB
HTML
3544 lines
93 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of MOUNT</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>MOUNT</H1>
|
|
Section: System Administration (8)<BR>Updated: August 2015<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
mount - mount a filesystem
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>mount</B>
|
|
|
|
[<B>-l</B>|<B>-h</B>|<B>-V</B>]
|
|
|
|
<P>
|
|
|
|
<B>mount -a</B>
|
|
|
|
[<B>-fFnrsvw</B>]
|
|
|
|
[<B>-t</B>
|
|
|
|
<I>fstype</I>]
|
|
|
|
[<B>-O</B>
|
|
|
|
<I>optlist</I>]
|
|
|
|
<P>
|
|
|
|
<B>mount</B>
|
|
|
|
[<B>-fnrsvw</B>]
|
|
|
|
[<B>-o</B>
|
|
|
|
<I>options</I>]
|
|
|
|
<I>device</I>|<I>dir</I>
|
|
|
|
<P>
|
|
|
|
<B>mount</B>
|
|
|
|
[<B>-fnrsvw</B>]
|
|
|
|
[<B>-t</B>
|
|
|
|
<I>fstype</I><B>]</B>
|
|
|
|
[<B>-o</B>
|
|
|
|
<I>options</I>]
|
|
|
|
<I>device dir</I>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
All files accessible in a Unix system are arranged in one big
|
|
tree, the file hierarchy, rooted at
|
|
<I>/</I>.
|
|
|
|
These files can be spread out over several devices. The
|
|
<B>mount</B>
|
|
|
|
command serves to attach the filesystem found on some device
|
|
to the big file tree. Conversely, the
|
|
<B><A HREF="/cgi-bin/man/man2html?8+umount">umount</A></B>(8)
|
|
|
|
command will detach it again. The filesystem is used to control how data is
|
|
stored on the device or provided in a virtual way by network or another services.
|
|
<P>
|
|
The standard form of the
|
|
<B>mount</B>
|
|
|
|
command is:
|
|
<DL COMPACT><DT id="1"><DD>
|
|
<P>
|
|
<BR>
|
|
|
|
<B>mount -t</B><I> type device dir</I>
|
|
|
|
<BR>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
This tells the kernel to attach the filesystem found on
|
|
<I>device</I>
|
|
|
|
(which is of type
|
|
<I>type</I>)
|
|
|
|
at the directory
|
|
<I>dir</I>.
|
|
|
|
The option <B>-t </B><I>type</I> is optional. The
|
|
<B>mount</B>
|
|
|
|
command is usually able to detect a filesystem. The root permissions are necessary
|
|
to mount a filesystem by default. See section "Non-superuser mounts" below for more details.
|
|
The previous contents (if any) and owner and mode of
|
|
<I>dir</I>
|
|
|
|
become invisible, and as long as this filesystem remains mounted,
|
|
the pathname
|
|
<I>dir</I>
|
|
|
|
refers to the root of the filesystem on
|
|
<I>device</I>.
|
|
|
|
<P>
|
|
If only the directory or the device is given, for example:
|
|
<DL COMPACT><DT id="2"><DD>
|
|
<P>
|
|
<B>mount /dir</B>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
then <B>mount</B> looks for a mountpoint (and if not found then for a device) in the
|
|
<I>/etc/fstab</I>
|
|
|
|
file. It's possible to use the
|
|
<B>--target</B>
|
|
|
|
or
|
|
<B>--source</B>
|
|
|
|
options to avoid ambivalent interpretation of the given argument. For example:
|
|
<DL COMPACT><DT id="3"><DD>
|
|
<P>
|
|
<B>mount --target /mountpoint</B>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
<P>
|
|
The same filesystem may be mounted more than once, and in some cases (e.g.
|
|
network filesystems) the same filesystem may be mounted on the same
|
|
mountpoint more times. The mount command does not implement any policy to
|
|
control this behavior. All behavior is controlled bythe kernel and it is usually
|
|
specific to the filesystem driver. The exception is <B>--all</B>, in this case
|
|
already mounted filesystems are ignored (see <B>--all</B> below for more details).
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H3>Listing the mounts</H3>
|
|
|
|
The listing mode is maintained for backward compatibility only.
|
|
<P>
|
|
For more robust and customizable output use
|
|
<B><A HREF="/cgi-bin/man/man2html?8+findmnt">findmnt</A></B>(8),
|
|
|
|
<B>especially in your scripts</B>. Note that control characters in the
|
|
mountpoint name are replaced with '?'.
|
|
<P>
|
|
The following command lists all mounted filesystems (of type
|
|
<I>type</I>):
|
|
|
|
<DL COMPACT><DT id="4"><DD>
|
|
<P>
|
|
<B>mount </B>[<B>-l</B>] [<B>-t </B><I>type/</I>]
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
The option <B>-l</B> adds labels to this listing. See below.
|
|
<P>
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Indicating the device and filesystem</H3>
|
|
|
|
Most devices are indicated by a filename (of a block special device), like
|
|
<I>/dev/sda1</I>,
|
|
|
|
but there are other possibilities. For example, in the case of an NFS mount,
|
|
<I>device</I>
|
|
|
|
may look like
|
|
<I>knuth.cwi.nl:/dir</I>.
|
|
|
|
It is also possible to indicate a block special device using its filesystem label
|
|
or UUID (see the <B>-L</B> and <B>-U</B> options below), or its partition label
|
|
or UUID. Partition identifiers are supported for example for GUID Partition
|
|
Tables (GPT).
|
|
<P>
|
|
The device name of disk partitions are unstable; hardware reconfiguration,
|
|
adding or removing a device can cause change in names. This is reason why it's
|
|
strongly recommended to use filesystem or partition identificators like UUID or
|
|
LABEL.
|
|
<P>
|
|
The command <B>lsblk --fs</B> provides overview of filesystems, LABELs and UUIDs
|
|
on available block devices. The command <B>blkid -p <device></B> provides details about
|
|
a filesystem on the specified device.
|
|
<P>
|
|
Don't forget that there is no guarantee that UUIDs and labels are really
|
|
unique, especially if you move, share or copy the device. Use
|
|
<B>lsblk -o +UUID,PARTUUID</B>
|
|
|
|
to verify that the UUIDs are really unique in your system.
|
|
<P>
|
|
The recommended setup is to use tags (e.g. <B>UUID=</B><I>uuid</I>) rather than
|
|
<I>/dev/disk/by-{label,uuid,partuuid,partlabel}</I>
|
|
|
|
udev symlinks in the
|
|
<I>/etc/fstab</I>
|
|
|
|
file. Tags are
|
|
more readable, robust and portable. The
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8)
|
|
|
|
command internally uses udev
|
|
symlinks, so the use of symlinks in /etc/fstab has no advantage over tags.
|
|
For more details see
|
|
<B><A HREF="/cgi-bin/man/man2html?3+libblkid">libblkid</A></B>(3).
|
|
|
|
<P>
|
|
Note that
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8)
|
|
|
|
uses UUIDs as strings. The UUIDs from the command line or from
|
|
<B><A HREF="/cgi-bin/man/man2html?5+fstab">fstab</A></B>(5)
|
|
|
|
are not converted to internal binary representation. The string representation
|
|
of the UUID should be based on lower case characters.
|
|
<P>
|
|
The
|
|
<I>proc</I>
|
|
|
|
filesystem is not associated with a special device, and when
|
|
mounting it, an arbitrary keyword, such as
|
|
<I>proc</I>
|
|
|
|
can be used instead of a device specification.
|
|
(The customary choice
|
|
<I>none</I>
|
|
|
|
is less fortunate: the error message `none already mounted' from
|
|
<B>mount</B>
|
|
|
|
can be confusing.)
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H3>The files /etc/fstab, /etc/mtab and /proc/mounts</H3>
|
|
|
|
The file
|
|
<I>/etc/fstab</I>
|
|
|
|
(see
|
|
<B><A HREF="/cgi-bin/man/man2html?5+fstab">fstab</A></B>(5)),
|
|
|
|
may contain lines describing what devices are usually
|
|
mounted where, using which options. The default location of the
|
|
<B><A HREF="/cgi-bin/man/man2html?5+fstab">fstab</A></B>(5)
|
|
|
|
file can be overridden with the
|
|
<B>--fstab</B><I> path</I>
|
|
|
|
command-line option (see below for more details).
|
|
<P>
|
|
|
|
The command
|
|
<DL COMPACT><DT id="5"><DD>
|
|
<P>
|
|
<B>mount -a</B>
|
|
|
|
[<B>-t</B>
|
|
|
|
<I>type</I>]
|
|
|
|
[<B>-O</B>
|
|
|
|
<I>optlist</I>]
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
(usually given in a bootscript) causes all filesystems mentioned in
|
|
<I>fstab</I>
|
|
|
|
(of the proper type and/or having or not having the proper options)
|
|
to be mounted as indicated, except for those whose line contains the
|
|
<B>noauto</B>
|
|
|
|
keyword. Adding the
|
|
<B>-F</B>
|
|
|
|
option will make <B>mount</B> fork, so that the
|
|
filesystems are mounted simultaneously.
|
|
<P>
|
|
|
|
When mounting a filesystem mentioned in
|
|
<I>fstab</I>
|
|
|
|
or
|
|
<I>mtab</I>,
|
|
|
|
it suffices to specify on the command line only the device, or only the mount point.
|
|
<P>
|
|
The programs
|
|
<B>mount</B>
|
|
|
|
and
|
|
<B>umount</B>
|
|
|
|
traditionally maintained a list of currently mounted filesystems in the file
|
|
<I>/etc/mtab</I>.
|
|
|
|
The support for regular classic
|
|
<I>/etc/mtab</I>
|
|
|
|
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</I>
|
|
|
|
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.
|
|
<P>
|
|
If no arguments are given to
|
|
<B>mount</B>,
|
|
|
|
the list of mounted filesystems is printed.
|
|
<P>
|
|
If you want to override mount options from
|
|
<I>/etc/fstab</I>
|
|
|
|
you have to use the <B>-o</B> option:
|
|
<DL COMPACT><DT id="6"><DD>
|
|
<P>
|
|
<B>mount</B><I> device</I><B></B>|<I>dir </I><B>-o</B><I> options</I>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
and then the mount options from the command line will be appended to
|
|
the list of options from
|
|
<I>/etc/fstab</I>.
|
|
|
|
This default behaviour is possible to change by command line
|
|
option <B>--options-mode</B>.
|
|
The usual behavior is that the last option wins if there are conflicting
|
|
ones.
|
|
<P>
|
|
The
|
|
<B>mount</B>
|
|
|
|
program does not read the
|
|
<I>/etc/fstab</I>
|
|
|
|
file if both
|
|
<I>device</I>
|
|
|
|
(or LABEL, UUID, PARTUUID or PARTLABEL) and
|
|
<I>dir</I>
|
|
|
|
are specified. For example, to mount device
|
|
<B>foo</B> at <B>/dir</B>:
|
|
|
|
<DL COMPACT><DT id="7"><DD>
|
|
<P>
|
|
<B>mount /dev/foo /dir</B>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
This default behaviour is possible to change by command line option
|
|
<B>--options-source-force</B> to always read configuration from fstab. For
|
|
non-root users
|
|
<B>mount</B>
|
|
|
|
always read fstab configuration.
|
|
<P>
|
|
<A NAME="lbAH"> </A>
|
|
<H3>Non-superuser mounts</H3>
|
|
|
|
Normally, only the superuser can mount filesystems.
|
|
However, when
|
|
<I>fstab</I>
|
|
|
|
contains the
|
|
<B>user</B>
|
|
|
|
option on a line, anybody can mount the corresponding filesystem.
|
|
<P>
|
|
|
|
Thus, given a line
|
|
<DL COMPACT><DT id="8"><DD>
|
|
<P>
|
|
<B>/dev/cdrom /cd iso9660 ro,user,noauto,unhide</B>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
any user can mount the iso9660 filesystem found on an inserted CDROM
|
|
using the command:
|
|
<DL COMPACT><DT id="9"><DD>
|
|
<B>mount /cd</B>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
Note that <B>mount</B> is very strict about non-root users and all paths
|
|
specified on command line are verified before fstab is parsed or a helper
|
|
program is executed. It's strongly recommended to use a valid mountpoint to
|
|
specify filesystem, otherwise <B>mount</B> may fail. For example it's bad idea
|
|
to use NFS or CIFS source on command line.
|
|
<P>
|
|
|
|
For more details, see
|
|
<B><A HREF="/cgi-bin/man/man2html?5+fstab">fstab</A></B>(5).
|
|
|
|
Only the user that mounted a filesystem can unmount it again.
|
|
If any user should be able to unmount it, then use
|
|
<B>users</B>
|
|
|
|
instead of
|
|
<B>user</B>
|
|
|
|
in the
|
|
<I>fstab</I>
|
|
|
|
line.
|
|
The
|
|
<B>owner</B>
|
|
|
|
option is similar to the
|
|
<B>user</B>
|
|
|
|
option, with the restriction that the user must be the owner
|
|
of the special file. This may be useful e.g. for
|
|
<I>/dev/fd</I>
|
|
|
|
if a login script makes the console user owner of this device.
|
|
The
|
|
<B>group</B>
|
|
|
|
option is similar, with the restriction that the user must be
|
|
member of the group of the special file.
|
|
<P>
|
|
<A NAME="lbAI"> </A>
|
|
<H3>Bind mount operation</H3>
|
|
|
|
Remount part of the file hierarchy somewhere else. The call is:
|
|
<P>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
<BR>
|
|
|
|
<B>mount --bind</B>
|
|
|
|
<I>olddir newdir</I>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
or by using this fstab entry:
|
|
<P>
|
|
<DL COMPACT><DT id="11"><DD>
|
|
<BR>
|
|
|
|
<B>/</B><I>olddir</I>
|
|
|
|
<B>/</B><I>newdir</I>
|
|
|
|
<B>none bind</B>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
After this call the same contents are accessible in two places.
|
|
<P>
|
|
It is important to understand that "bind" does not to create any second-class
|
|
or special node in the kernel VFS. The "bind" is just another operation to
|
|
attach a filesystem. There is nowhere stored information that the filesystem
|
|
has been attached by "bind" operation. The <I>olddir</I> and <I>newdir</I> are
|
|
independent and the <I>olddir</I> may be umounted.
|
|
<P>
|
|
One can also remount a single file (on a single file). It's also
|
|
possible to use the bind mount to create a mountpoint from a regular
|
|
directory, for example:
|
|
<P>
|
|
<DL COMPACT><DT id="12"><DD>
|
|
<BR>
|
|
|
|
<B>mount --bind foo foo</B>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
The bind mount call attaches only (part of) a single filesystem, not possible
|
|
submounts. The entire file hierarchy including submounts is attached
|
|
a second place by using:
|
|
<P>
|
|
<DL COMPACT><DT id="13"><DD>
|
|
<BR>
|
|
|
|
<B>mount --rbind</B>
|
|
|
|
<I>olddir newdir</I>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
Note that the filesystem mount options maintained by kernel will remain the same as those
|
|
on the original mount point. The userspace mount options (e.g. _netdev) will not be copied
|
|
by
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8)
|
|
|
|
and it's necessary explicitly specify the options on mount command line.
|
|
<P>
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8)
|
|
|
|
since v2.27 allows to change the mount options by passing the
|
|
relevant options along with
|
|
<B>--bind</B>.
|
|
|
|
For example:
|
|
<P>
|
|
<DL COMPACT><DT id="14"><DD>
|
|
<BR>
|
|
|
|
<B>mount -o bind,ro foo foo</B>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
This feature is not supported by the Linux kernel; it is implemented in userspace
|
|
by an additional <B><A HREF="/cgi-bin/man/man2html?2+mount">mount</A></B>(2) remounting system call.
|
|
This solution is not atomic.
|
|
<P>
|
|
The alternative (classic) way to create a read-only bind mount is to use the remount
|
|
operation, for example:
|
|
<P>
|
|
<DL COMPACT><DT id="15"><DD>
|
|
<BR>
|
|
|
|
<B>mount --bind</B>
|
|
|
|
<I>olddir newdir</I>
|
|
|
|
<BR>
|
|
|
|
<B>mount -o remount,bind,ro</B>
|
|
|
|
<I>olddir newdir</I>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
Note that a read-only bind will create a read-only mountpoint (VFS entry),
|
|
but the original filesystem superblock will still be writable, meaning that the
|
|
<I>olddir</I>
|
|
|
|
will be writable, but the
|
|
<I>newdir</I>
|
|
|
|
will be read-only.
|
|
<P>
|
|
It's also possible to change nosuid, nodev, noexec, noatime, nodiratime and
|
|
relatime VFS entry flags by "remount,bind" operation. The another (for example
|
|
filesystem specific flags) are silently ignored. It's impossible to change mount
|
|
options recursively (for example with <B>-o rbind,ro</B>).
|
|
<P>
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8)
|
|
|
|
since v2.31 ignores the <B>bind</B> flag from
|
|
<I>/etc/fstab</I>
|
|
|
|
on
|
|
<B>remount operation</B>
|
|
|
|
(if "-o remount" specified on command line). This is necessary to fully control
|
|
mount options on remount by command line. In the previous versions the bind
|
|
flag has been always applied and it was impossible to re-define mount options
|
|
without interaction with the bind semantic. This
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8)
|
|
|
|
behavior does not affect situations when "remount,bind" is specified in the
|
|
<I>/etc/fstab</I>
|
|
|
|
file.
|
|
|
|
<P>
|
|
<A NAME="lbAJ"> </A>
|
|
<H3>The move operation</H3>
|
|
|
|
Move a
|
|
<B>mounted tree</B>
|
|
|
|
to another place (atomically). The call is:
|
|
<P>
|
|
<DL COMPACT><DT id="16"><DD>
|
|
<BR>
|
|
|
|
<B>mount --move</B>
|
|
|
|
<I>olddir newdir</I>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
This will cause the contents which previously appeared under
|
|
<I>olddir</I>
|
|
|
|
to now be accessible under
|
|
<I>newdir</I>.
|
|
|
|
The physical location of the files is not changed.
|
|
Note that
|
|
<I>olddir</I>
|
|
|
|
has to be a mountpoint.
|
|
<P>
|
|
Note also that moving a mount residing under a shared mount is invalid and
|
|
unsupported. Use
|
|
<B>findmnt -o TARGET,PROPAGATION</B>
|
|
|
|
to see the current propagation flags.
|
|
<P>
|
|
<A NAME="lbAK"> </A>
|
|
<H3>Shared subtree operations</H3>
|
|
|
|
Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared,
|
|
private, slave or unbindable. A shared mount provides the ability to create mirrors
|
|
of that mount such that mounts and unmounts within any of the mirrors propagate
|
|
to the other mirror. A slave mount receives propagation from its master, but
|
|
not vice versa. A private mount carries no propagation abilities. An
|
|
unbindable mount is a private mount which cannot be cloned through a bind
|
|
operation. The detailed semantics are documented in
|
|
<I>Documentation/filesystems/sharedsubtree.txt</I>
|
|
|
|
file in the kernel source tree.
|
|
<P>
|
|
Supported operations are:
|
|
<P>
|
|
<DL COMPACT><DT id="17"><DD>
|
|
<PRE>
|
|
<B>mount --make-shared </B><I>mountpoint</I>
|
|
<B>mount --make-slave </B><I>mountpoint</I>
|
|
<B>mount --make-private </B><I>mountpoint</I>
|
|
<B>mount --make-unbindable </B><I>mountpoint</I>
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
The following commands allow one to recursively change the type of all the
|
|
mounts under a given mountpoint.
|
|
<P>
|
|
<DL COMPACT><DT id="18"><DD>
|
|
<PRE>
|
|
<B>mount --make-rshared </B><I>mountpoint</I>
|
|
<B>mount --make-rslave </B><I>mountpoint</I>
|
|
<B>mount --make-rprivate </B><I>mountpoint</I>
|
|
<B>mount --make-runbindable </B><I>mountpoint</I>
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8)
|
|
|
|
<B>does not read</B>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+fstab">fstab</A></B>(5)
|
|
|
|
when a <B>--make-</B>* operation is requested. All necessary information has to be
|
|
specified on the command line.
|
|
<P>
|
|
Note that the Linux kernel does not allow to change multiple propagation flags
|
|
with a single
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mount">mount</A></B>(2)
|
|
|
|
system call, and the flags cannot be mixed with other mount options and operations.
|
|
<P>
|
|
Since util-linux 2.23 the <B>mount</B> command allows to do more propagation
|
|
(topology) changes by one <A HREF="/cgi-bin/man/man2html?8+mount">mount</A>(8) call and do it also together with other
|
|
mount operations. This feature is EXPERIMENTAL. The propagation flags are applied
|
|
by additional <B><A HREF="/cgi-bin/man/man2html?2+mount">mount</A></B>(2) system calls when the preceding mount operations
|
|
were successful. Note that this use case is not atomic. It is possible to
|
|
specify the propagation flags in
|
|
<B><A HREF="/cgi-bin/man/man2html?5+fstab">fstab</A></B>(5)
|
|
|
|
as mount options
|
|
(<B>private</B>,
|
|
|
|
<B>slave</B>,
|
|
|
|
<B>shared</B>,
|
|
|
|
<B>unbindable</B>,
|
|
|
|
<B>rprivate</B>,
|
|
|
|
<B>rslave</B>,
|
|
|
|
<B>rshared</B>,
|
|
|
|
<B>runbindable</B>).
|
|
|
|
<P>
|
|
For example:
|
|
<P>
|
|
<DL COMPACT><DT id="19"><DD>
|
|
<PRE>
|
|
<B>mount --make-private --make-unbindable /dev/sda1 /foo</B>
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
is the same as:
|
|
<P>
|
|
<DL COMPACT><DT id="20"><DD>
|
|
<PRE>
|
|
<B>mount /dev/sda1 /foox</B>
|
|
<B>mount --make-private /foo</B>
|
|
<B>mount --make-unbindable /foo</B>
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
<A NAME="lbAL"> </A>
|
|
<H2>COMMAND-LINE OPTIONS</H2>
|
|
|
|
The full set of mount options used by an invocation of
|
|
<B>mount</B>
|
|
|
|
is determined by first extracting the
|
|
mount options for the filesystem from the
|
|
<I>fstab</I>
|
|
|
|
table, then applying any options specified by the
|
|
<B>-o</B>
|
|
|
|
argument, and finally applying a
|
|
<B>-r</B> or <B>-w</B>
|
|
|
|
option, when present.
|
|
<P>
|
|
The command <B>mount</B> does not pass all command-line options to the
|
|
<B>/sbin/mount.</B><I>suffix</I> mount helpers. The interface between <B>mount</B>
|
|
and the mount helpers is described below in the section <B>EXTERNAL HELPERS</B>.
|
|
<P>
|
|
Command-line options available for the
|
|
<B>mount</B>
|
|
|
|
command are:
|
|
<DL COMPACT>
|
|
<DT id="21"><B>-a</B>,<B> --all</B>
|
|
|
|
<DD>
|
|
Mount all filesystems (of the given types) mentioned in
|
|
<I>fstab</I>
|
|
|
|
(except for those whose line contains the
|
|
<B>noauto</B>
|
|
|
|
keyword). The filesystems are mounted following their order in
|
|
<I>fstab</I>.
|
|
|
|
The mount command compares filesystem source, target (and fs root for bind
|
|
mount or btrfs) to detect already mounted filesystems. The kernel table with
|
|
already mounted filesystems is cached during <B>mount --all</B>. It means
|
|
that all duplicated fstab entries will be mounted.
|
|
<P>
|
|
The option <B>--all</B> is possible to use for remount operation too. In this
|
|
case all filters (<B>-t</B> and <B>-O</B>) are applied to the table of already
|
|
mounted filesystems.
|
|
<P>
|
|
Note that it is a bad practice to use <B>mount -a</B> for
|
|
<I>fstab</I>
|
|
|
|
checking. The recommended solution is <B>findmnt --verify</B>.
|
|
<DT id="22"><B>-B</B>,<B> --bind</B>
|
|
|
|
<DD>
|
|
Remount a subtree somewhere else (so that its contents are available
|
|
in both places). See above, under <B>Bind mounts</B>.
|
|
<DT id="23"><B>-c</B>,<B> --no-canonicalize</B>
|
|
|
|
<DD>
|
|
Don't canonicalize paths. The mount command canonicalizes all paths
|
|
(from command line or fstab) by default. This option can be used
|
|
together with the
|
|
<B>-f</B>
|
|
|
|
flag for already canonicalized absolute paths. The option is designed for mount
|
|
helpers which call <B>mount -i</B>. It is strongly recommended to not use this
|
|
command-line option for normal mount operations.
|
|
<P>
|
|
Note that <B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8) does not pass this option to the
|
|
<B>/sbin/mount.</B><I>type</I> helpers.
|
|
<DT id="24"><B>-F</B>,<B> --fork</B>
|
|
|
|
<DD>
|
|
(Used in conjunction with
|
|
<B>-a</B>.)
|
|
|
|
Fork off a new incarnation of <B>mount</B> for each device.
|
|
This will do the mounts on different devices or different NFS servers
|
|
in parallel.
|
|
This has the advantage that it is faster; also NFS timeouts go in
|
|
parallel. A disadvantage is that the mounts are done in undefined order.
|
|
Thus, you cannot use this option if you want to mount both
|
|
<I>/usr</I>
|
|
|
|
and
|
|
<I>/usr/spool</I>.
|
|
|
|
<DT id="25"><B>-f, --fake</B><DD>
|
|
Causes everything to be done except for the actual system call; if it's not
|
|
obvious, this ``fakes'' mounting the filesystem. This option is useful in
|
|
conjunction with the
|
|
<B>-v</B>
|
|
|
|
flag to determine what the
|
|
<B>mount</B>
|
|
|
|
command is trying to do. It can also be used to add entries for devices
|
|
that were mounted earlier with the <B>-n</B> option. The <B>-f</B> option
|
|
checks for an existing record in /etc/mtab and fails when the record already
|
|
exists (with a regular non-fake mount, this check is done by the kernel).
|
|
<DT id="26"><B>-i, --internal-only</B><DD>
|
|
Don't call the <B>/sbin/mount.</B><I>filesystem</I> helper even if it exists.
|
|
<DT id="27"><B>-L</B>,<B> --label </B><I>label</I>
|
|
|
|
<DD>
|
|
Mount the partition that has the specified
|
|
<I>label</I>.
|
|
|
|
<DT id="28"><B>-l</B>,<B> --show-labels</B>
|
|
|
|
<DD>
|
|
Add the labels in the mount output. <B>mount</B> must have
|
|
permission to read the disk device (e.g. be set-user-ID root) for this to work.
|
|
One can set such a label for ext2, ext3 or ext4 using the
|
|
<B><A HREF="/cgi-bin/man/man2html?8+e2label">e2label</A></B>(8)
|
|
|
|
utility, or for XFS using
|
|
<B><A HREF="/cgi-bin/man/man2html?8+xfs_admin">xfs_admin</A></B>(8),
|
|
|
|
or for reiserfs using
|
|
<B><A HREF="/cgi-bin/man/man2html?8+reiserfstune">reiserfstune</A></B>(8).
|
|
|
|
<DT id="29"><B>-M</B>,<B> --move</B>
|
|
|
|
<DD>
|
|
Move a subtree to some other place. See above, the subsection
|
|
<B>The move operation</B>.
|
|
<DT id="30"><B>-n</B>,<B> --no-mtab</B>
|
|
|
|
<DD>
|
|
Mount without writing in
|
|
<I>/etc/mtab</I>.
|
|
|
|
This is necessary for example when
|
|
<I>/etc</I>
|
|
|
|
is on a read-only filesystem.
|
|
<DT id="31"><B>-N</B>,<B> --namespace </B><I>ns</I>
|
|
|
|
<DD>
|
|
Perform mount in namespace specified by <I>ns</I>.
|
|
<I>ns</I> is either PID of process running in that namespace
|
|
or special file representing that namespace.
|
|
<P>
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8)
|
|
|
|
switches to the namespace when it reads /etc/fstab, writes /etc/mtab (or writes to /run/mount) and calls
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mount">mount</A></B>(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
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mount">mount</A></B>(2)
|
|
|
|
command.
|
|
<P>
|
|
See <B><A HREF="/cgi-bin/man/man2html?7+namespaces">namespaces</A></B>(7) for more information.
|
|
<DT id="32"><B>-O</B>,<B> --test-opts </B><I>opts</I>
|
|
|
|
<DD>
|
|
Limit the set of filesystems to which the
|
|
<B>-a</B>
|
|
|
|
option applies. In this regard it is like the
|
|
<B>-t</B>
|
|
|
|
option except that
|
|
<B>-O</B>
|
|
|
|
is useless without
|
|
<B>-a</B>.
|
|
|
|
For example, the command:
|
|
<DL COMPACT><DT id="33"><DD>
|
|
<DL COMPACT><DT id="34"><DD>
|
|
<P>
|
|
<B>mount -a -O no_netdev</B>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
mounts all filesystems except those which have the option
|
|
<I>_netdev</I>
|
|
|
|
specified in the options field in the
|
|
<I>/etc/fstab</I>
|
|
|
|
file.
|
|
<P>
|
|
It is different from
|
|
<B>-t</B>
|
|
|
|
in that each option is matched exactly; a leading
|
|
<B>no</B>
|
|
|
|
at the beginning of one option does not negate the rest.
|
|
<P>
|
|
The
|
|
<B>-t</B>
|
|
|
|
and
|
|
<B>-O</B>
|
|
|
|
options are cumulative in effect; that is, the command
|
|
<DL COMPACT><DT id="35"><DD>
|
|
<P>
|
|
<B>mount -a -t ext2 -O _netdev</B>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
mounts all ext2 filesystems with the _netdev option, not all filesystems
|
|
that are either ext2 or have the _netdev option specified.
|
|
</DL>
|
|
|
|
<DT id="36"><B>-o</B>,<B> --options </B><I>opts</I>
|
|
|
|
<DD>
|
|
Use the specified mount options. The <I>opts</I> argument is
|
|
a comma-separated list. For example:
|
|
<DL COMPACT><DT id="37"><DD>
|
|
<DL COMPACT><DT id="38"><DD>
|
|
<P>
|
|
<B>mount LABEL=mydisk -o noatime,nodev,nosuid</B>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
<P>
|
|
For more details, see the
|
|
<B>FILESYSTEM-INDEPENDENT MOUNT OPTIONS</B>
|
|
|
|
and
|
|
<B>FILESYSTEM-SPECIFIC MOUNT OPTIONS</B>
|
|
|
|
sections.
|
|
</DL>
|
|
|
|
<P>
|
|
<DT id="39"><B>--options-mode </B><I>mode</I>
|
|
|
|
<DD>
|
|
Controls how to combine options from fstab/mtab with options from command line.
|
|
<I>mode</I> can be one of
|
|
<B>ignore</B>, <B>append</B>, <B>prepend</B> or <B>replace</B>.
|
|
|
|
For example <B>append</B> means that options from fstab are appended to options from command line.
|
|
Default value is <B>prepend</B> -- it means command line options are evaluated after fstab options.
|
|
Note that the last option wins if there are conflicting ones.
|
|
<P>
|
|
<DT id="40"><B>--options-source </B><I>source</I>
|
|
|
|
<DD>
|
|
Source of default options.
|
|
<I>source</I> is comma separated list of
|
|
<B>fstab</B>, <B>mtab</B> and <B>disable</B>.
|
|
|
|
<B>disable</B> disables
|
|
<B>fstab</B> and <B>mtab</B>
|
|
|
|
and disables <B>--options-source-force</B>.
|
|
Default value is <B>fstab,mtab</B>.
|
|
<P>
|
|
<DT id="41"><B>--options-source-force</B>
|
|
|
|
<DD>
|
|
Use options from fstab/mtab even if both <I>device</I> and <I>dir</I> are specified.
|
|
<P>
|
|
<DT id="42"><B>-R</B>,<B> --rbind</B>
|
|
|
|
<DD>
|
|
Remount a subtree and all possible submounts somewhere else (so that its
|
|
contents are available in both places). See above, the subsection
|
|
<B>Bind mounts</B>.
|
|
<DT id="43"><B>-r</B>,<B> --read-only</B>
|
|
|
|
<DD>
|
|
Mount the filesystem read-only. A synonym is
|
|
<B>-o ro</B>.
|
|
|
|
<P>
|
|
Note that, depending on the filesystem type, state and kernel behavior, the
|
|
system may still write to the device. For example, ext3 and ext4 will replay the
|
|
journal if the filesystem is dirty. To prevent this kind of write access, you
|
|
may want to mount an ext3 or ext4 filesystem with the <B>ro,noload</B> mount
|
|
options or set the block device itself to read-only mode, see the
|
|
<B><A HREF="/cgi-bin/man/man2html?8+blockdev">blockdev</A></B>(8)
|
|
|
|
command.
|
|
<DT id="44"><B>-s</B>
|
|
|
|
<DD>
|
|
Tolerate sloppy mount options rather than failing. This will ignore mount
|
|
options not supported by a filesystem type. Not all filesystems support this
|
|
option. Currently it's supported by the <B>mount.nfs</B> mount helper only.
|
|
<DT id="45"><B>--source</B><I> device</I>
|
|
|
|
<DD>
|
|
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 the mount source.
|
|
<DT id="46"><B>--target</B><I> directory</I>
|
|
|
|
<DD>
|
|
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 the mount target.
|
|
<DT id="47"><B>-T</B>,<B> --fstab </B><I>path</I>
|
|
|
|
<DD>
|
|
Specifies an alternative fstab file. If <I>path</I> is a directory then the files
|
|
in the directory are sorted by
|
|
<B><A HREF="/cgi-bin/man/man2html?3+strverscmp">strverscmp</A></B>(3);
|
|
|
|
files that start with "." or without an .fstab extension are ignored. The option
|
|
can be specified more than once. This option is mostly designed for initramfs
|
|
or chroot scripts where additional configuration is specified beyond standard
|
|
system configuration.
|
|
<P>
|
|
Note that <B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8) does not pass the option <B>--fstab</B> to the
|
|
<B>/sbin/mount.</B><I>type</I> helpers, meaning that the alternative fstab files will be
|
|
invisible for the helpers. This is no problem for normal mounts, but user
|
|
(non-root) mounts always require fstab to verify the user's rights.
|
|
<DT id="48"><B>-t</B>,<B> --types </B><I>fstype</I>
|
|
|
|
<DD>
|
|
The argument following the
|
|
<B>-t</B>
|
|
|
|
is used to indicate the filesystem type. The filesystem types which are
|
|
currently supported depend on the running kernel. See
|
|
<I>/proc/filesystems</I>
|
|
|
|
and
|
|
<I>/lib/modules/$(uname -r)/kernel/fs</I>
|
|
|
|
for a complete list of the filesystems. The most common are ext2, ext3, ext4,
|
|
xfs, btrfs, vfat, sysfs, proc, nfs and cifs.
|
|
<P>
|
|
The programs
|
|
<B>mount</B>
|
|
|
|
and
|
|
<B>umount</B>
|
|
|
|
support filesystem subtypes. The subtype is defined by a '.subtype' suffix. For
|
|
example 'fuse.sshfs'. It's recommended to use subtype notation rather than add
|
|
any prefix to the mount source (for example 'sshfs#example.com' is
|
|
deprecated).
|
|
<P>
|
|
If no
|
|
<B>-t</B>
|
|
|
|
option is given, or if the
|
|
<B>auto</B>
|
|
|
|
type is specified, mount will try to guess the desired type.
|
|
Mount uses the blkid library for guessing the filesystem
|
|
type; if that does not turn up anything that looks familiar,
|
|
mount will try to read the file
|
|
<I>/etc/filesystems</I>,
|
|
|
|
or, if that does not exist,
|
|
<I>/proc/filesystems</I>.
|
|
|
|
All of the filesystem types listed there will be tried,
|
|
except for those that are labeled "nodev" (e.g.
|
|
<I>devpts</I>,
|
|
|
|
<I>proc</I>
|
|
|
|
and
|
|
<I>nfs</I>).
|
|
|
|
If
|
|
<I>/etc/filesystems</I>
|
|
|
|
ends in a line with a single *, mount will read
|
|
<I>/proc/filesystems</I>
|
|
|
|
afterwards. While trying, all filesystem types will be
|
|
mounted with the mount option <B>silent</B>.
|
|
<P>
|
|
The
|
|
<B>auto</B>
|
|
|
|
type may be useful for user-mounted floppies.
|
|
Creating a file
|
|
<I>/etc/filesystems</I>
|
|
|
|
can be useful to change the probe order (e.g., to try vfat before msdos
|
|
or ext3 before ext2) or if you use a kernel module autoloader.
|
|
<P>
|
|
More than one type may be specified in a comma-separated
|
|
list, for option
|
|
<B>-t</B>
|
|
|
|
as well as in an
|
|
<I>/etc/fstab</I>
|
|
|
|
entry. The list of filesystem types for option
|
|
<B>-t</B>
|
|
|
|
can be prefixed with
|
|
<B>no</B>
|
|
|
|
to specify the filesystem types on which no action should be taken.
|
|
The prefix
|
|
<B>no</B>
|
|
|
|
has no effect when specified in an
|
|
<I>/etc/fstab</I>
|
|
|
|
entry.
|
|
<P>
|
|
The prefix
|
|
<B>no</B>
|
|
|
|
can be meaningful with the
|
|
<B>-a</B>
|
|
|
|
option. For example, the command
|
|
<DL COMPACT><DT id="49"><DD>
|
|
<DL COMPACT><DT id="50"><DD>
|
|
<P>
|
|
<B>mount -a -t nomsdos,smbfs</B>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
mounts all filesystems except those of type
|
|
<I>msdos</I>
|
|
|
|
and
|
|
<I>smbfs</I>.
|
|
|
|
<P>
|
|
For most types all the
|
|
<B>mount</B>
|
|
|
|
program has to do is issue a simple
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mount">mount</A></B>(2)
|
|
|
|
system call, and no detailed knowledge of the filesystem type is required.
|
|
For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) an ad hoc code is
|
|
necessary. The nfs, nfs4, cifs, smbfs, and ncpfs filesystems
|
|
have a separate mount program. In order to make it possible to
|
|
treat all types in a uniform way, <B>mount</B> will execute the program
|
|
<B>/sbin/mount.</B><I>type</I>
|
|
|
|
(if that exists) when called with type
|
|
<I>type</I>.
|
|
|
|
Since different versions of the
|
|
<B>smbmount</B>
|
|
|
|
program have different calling conventions,
|
|
<B>/sbin/mount.smbfs</B>
|
|
|
|
may have to be a shell script that sets up the desired call.
|
|
</DL>
|
|
|
|
<DT id="51"><B>-U</B>,<B> --uuid </B><I>uuid</I>
|
|
|
|
<DD>
|
|
Mount the partition that has the specified
|
|
<I>uuid</I>.
|
|
|
|
<DT id="52"><B>-v</B>,<B> --verbose</B>
|
|
|
|
<DD>
|
|
Verbose mode.
|
|
<DT id="53"><B>-w</B>,<B> --rw</B>,<B> --read-write</B>
|
|
|
|
<DD>
|
|
Mount the filesystem read/write. The read-write is kernel default. A synonym is
|
|
<B>-o rw</B>.
|
|
|
|
<P>
|
|
Note that specify <B>-w</B> on command line forces <B>mount</B> command
|
|
to never try read-only mount on write-protected devices. The default is
|
|
try read-only if the previous mount syscall with read-write flags failed.
|
|
<DT id="54"><B>-V</B>,<B> --version</B>
|
|
|
|
<DD>
|
|
Display version information and exit.
|
|
<DT id="55"><B>-h</B>,<B> --help</B>
|
|
|
|
<DD>
|
|
Display help text and exit.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAM"> </A>
|
|
<H2>FILESYSTEM-INDEPENDENT MOUNT OPTIONS</H2>
|
|
|
|
Some of these options are only useful when they appear in the
|
|
<I>/etc/fstab</I>
|
|
|
|
file.
|
|
<P>
|
|
Some of these options could be enabled or disabled by default
|
|
in the system kernel. To check the current setting see the options
|
|
in /proc/mounts. Note that filesystems also have per-filesystem
|
|
specific default mount options (see for example <B>tune2fs -l</B>
|
|
output for extN filesystems).
|
|
<P>
|
|
The following options apply to any filesystem that is being
|
|
mounted (but not every filesystem actually honors them - e.g., the
|
|
<B>sync</B>
|
|
|
|
option today has an effect only for ext2, ext3, ext4, fat, vfat, ufs and xfs):
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="56"><B>async</B>
|
|
|
|
<DD>
|
|
All I/O to the filesystem should be done asynchronously. (See also the
|
|
<B>sync</B>
|
|
|
|
option.)
|
|
<DT id="57"><B>atime</B>
|
|
|
|
<DD>
|
|
Do not use the <B>noatime</B> feature, so the inode access time is controlled
|
|
by kernel defaults. See also the descriptions of the <B>relatime</B> and
|
|
<B>strictatime</B>
|
|
|
|
mount options.
|
|
<DT id="58"><B>noatime</B>
|
|
|
|
<DD>
|
|
Do not update inode access times on this filesystem (e.g. for faster
|
|
access on the news spool to speed up news servers). This works for all
|
|
inode types (directories too), so it implies <B>nodiratime</B>.
|
|
<DT id="59"><B>auto</B>
|
|
|
|
<DD>
|
|
Can be mounted with the
|
|
<B>-a</B>
|
|
|
|
option.
|
|
<DT id="60"><B>noauto</B>
|
|
|
|
<DD>
|
|
Can only be mounted explicitly (i.e., the
|
|
<B>-a</B>
|
|
|
|
option will not cause the filesystem to be mounted).
|
|
<DT id="61">
|
|
<DD>
|
|
<B>context=</B><I>context</I>, <B>fscontext=</B><I>context</I>, <B>defcontext=</B><I>context</I>, and <B>rootcontext=</B><I>context</I>
|
|
|
|
|
|
The
|
|
<B>context=</B>
|
|
|
|
option is useful when mounting filesystems that do not support
|
|
extended attributes, such as a floppy or hard disk formatted with VFAT, or
|
|
systems that are not normally running under SELinux, such as an ext3 or ext4 formatted
|
|
<P>
|
|
disk from a non-SELinux workstation. You can also use
|
|
<B>context=</B>
|
|
|
|
on filesystems you do not trust, such as a floppy. It also helps in compatibility with
|
|
xattr-supporting filesystems on earlier 2.4.<x> kernel versions. Even where
|
|
xattrs are supported, you can save time not having to label every file by
|
|
assigning the entire disk one security context.
|
|
<P>
|
|
A commonly used option for removable media is
|
|
<B>context=system_u:object_r:removable_t</B>.
|
|
|
|
<P>
|
|
Two other options are
|
|
<B>fscontext=</B>
|
|
|
|
and
|
|
<B>defcontext=</B>,
|
|
|
|
both of which are mutually exclusive of the context option. This means you
|
|
can use fscontext and defcontext with each other, but neither can be used with
|
|
context.
|
|
<P>
|
|
The
|
|
<B>fscontext=</B>
|
|
|
|
option works for all filesystems, regardless of their xattr
|
|
support. The fscontext option sets the overarching filesystem label to a
|
|
specific security context. This filesystem label is separate from the
|
|
individual labels on the files. It represents the entire filesystem for
|
|
certain kinds of permission checks, such as during mount or file creation.
|
|
Individual file labels are still obtained from the xattrs on the files
|
|
themselves. The context option actually sets the aggregate context that
|
|
fscontext provides, in addition to supplying the same label for individual
|
|
files.
|
|
<P>
|
|
You can set the default security context for unlabeled files using
|
|
<B>defcontext=</B>
|
|
|
|
option. This overrides the value set for unlabeled files in the policy and requires a
|
|
filesystem that supports xattr labeling.
|
|
<P>
|
|
The
|
|
<B>rootcontext=</B>
|
|
|
|
option allows you to explicitly label the root inode of a FS being mounted
|
|
before that FS or inode becomes visible to userspace. This was found to be
|
|
useful for things like stateless linux.
|
|
<P>
|
|
Note that the kernel rejects any remount request that includes the context
|
|
option, <B>even</B> when unchanged from the current context.
|
|
<P>
|
|
<B>Warning: the </B><I>context</I> value might contain commas,
|
|
|
|
in which case the value has to be properly quoted, otherwise
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8)
|
|
|
|
will interpret the comma as a separator between mount options. Don't forget that
|
|
the shell strips off quotes and thus
|
|
<B>double quoting is required</B>.
|
|
|
|
For example:
|
|
<DL COMPACT><DT id="62"><DD>
|
|
<DL COMPACT><DT id="63"><DD>
|
|
<P>
|
|
<PRE>
|
|
<B>mount -t tmpfs none /mnt -o \</B>
|
|
<B> 'context=system_u:object_r:tmp_t:s0:c127,c456,noexec'</B>
|
|
</PRE>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
For more details, see
|
|
<B><A HREF="/cgi-bin/man/man2html?8+selinux">selinux</A></B>(8).
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
<DT id="64"><B>defaults</B>
|
|
|
|
<DD>
|
|
Use the default options:
|
|
<B>rw</B>, <B>suid</B>, <B>dev</B>, <B>exec</B>, <B>auto</B>, <B>nouser</B>, and <B>async</B>.
|
|
|
|
<P>
|
|
Note that the real set of all default mount options depends on kernel
|
|
and filesystem type. See the beginning of this section for more details.
|
|
<DT id="65"><B>dev</B>
|
|
|
|
<DD>
|
|
Interpret character or block special devices on the filesystem.
|
|
<DT id="66"><B>nodev</B>
|
|
|
|
<DD>
|
|
Do not interpret character or block special devices on the file
|
|
system.
|
|
<DT id="67"><B>diratime</B>
|
|
|
|
<DD>
|
|
Update directory inode access times on this filesystem. This is the default.
|
|
(This option is ignored when <B>noatime</B> is set.)
|
|
<DT id="68"><B>nodiratime</B>
|
|
|
|
<DD>
|
|
Do not update directory inode access times on this filesystem.
|
|
(This option is implied when <B>noatime</B> is set.)
|
|
<DT id="69"><B>dirsync</B>
|
|
|
|
<DD>
|
|
All directory updates within the filesystem should be done synchronously.
|
|
This affects the following system calls: creat, link, unlink, symlink,
|
|
mkdir, rmdir, mknod and rename.
|
|
<DT id="70"><B>exec</B>
|
|
|
|
<DD>
|
|
Permit execution of binaries.
|
|
<DT id="71"><B>noexec</B>
|
|
|
|
<DD>
|
|
Do not permit direct execution of any binaries on the mounted filesystem.
|
|
<DT id="72"><B>group</B>
|
|
|
|
<DD>
|
|
Allow an ordinary user to mount the filesystem if one
|
|
of that user's groups matches the group of the device.
|
|
This option implies the options
|
|
<B>nosuid</B> and <B>nodev</B>
|
|
|
|
(unless overridden by subsequent options, as in the option line
|
|
<B>group,dev,suid</B>).
|
|
|
|
<DT id="73"><B>iversion</B>
|
|
|
|
<DD>
|
|
Every time the inode is modified, the i_version field will be incremented.
|
|
<DT id="74"><B>noiversion</B>
|
|
|
|
<DD>
|
|
Do not increment the i_version inode field.
|
|
<DT id="75"><B>mand</B>
|
|
|
|
<DD>
|
|
Allow mandatory locks on this filesystem. See
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fcntl">fcntl</A></B>(2).
|
|
|
|
<DT id="76"><B>nomand</B>
|
|
|
|
<DD>
|
|
Do not allow mandatory locks on this filesystem.
|
|
<DT id="77"><B>_netdev</B>
|
|
|
|
<DD>
|
|
The filesystem resides on a device that requires network access
|
|
(used to prevent the system from attempting to mount these filesystems
|
|
until the network has been enabled on the system).
|
|
<DT id="78"><B>nofail</B>
|
|
|
|
<DD>
|
|
Do not report errors for this device if it does not exist.
|
|
<DT id="79"><B>relatime</B>
|
|
|
|
<DD>
|
|
Update inode access times relative to modify or change time. Access
|
|
time is only updated if the previous access time was earlier than the
|
|
current modify or change time. (Similar to <B>noatime</B>, but it doesn't
|
|
break <B>mutt</B> or other applications that need to know if a file has been
|
|
read since the last time it was modified.)
|
|
<P>
|
|
Since Linux 2.6.30, the kernel defaults to the behavior provided by this
|
|
option (unless
|
|
<B>noatime</B>
|
|
|
|
was specified), and the
|
|
<B>strictatime</B>
|
|
|
|
option is required to obtain traditional semantics. In addition, since Linux
|
|
2.6.30, the file's last access time is always updated if it is more than 1
|
|
day old.
|
|
<DT id="80"><B>norelatime</B>
|
|
|
|
<DD>
|
|
Do not use the
|
|
<B>relatime</B>
|
|
|
|
feature. See also the
|
|
<B>strictatime</B>
|
|
|
|
mount option.
|
|
<DT id="81"><B>strictatime</B>
|
|
|
|
<DD>
|
|
Allows to explicitly request full atime updates. This makes it
|
|
possible for the kernel to default to
|
|
<B>relatime</B>
|
|
|
|
or
|
|
<B>noatime</B>
|
|
|
|
but still allow userspace to override it. For more details about the default
|
|
system mount options see /proc/mounts.
|
|
<DT id="82"><B>nostrictatime</B>
|
|
|
|
<DD>
|
|
Use the kernel's default behavior for inode access time updates.
|
|
<DT id="83"><B>lazytime</B>
|
|
|
|
<DD>
|
|
Only update times (atime, mtime, ctime) on the in-memory version of the file inode.
|
|
<P>
|
|
This mount option significantly reduces writes to the inode table for
|
|
workloads that perform frequent random writes to preallocated files.
|
|
<P>
|
|
The on-disk timestamps are updated only when:
|
|
<P>
|
|
<DL COMPACT><DT id="84"><DD>
|
|
- the inode needs to be updated for some change unrelated to file timestamps
|
|
<P>
|
|
- the application employs
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fsync">fsync</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+syncfs">syncfs</A></B>(2),
|
|
|
|
or
|
|
<B><A HREF="/cgi-bin/man/man2html?2+sync">sync</A></B>(2)
|
|
|
|
<P>
|
|
- an undeleted inode is evicted from memory
|
|
<P>
|
|
- more than 24 hours have passed since the i-node was written to disk.
|
|
</DL>
|
|
|
|
<P>
|
|
<DT id="85"><B>nolazytime</B>
|
|
|
|
<DD>
|
|
Do not use the lazytime feature.
|
|
<DT id="86"><B>suid</B>
|
|
|
|
<DD>
|
|
Honor set-user-ID and set-group-ID bits or file capabilities when
|
|
executing programs from this filesystem.
|
|
<DT id="87"><B>nosuid</B>
|
|
|
|
<DD>
|
|
Do not honor set-user-ID and set-group-ID bits or file capabilities when
|
|
executing programs from this filesystem.
|
|
<DT id="88"><B>silent</B>
|
|
|
|
<DD>
|
|
Turn on the silent flag.
|
|
<DT id="89"><B>loud</B>
|
|
|
|
<DD>
|
|
Turn off the silent flag.
|
|
<DT id="90"><B>owner</B>
|
|
|
|
<DD>
|
|
Allow an ordinary user to mount the filesystem if that
|
|
user is the owner of the device.
|
|
This option implies the options
|
|
<B>nosuid</B> and <B>nodev</B>
|
|
|
|
(unless overridden by subsequent options, as in the option line
|
|
<B>owner,dev,suid</B>).
|
|
|
|
<DT id="91"><B>remount</B>
|
|
|
|
<DD>
|
|
Attempt to remount an already-mounted filesystem. This is commonly
|
|
used to change the mount flags for a filesystem, especially to make a
|
|
readonly filesystem writable. It does not change device or mount point.
|
|
<P>
|
|
The remount operation together with the
|
|
<B>bind</B>
|
|
|
|
flag has special semantic. See above, the subsection <B>Bind mounts</B>.
|
|
<P>
|
|
The remount functionality follows the standard way the mount command works
|
|
with options from fstab. This means that <B>mount</B> does not
|
|
read fstab (or mtab) only when both
|
|
<I>device</I>
|
|
|
|
and
|
|
<I>dir</I>
|
|
|
|
are specified.
|
|
<P>
|
|
|
|
<B>mount -o remount,rw /dev/foo /dir</B>
|
|
|
|
|
|
<P>
|
|
After this call all old mount options are replaced and arbitrary stuff from
|
|
fstab (or mtab) is ignored, except the loop= option which is internally
|
|
generated and maintained by the mount command.
|
|
<P>
|
|
|
|
<B>mount -o remount,rw /dir</B>
|
|
|
|
|
|
<P>
|
|
After this call, mount reads fstab and merges these options with
|
|
the options from the command line (<B>-o</B>).
|
|
If no mountpoint is found in fstab, then a remount with unspecified source is
|
|
allowed.
|
|
<P>
|
|
<A HREF="/cgi-bin/man/man2html?8+mount">mount</A>(8) allows to use <B>--all</B> to remount all already mounted filesystems
|
|
which match a specified filter (<B>-O</B> and <B>-t</B>). For example:
|
|
<P>
|
|
|
|
<B>mount --all -o remount,ro -t vfat</B>
|
|
|
|
|
|
<P>
|
|
remounts all already mounted vfat filesystems in read-only mode. The each of the
|
|
filesystems is remounted by "mount -o remount,ro /dir" semantic. It means the
|
|
mount command reads fstab or mtab and merges these options with the options
|
|
from the command line.
|
|
<DT id="92"><B>ro</B>
|
|
|
|
<DD>
|
|
Mount the filesystem read-only.
|
|
<DT id="93"><B>rw</B>
|
|
|
|
<DD>
|
|
Mount the filesystem read-write.
|
|
<DT id="94"><B>sync</B>
|
|
|
|
<DD>
|
|
All I/O to the filesystem should be done synchronously. In the case of
|
|
media with a limited number of write cycles
|
|
(e.g. some flash drives), <B>sync</B> may cause life-cycle shortening.
|
|
<DT id="95"><B>user</B>
|
|
|
|
<DD>
|
|
Allow an ordinary user to mount the filesystem.
|
|
The name of the mounting user is written to the mtab file (or to the private
|
|
libmount file in /run/mount on systems without a regular mtab) so that this
|
|
same user can unmount the filesystem again.
|
|
This option implies the options
|
|
<B>noexec</B>, <B>nosuid</B>, and <B>nodev</B>
|
|
|
|
(unless overridden by subsequent options, as in the option line
|
|
<B>user,exec,dev,suid</B>).
|
|
|
|
<DT id="96"><B>nouser</B>
|
|
|
|
<DD>
|
|
Forbid an ordinary user to mount the filesystem.
|
|
This is the default; it does not imply any other options.
|
|
<DT id="97"><B>users</B>
|
|
|
|
<DD>
|
|
Allow any user to mount and to unmount the filesystem, even
|
|
when some other ordinary user mounted it.
|
|
This option implies the options
|
|
<B>noexec</B>, <B>nosuid</B>, and <B>nodev</B>
|
|
|
|
(unless overridden by subsequent options, as in the option line
|
|
<B>users,exec,dev,suid</B>).
|
|
|
|
<DT id="98"><B>X-*</B>
|
|
|
|
<DD>
|
|
All options prefixed with "X-" are interpreted as comments or as userspace
|
|
application-specific options. These options are not stored in the user space (e.g. mtab file),
|
|
nor sent to the mount.<I>type</I> helpers nor to the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mount">mount</A></B>(2)
|
|
|
|
system call. The suggested format is <B>X-</B><I>appname</I>.<I>option</I>.
|
|
<DT id="99"><B>x-*</B>
|
|
|
|
<DD>
|
|
The same as <B>X-*</B> options, but stored permanently in the user space. It
|
|
means the options are also available for umount or another operations. Note
|
|
that maintain mount options in user space is tricky, because it's necessary use
|
|
libmount based tools and there is no guarantee that the options will be always
|
|
available (for example after a move mount operation or in unshared namespace).
|
|
<P>
|
|
Note that before util-linux v2.30 the x-* options have not been maintained by
|
|
libmount and stored in user space (functionality was the same as have X-* now),
|
|
but due to growing number of use-cases (in initrd, systemd etc.) the
|
|
functionality have been extended to keep existing fstab configurations usable
|
|
without a change.
|
|
<DT id="100"><B>X-mount.mkdir</B>[<B>=</B><I>mode</I><B>]</B>
|
|
|
|
<DD>
|
|
Allow to make a target directory (mountpoint). The optional argument
|
|
<I>mode</I>
|
|
|
|
specifies the filesystem access mode used for
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mkdir">mkdir</A></B>(2)
|
|
|
|
in octal notation. The default mode is 0755. This functionality is supported
|
|
only for root users. The option is also supported as x-mount.mkdir, this notation
|
|
is deprecated for mount.mkdir since v2.30.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAN"> </A>
|
|
<H2>FILESYSTEM-SPECIFIC MOUNT OPTIONS</H2>
|
|
|
|
You should consult the respective man page for the filesystem first.
|
|
If you want to know what options the ext4 filesystem supports, then check the
|
|
<B><A HREF="/cgi-bin/man/man2html?5+ext4">ext4</A></B>(5)
|
|
|
|
man page.
|
|
If that doesn't exist, you can also check the corresponding mount page like
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount.cifs">mount.cifs</A></B>(8).
|
|
|
|
Note that you might have to install the respective userland tools.
|
|
<P>
|
|
The following options apply only to certain filesystems.
|
|
We sort them by filesystem. They all follow the
|
|
<B>-o</B>
|
|
|
|
flag.
|
|
<P>
|
|
What options are supported depends a bit on the running kernel.
|
|
More info may be found in the kernel source subdirectory
|
|
<I>Documentation/filesystems</I>.
|
|
|
|
<P>
|
|
<A NAME="lbAO"> </A>
|
|
<H3>Mount options for adfs</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="101"><B>uid=</B>,<I>value</I> and <B>gid=</B>,<I>value</I><DD>
|
|
Set the owner and group of the files in the filesystem (default: uid=gid=0).
|
|
<DT id="102"><B>ownmask=</B>,<I>value</I> and <B>othmask=</B>,<I>value</I><DD>
|
|
Set the permission mask for ADFS 'owner' permissions and 'other' permissions,
|
|
respectively (default: 0700 and 0077, respectively).
|
|
See also
|
|
<I>/usr/src/linux/Documentation/filesystems/adfs.txt</I>.
|
|
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAP"> </A>
|
|
<H3>Mount options for affs</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="103"><B>uid=</B>,<I>value</I> and <B>gid=</B>,<I>value</I><DD>
|
|
Set the owner and group of the root of the filesystem (default: uid=gid=0,
|
|
but with option
|
|
<B>uid</B>
|
|
|
|
or
|
|
<B>gid</B>
|
|
|
|
without specified value, the UID and GID of the current process are taken).
|
|
<DT id="104"><B>setuid=</B>,<I>value</I> and <B>setgid=</B>,<I>value</I><DD>
|
|
Set the owner and group of all files.
|
|
<DT id="105"><B>mode=</B><I>value</I>
|
|
|
|
<DD>
|
|
Set the mode of all files to
|
|
<I>value</I> & 0777
|
|
|
|
disregarding the original permissions.
|
|
Add search permission to directories that have read permission.
|
|
The value is given in octal.
|
|
<DT id="106"><B>protect</B>
|
|
|
|
<DD>
|
|
Do not allow any changes to the protection bits on the filesystem.
|
|
<DT id="107"><B>usemp</B>
|
|
|
|
<DD>
|
|
Set UID and GID of the root of the filesystem to the UID and GID
|
|
of the mount point upon the first sync or umount, and then
|
|
clear this option. Strange...
|
|
<DT id="108"><B>verbose</B>
|
|
|
|
<DD>
|
|
Print an informational message for each successful mount.
|
|
<DT id="109"><B>prefix=</B><I>string</I>
|
|
|
|
<DD>
|
|
Prefix used before volume name, when following a link.
|
|
<DT id="110"><B>volume=</B><I>string</I>
|
|
|
|
<DD>
|
|
Prefix (of length at most 30) used before '/' when following a symbolic link.
|
|
<DT id="111"><B>reserved=</B><I>value</I>
|
|
|
|
<DD>
|
|
(Default: 2.) Number of unused blocks at the start of the device.
|
|
<DT id="112"><B>root=</B><I>value</I>
|
|
|
|
<DD>
|
|
Give explicitly the location of the root block.
|
|
<DT id="113"><B>bs=</B><I>value</I>
|
|
|
|
<DD>
|
|
Give blocksize. Allowed values are 512, 1024, 2048, 4096.
|
|
<DT id="114"><B>grpquota</B>|<B>noquota</B>|<B>quota</B>|<B>usrquota</B>
|
|
|
|
<DD>
|
|
These options are accepted but ignored.
|
|
(However, quota utilities may react to such strings in
|
|
<I>/etc/fstab</I>.)
|
|
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAQ"> </A>
|
|
<H3>Mount options for debugfs</H3>
|
|
|
|
The debugfs filesystem is a pseudo filesystem, traditionally mounted on
|
|
<I>/sys/kernel/debug</I>.
|
|
|
|
|
|
|
|
As of kernel version 3.4, debugfs has the following options:
|
|
<DL COMPACT>
|
|
<DT id="115"><B>uid=</B><I>n</I><B>, gid=</B><I>n</I>
|
|
|
|
<DD>
|
|
Set the owner and group of the mountpoint.
|
|
<DT id="116"><B>mode=</B><I>value</I>
|
|
|
|
<DD>
|
|
Sets the mode of the mountpoint.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAR"> </A>
|
|
<H3>Mount options for devpts</H3>
|
|
|
|
The devpts filesystem is a pseudo filesystem, traditionally mounted on
|
|
<I>/dev/pts</I>.
|
|
|
|
In order to acquire a pseudo terminal, a process opens
|
|
<I>/dev/ptmx</I>;
|
|
|
|
the number of the pseudo terminal is then made available to the process
|
|
and the pseudo terminal slave can be accessed as
|
|
<I>/dev/pts/</I><number>.
|
|
|
|
<DL COMPACT>
|
|
<DT id="117"><B>uid=</B>,<I>value</I> and <B>gid=</B>,<I>value</I><DD>
|
|
This sets the owner or the group of newly created PTYs to
|
|
the specified values. When nothing is specified, they will
|
|
be set to the UID and GID of the creating process.
|
|
For example, if there is a tty group with GID 5, then
|
|
<B>gid=5</B>
|
|
|
|
will cause newly created PTYs to belong to the tty group.
|
|
<DT id="118"><B>mode=</B><I>value</I>
|
|
|
|
<DD>
|
|
Set the mode of newly created PTYs to the specified value.
|
|
The default is 0600.
|
|
A value of
|
|
<B>mode=620</B>
|
|
|
|
and
|
|
<B>gid=5</B>
|
|
|
|
makes "mesg y" the default on newly created PTYs.
|
|
<DT id="119"><B>newinstance<DD>
|
|
Create a private instance of devpts filesystem, such that
|
|
indices of ptys allocated in this new instance are
|
|
independent of indices created in other instances of devpts.
|
|
<P>
|
|
All mounts of devpts without this
|
|
newinstance</B>
|
|
|
|
option share the same set of pty indices (i.e. legacy mode).
|
|
Each mount of devpts with the
|
|
<B>newinstance</B>
|
|
|
|
option has a private set of pty indices.
|
|
<P>
|
|
This option is mainly used to support containers in the
|
|
linux kernel. It is implemented in linux kernel versions
|
|
starting with 2.6.29. Further, this mount option is valid
|
|
only if CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the
|
|
kernel configuration.
|
|
<P>
|
|
To use this option effectively,
|
|
<I>/dev/ptmx</I>
|
|
|
|
must be a symbolic link to
|
|
<I>pts/ptmx.</I>
|
|
|
|
See
|
|
<I>Documentation/filesystems/devpts.txt</I>
|
|
|
|
in the linux kernel source tree for details.
|
|
<DT id="120"><B>ptmxmode=</B><I>value</I>
|
|
|
|
<DD>
|
|
<P>
|
|
Set the mode for the new
|
|
<I>ptmx</I>
|
|
|
|
device node in the devpts filesystem.
|
|
<P>
|
|
With the support for multiple instances of devpts (see
|
|
<B>newinstance</B>
|
|
|
|
option above), each instance has a private
|
|
<I>ptmx</I>
|
|
|
|
node in the root of the devpts filesystem (typically
|
|
<I>/dev/pts/ptmx</I>).
|
|
|
|
<P>
|
|
For compatibility with older versions of the kernel, the
|
|
default mode of the new
|
|
<I>ptmx</I>
|
|
|
|
node is 0000.
|
|
<B>ptmxmode=</B><I>value</I>
|
|
|
|
specifies a more useful mode for the
|
|
<I>ptmx</I>
|
|
|
|
node and is highly recommended when the
|
|
<B>newinstance</B>
|
|
|
|
option is specified.
|
|
<P>
|
|
This option is only implemented in linux kernel versions
|
|
starting with 2.6.29. Further, this option is valid only if
|
|
CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the kernel
|
|
configuration.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAS"> </A>
|
|
<H3>Mount options for fat</H3>
|
|
|
|
(Note:
|
|
<I>fat</I>
|
|
|
|
is not a separate filesystem, but a common part of the
|
|
<I>msdos</I>,
|
|
|
|
<I>umsdos</I>
|
|
|
|
and
|
|
<I>vfat</I>
|
|
|
|
filesystems.)
|
|
<DL COMPACT>
|
|
<DT id="121"><B>blocksize=</B>{<B>512</B>|<B>1024</B>|<B>2048</B>}
|
|
|
|
<DD>
|
|
Set blocksize (default 512). This option is obsolete.
|
|
<DT id="122"><B>uid=</B>,<I>value</I> and <B>gid=</B>,<I>value</I><DD>
|
|
Set the owner and group of all files.
|
|
(Default: the UID and GID of the current process.)
|
|
<DT id="123"><B>umask=</B><I>value</I>
|
|
|
|
<DD>
|
|
Set the umask (the bitmask of the permissions that are
|
|
<B>not</B>
|
|
|
|
present). The default is the umask of the current process.
|
|
The value is given in octal.
|
|
<DT id="124"><B>dmask=</B><I>value</I>
|
|
|
|
<DD>
|
|
Set the umask applied to directories only.
|
|
The default is the umask of the current process.
|
|
The value is given in octal.
|
|
<DT id="125"><B>fmask=</B><I>value</I>
|
|
|
|
<DD>
|
|
Set the umask applied to regular files only.
|
|
The default is the umask of the current process.
|
|
The value is given in octal.
|
|
<DT id="126"><B>allow_utime=</B><I>value</I>
|
|
|
|
<DD>
|
|
This option controls the permission check of mtime/atime.
|
|
<DL COMPACT><DT id="127"><DD>
|
|
<DL COMPACT>
|
|
<DT id="128"><B>20</B>
|
|
|
|
<DD>
|
|
If current process is in group of file's group ID, you can change timestamp.
|
|
<DT id="129"><B>2</B>
|
|
|
|
<DD>
|
|
Other users can change timestamp.
|
|
</DL>
|
|
<P>
|
|
|
|
The default is set from `dmask' option. (If the directory is writable,
|
|
<B><A HREF="/cgi-bin/man/man2html?2+utime">utime</A></B>(2)
|
|
|
|
is also allowed. I.e. <FONT SIZE="+3">~</FONT>dmask & 022)
|
|
<P>
|
|
Normally
|
|
<B><A HREF="/cgi-bin/man/man2html?2+utime">utime</A></B>(2)
|
|
|
|
checks current process is owner of the file, or it has
|
|
CAP_FOWNER capability. But FAT filesystem doesn't have UID/GID on disk, so
|
|
normal check is too inflexible. With this option you can relax it.
|
|
</DL>
|
|
|
|
<DT id="130"><B>check=</B><I>value</I>
|
|
|
|
<DD>
|
|
Three different levels of pickiness can be chosen:
|
|
<DL COMPACT><DT id="131"><DD>
|
|
<DL COMPACT>
|
|
<DT id="132"><B>r</B>[<B>elaxed</B>]
|
|
|
|
<DD>
|
|
Upper and lower case are accepted and equivalent, long name parts are
|
|
truncated (e.g.
|
|
<I>verylongname.foobar</I>
|
|
|
|
becomes
|
|
<I>verylong.foo</I>),
|
|
|
|
leading and embedded spaces are accepted in each name part (name and extension).
|
|
<DT id="133"><B>n</B>[<B>ormal</B>]
|
|
|
|
<DD>
|
|
Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are
|
|
rejected. This is the default.
|
|
<DT id="134"><B>s</B>[<B>trict</B>]
|
|
|
|
<DD>
|
|
Like "normal", but names that contain long parts or special characters
|
|
that are sometimes used on Linux but are not accepted by MS-DOS
|
|
(+, =, etc.) are rejected.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="135"><B>codepage=</B><I>value</I>
|
|
|
|
<DD>
|
|
Sets the codepage for converting to shortname characters on FAT
|
|
and VFAT filesystems. By default, codepage 437 is used.
|
|
<DT id="136"><B>conv=</B><I>mode</I>
|
|
|
|
<DD>
|
|
This option is obsolete and may fail or being ignored.
|
|
<DT id="137"><B>cvf_format=</B><I>module</I>
|
|
|
|
<DD>
|
|
Forces the driver to use the CVF (Compressed Volume File) module
|
|
cvf_<I>module</I>
|
|
|
|
instead of auto-detection. If the kernel supports kmod, the
|
|
cvf_format=xxx option also controls on-demand CVF module loading.
|
|
This option is obsolete.
|
|
<DT id="138"><B>cvf_option=</B><I>option</I>
|
|
|
|
<DD>
|
|
Option passed to the CVF module. This option is obsolete.
|
|
<DT id="139"><B>debug</B>
|
|
|
|
<DD>
|
|
Turn on the
|
|
<I>debug</I>
|
|
|
|
flag. A version string and a list of filesystem parameters will be
|
|
printed (these data are also printed if the parameters appear to be
|
|
inconsistent).
|
|
<DT id="140"><B>discard</B>
|
|
|
|
<DD>
|
|
If set, causes discard/TRIM commands to be issued to the block device
|
|
when blocks are freed. This is useful for SSD devices and
|
|
sparse/thinly-provisioned LUNs.
|
|
<DT id="141"><B>dos1xfloppy</B>
|
|
|
|
<DD>
|
|
If set, use a fallback default BIOS Parameter Block configuration, determined
|
|
by backing device size. These static parameters match defaults assumed by DOS
|
|
1.x for 160 kiB, 180 kiB, 320 kiB, and 360 kiB floppies and floppy images.
|
|
<DT id="142"><B>errors=</B>{<B>panic</B>|<B>continue</B>|<B>remount-ro</B>}
|
|
|
|
<DD>
|
|
Specify FAT behavior on critical errors: panic, continue without doing
|
|
anything, or remount the partition in read-only mode (default behavior).
|
|
<DT id="143"><B>fat=</B>{<B>12</B>|<B>16</B>|<B>32</B>}
|
|
|
|
<DD>
|
|
Specify a 12, 16 or 32 bit fat. This overrides
|
|
the automatic FAT type detection routine. Use with caution!
|
|
<DT id="144"><B>iocharset=</B><I>value</I>
|
|
|
|
<DD>
|
|
Character set to use for converting between 8 bit characters
|
|
and 16 bit Unicode characters. The default is iso8859-1.
|
|
Long filenames are stored on disk in Unicode format.
|
|
<DT id="145"><B>nfs=</B>{<B>stale_rw</B>|<B>nostale_ro</B>}
|
|
|
|
<DD>
|
|
Enable this only if you want to export the FAT filesystem over NFS.
|
|
<P>
|
|
<B>stale_rw</B>:
|
|
|
|
This option maintains an index (cache) of directory inodes which is used by the
|
|
nfs-related code to improve look-ups. Full file operations (read/write) over
|
|
NFS are supported but with cache eviction at NFS server, this could result in
|
|
spurious
|
|
<B>ESTALE</B>
|
|
|
|
errors.
|
|
<P>
|
|
<B>nostale_ro</B>:
|
|
|
|
This option bases the inode number and file handle
|
|
on the on-disk location of a file in the FAT directory entry.
|
|
This ensures that
|
|
<B>ESTALE</B>
|
|
|
|
will not be returned after a file is
|
|
evicted from the inode cache. However, it means that operations
|
|
such as rename, create and unlink could cause file handles that
|
|
previously pointed at one file to point at a different file,
|
|
potentially causing data corruption. For this reason, this
|
|
option also mounts the filesystem readonly.
|
|
<P>
|
|
To maintain backward compatibility, '-o nfs' is also accepted,
|
|
defaulting to
|
|
<B>stale_rw</B>.
|
|
|
|
<DT id="146"><B>tz=UTC</B>
|
|
|
|
<DD>
|
|
This option disables the conversion of timestamps
|
|
between local time (as used by Windows on FAT) and UTC
|
|
(which Linux uses internally). This is particularly
|
|
useful when mounting devices (like digital cameras)
|
|
that are set to UTC in order to avoid the pitfalls of
|
|
local time.
|
|
<DT id="147"><B>time_offset=</B><I>minutes</I>
|
|
|
|
<DD>
|
|
Set offset for conversion of timestamps from local time used by FAT to UTC.
|
|
I.e.,
|
|
<I>minutes</I>
|
|
|
|
will be subtracted from each timestamp to convert it to UTC used
|
|
internally by Linux. This is useful when the time zone set in the kernel via
|
|
<B><A HREF="/cgi-bin/man/man2html?2+settimeofday">settimeofday</A></B>(2)
|
|
|
|
is not the time zone used by the filesystem. Note
|
|
that this option still does not provide correct time stamps in all cases in
|
|
presence of DST - time stamps in a different DST setting will be off by one
|
|
hour.
|
|
<DT id="148"><B>quiet</B>
|
|
|
|
<DD>
|
|
Turn on the
|
|
<I>quiet</I>
|
|
|
|
flag. Attempts to chown or chmod files do not return errors,
|
|
although they fail. Use with caution!
|
|
<DT id="149"><B>rodir</B>
|
|
|
|
<DD>
|
|
FAT has the ATTR_RO (read-only) attribute. On Windows, the ATTR_RO of the
|
|
directory will just be ignored, and is used only by applications as a flag
|
|
(e.g. it's set for the customized folder).
|
|
<P>
|
|
If you want to use ATTR_RO as read-only flag even for the directory, set this
|
|
option.
|
|
<DT id="150"><B>showexec</B>
|
|
|
|
<DD>
|
|
If set, the execute permission bits of the file will be allowed only if
|
|
the extension part of the name is .EXE, .COM, or .BAT. Not set by default.
|
|
<DT id="151"><B>sys_immutable</B>
|
|
|
|
<DD>
|
|
If set, ATTR_SYS attribute on FAT is handled as IMMUTABLE flag on Linux.
|
|
Not set by default.
|
|
<DT id="152"><B>flush</B>
|
|
|
|
<DD>
|
|
If set, the filesystem will try to flush to disk more early than normal.
|
|
Not set by default.
|
|
<DT id="153"><B>usefree</B>
|
|
|
|
<DD>
|
|
Use the "free clusters" value stored on FSINFO. It'll
|
|
be used to determine number of free clusters without
|
|
scanning disk. But it's not used by default, because
|
|
recent Windows don't update it correctly in some
|
|
case. If you are sure the "free clusters" on FSINFO is
|
|
correct, by this option you can avoid scanning disk.
|
|
<DT id="154"><B>dots</B>, <B>nodots</B>, <B>dotsOK=</B>[<B>yes</B>|<B>no</B>]
|
|
|
|
<DD>
|
|
Various misguided attempts to force Unix or DOS conventions
|
|
onto a FAT filesystem.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAT"> </A>
|
|
<H3>Mount options for hfs</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="155"><B>creator=</B><I>cccc</I><B>, type=</B><I>cccc</I>
|
|
|
|
<DD>
|
|
Set the creator/type values as shown by the MacOS finder
|
|
used for creating new files. Default values: '????'.
|
|
<DT id="156"><B>uid=</B><I>n</I><B>, gid=</B><I>n</I>
|
|
|
|
<DD>
|
|
Set the owner and group of all files.
|
|
(Default: the UID and GID of the current process.)
|
|
<DT id="157"><B>dir_umask=</B><I>n</I><B>, file_umask=</B><I>n</I><B>, umask=</B><I>n</I>
|
|
|
|
<DD>
|
|
Set the umask used for all directories, all regular files, or all
|
|
files and directories. Defaults to the umask of the current process.
|
|
<DT id="158"><B>session=</B><I>n</I>
|
|
|
|
<DD>
|
|
Select the CDROM session to mount.
|
|
Defaults to leaving that decision to the CDROM driver.
|
|
This option will fail with anything but a CDROM as underlying device.
|
|
<DT id="159"><B>part=</B><I>n</I>
|
|
|
|
<DD>
|
|
Select partition number n from the device.
|
|
Only makes sense for CDROMs.
|
|
Defaults to not parsing the partition table at all.
|
|
<DT id="160"><B>quiet</B>
|
|
|
|
<DD>
|
|
Don't complain about invalid mount options.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAU"> </A>
|
|
<H3>Mount options for hpfs</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="161"><B>uid=</B>,<I>value</I> and <B>gid=</B>,<I>value</I><DD>
|
|
Set the owner and group of all files. (Default: the UID and GID
|
|
of the current process.)
|
|
<DT id="162"><B>umask=</B><I>value</I>
|
|
|
|
<DD>
|
|
Set the umask (the bitmask of the permissions that are
|
|
<B>not</B>
|
|
|
|
present). The default is the umask of the current process.
|
|
The value is given in octal.
|
|
<DT id="163"><B>case=</B>{<B>lower</B>|<B>asis</B>}
|
|
|
|
<DD>
|
|
Convert all files names to lower case, or leave them.
|
|
(Default:
|
|
<B>case=lower</B>.)
|
|
|
|
<DT id="164"><B>conv=</B><I>mode</I>
|
|
|
|
<DD>
|
|
This option is obsolete and may fail or being ignored.
|
|
<DT id="165"><B>nocheck</B>
|
|
|
|
<DD>
|
|
Do not abort mounting when certain consistency checks fail.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAV"> </A>
|
|
<H3>Mount options for iso9660</H3>
|
|
|
|
ISO 9660 is a standard describing a filesystem structure to be used
|
|
on CD-ROMs. (This filesystem type is also seen on some DVDs. See also the
|
|
<I>udf</I>
|
|
|
|
filesystem.)
|
|
<P>
|
|
Normal
|
|
<I>iso9660</I>
|
|
|
|
filenames appear in an 8.3 format (i.e., DOS-like restrictions on filename
|
|
length), and in addition all characters are in upper case. Also there is
|
|
no field for file ownership, protection, number of links, provision for
|
|
block/character devices, etc.
|
|
<P>
|
|
Rock Ridge is an extension to iso9660 that provides all of these UNIX-like
|
|
features. Basically there are extensions to each directory record that
|
|
supply all of the additional information, and when Rock Ridge is in use,
|
|
the filesystem is indistinguishable from a normal UNIX filesystem (except
|
|
that it is read-only, of course).
|
|
<DL COMPACT>
|
|
<DT id="166"><B>norock</B>
|
|
|
|
<DD>
|
|
Disable the use of Rock Ridge extensions, even if available. Cf.
|
|
<B>map</B>.
|
|
|
|
<DT id="167"><B>nojoliet</B>
|
|
|
|
<DD>
|
|
Disable the use of Microsoft Joliet extensions, even if available. Cf.
|
|
<B>map</B>.
|
|
|
|
<DT id="168"><B>check=</B>{<B>r</B>[<B>elaxed</B>]|<B>s</B>[<B>trict</B>]}
|
|
|
|
<DD>
|
|
With
|
|
<B>check=relaxed</B>,
|
|
|
|
a filename is first converted to lower case before doing the lookup.
|
|
This is probably only meaningful together with
|
|
<B>norock</B>
|
|
|
|
and
|
|
<B>map=normal</B>.
|
|
|
|
(Default:
|
|
<B>check=strict</B>.)
|
|
|
|
<DT id="169"><B>uid=</B>,<I>value</I> and <B>gid=</B>,<I>value</I><DD>
|
|
Give all files in the filesystem the indicated user or group id,
|
|
possibly overriding the information found in the Rock Ridge extensions.
|
|
(Default:
|
|
<B>uid=0,gid=0</B>.)
|
|
|
|
<DT id="170"><B>map=</B>{<B>n</B>[<B>ormal</B>]|<B>o</B>[<B>ff</B>]|<B>a</B>[<B>corn</B>]}
|
|
|
|
<DD>
|
|
For non-Rock Ridge volumes, normal name translation maps upper
|
|
to lower case ASCII, drops a trailing `;1', and converts `;' to `.'.
|
|
With
|
|
<B>map=off</B>
|
|
|
|
no name translation is done. See
|
|
<B>norock</B>.
|
|
|
|
(Default:
|
|
<B>map=normal</B>.)
|
|
|
|
<B>map=acorn</B>
|
|
|
|
is like
|
|
<B>map=normal</B>
|
|
|
|
but also apply Acorn extensions if present.
|
|
<DT id="171"><B>mode=</B><I>value</I>
|
|
|
|
<DD>
|
|
For non-Rock Ridge volumes, give all files the indicated mode.
|
|
(Default: read and execute permission for everybody.)
|
|
Octal mode values require a leading 0.
|
|
<DT id="172"><B>unhide</B>
|
|
|
|
<DD>
|
|
Also show hidden and associated files.
|
|
(If the ordinary files and the associated or hidden files have
|
|
the same filenames, this may make the ordinary files inaccessible.)
|
|
<DT id="173"><B>block=</B>{<B>512</B>|<B>1024</B>|<B>2048</B>}
|
|
|
|
<DD>
|
|
Set the block size to the indicated value.
|
|
(Default:
|
|
<B>block=1024</B>.)
|
|
|
|
<DT id="174"><B>conv=</B><I>mode</I>
|
|
|
|
<DD>
|
|
This option is obsolete and may fail or being ignored.
|
|
<DT id="175"><B>cruft</B>
|
|
|
|
<DD>
|
|
If the high byte of the file length contains other garbage,
|
|
set this mount option to ignore the high order bits of the file length.
|
|
This implies that a file cannot be larger than 16 MB.
|
|
<DT id="176"><B>session=</B><I>x</I>
|
|
|
|
<DD>
|
|
Select number of session on multisession CD.
|
|
<DT id="177"><B>sbsector=</B><I>xxx</I>
|
|
|
|
<DD>
|
|
Session begins from sector xxx.
|
|
</DL>
|
|
<P>
|
|
|
|
The following options are the same as for vfat and specifying them only makes
|
|
sense when using discs encoded using Microsoft's Joliet extensions.
|
|
<DL COMPACT>
|
|
<DT id="178"><B>iocharset=</B><I>value</I>
|
|
|
|
<DD>
|
|
Character set to use for converting 16 bit Unicode characters on CD
|
|
to 8 bit characters. The default is iso8859-1.
|
|
<DT id="179"><B>utf8</B>
|
|
|
|
<DD>
|
|
Convert 16 bit Unicode characters on CD to UTF-8.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAW"> </A>
|
|
<H3>Mount options for jfs</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="180"><B>iocharset=</B><I>name</I>
|
|
|
|
<DD>
|
|
Character set to use for converting from Unicode to ASCII. The default is
|
|
to do no conversion. Use
|
|
<B>iocharset=utf8</B>
|
|
|
|
for UTF8 translations. This requires CONFIG_NLS_UTF8 to be set in
|
|
the kernel
|
|
<I>.config</I>
|
|
|
|
file.
|
|
<DT id="181"><B>resize=</B><I>value</I>
|
|
|
|
<DD>
|
|
Resize the volume to
|
|
<I>value</I>
|
|
|
|
blocks. JFS only supports growing a volume, not shrinking it. This option
|
|
is only valid during a remount, when the volume is mounted read-write. The
|
|
<B>resize</B>
|
|
|
|
keyword with no value will grow the volume to the full size of the partition.
|
|
<DT id="182"><B>nointegrity</B>
|
|
|
|
<DD>
|
|
Do not write to the journal. The primary use of this option is to allow
|
|
for higher performance when restoring a volume from backup media. The
|
|
integrity of the volume is not guaranteed if the system abnormally ends.
|
|
<DT id="183"><B>integrity</B>
|
|
|
|
<DD>
|
|
Default. Commit metadata changes to the journal. Use this option to remount
|
|
a volume where the
|
|
<B>nointegrity</B>
|
|
|
|
option was previously specified in order to restore normal behavior.
|
|
<DT id="184"><B>errors=</B>{<B>continue</B>|<B>remount-ro</B>|<B>panic</B>}
|
|
|
|
<DD>
|
|
Define the behavior when an error is encountered.
|
|
(Either ignore errors and just mark the filesystem erroneous and continue,
|
|
or remount the filesystem read-only, or panic and halt the system.)
|
|
<DT id="185"><B>noquota</B>|<B>quota</B>|<B>usrquota</B>|<B>grpquota</B>
|
|
|
|
<DD>
|
|
These options are accepted but ignored.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAX"> </A>
|
|
<H3>Mount options for msdos</H3>
|
|
|
|
See mount options for fat.
|
|
If the
|
|
<I>msdos</I>
|
|
|
|
filesystem detects an inconsistency, it reports an error and sets the file
|
|
system read-only. The filesystem can be made writable again by remounting
|
|
it.
|
|
<P>
|
|
<A NAME="lbAY"> </A>
|
|
<H3>Mount options for ncpfs</H3>
|
|
|
|
Just like
|
|
<I>nfs</I>, the <I>ncpfs</I>
|
|
|
|
implementation expects a binary argument (a
|
|
<I>struct ncp_mount_data</I>)
|
|
|
|
to the mount system call. This argument is constructed by
|
|
<B><A HREF="/cgi-bin/man/man2html?8+ncpmount">ncpmount</A></B>(8)
|
|
|
|
and the current version of
|
|
<B>mount</B>
|
|
|
|
(2.12) does not know anything about ncpfs.
|
|
<P>
|
|
<A NAME="lbAZ"> </A>
|
|
<H3>Mount options for ntfs</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="186"><B>iocharset=</B><I>name</I>
|
|
|
|
<DD>
|
|
Character set to use when returning file names.
|
|
Unlike VFAT, NTFS suppresses names that contain
|
|
nonconvertible characters. Deprecated.
|
|
<DT id="187"><B>nls=</B><I>name</I>
|
|
|
|
<DD>
|
|
New name for the option earlier called
|
|
<I>iocharset</I>.
|
|
|
|
<DT id="188"><B>utf8</B>
|
|
|
|
<DD>
|
|
Use UTF-8 for converting file names.
|
|
<DT id="189"><B>uni_xlate=</B>{<B>0</B>|<B>1</B>|<B>2</B>}
|
|
|
|
<DD>
|
|
For 0 (or `no' or `false'), do not use escape sequences
|
|
for unknown Unicode characters.
|
|
For 1 (or `yes' or `true') or 2, use vfat-style 4-byte escape sequences
|
|
starting with ":". Here 2 give a little-endian encoding
|
|
and 1 a byteswapped bigendian encoding.
|
|
<DT id="190"><B>posix=[0|1]</B>
|
|
|
|
<DD>
|
|
If enabled (posix=1), the filesystem distinguishes between
|
|
upper and lower case. The 8.3 alias names are presented as
|
|
hard links instead of being suppressed. This option is obsolete.
|
|
<DT id="191"><B>uid=</B>,<I>value</I>, <B>gid=</B>,<I>value</I> and <B>umask=</B>,<I>value</I><DD>
|
|
Set the file permission on the filesystem.
|
|
The umask value is given in octal.
|
|
By default, the files are owned by root and not readable by somebody else.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbBA"> </A>
|
|
<H3>Mount options for overlay</H3>
|
|
|
|
Since Linux 3.18 the overlay pseudo filesystem implements a union mount for
|
|
other filesystems.
|
|
<P>
|
|
An overlay filesystem combines two filesystems - an <B>upper</B> filesystem and
|
|
a <B>lower</B> filesystem. When a name exists in both filesystems, the object
|
|
in the upper filesystem is visible while the object in the lower filesystem is
|
|
either hidden or, in the case of directories, merged with the upper object.
|
|
<P>
|
|
The lower filesystem can be any filesystem supported by Linux and does not need
|
|
to be writable. The lower filesystem can even be another overlayfs. The upper
|
|
filesystem will normally be writable and if it is it must support the creation
|
|
of trusted.* extended attributes, and must provide a valid d_type in readdir
|
|
responses, so NFS is not suitable.
|
|
<P>
|
|
A read-only overlay of two read-only filesystems may use any filesystem type.
|
|
The options <B>lowerdir</B> and <B>upperdir</B> are combined into a merged
|
|
directory by using:
|
|
<P>
|
|
<DL COMPACT><DT id="192"><DD>
|
|
<BR>
|
|
|
|
<PRE>
|
|
<B>mount -t overlay overlay \</B>
|
|
<B> -olowerdir=/lower,upperdir=/upper,workdir=/work /merged</B>
|
|
</PRE>
|
|
|
|
<BR>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="193"><B>lowerdir=</B><I>directory</I>
|
|
|
|
<DD>
|
|
Any filesystem, does not need to be on a writable filesystem.
|
|
<DT id="194"><B>upperdir=</B><I>directory</I>
|
|
|
|
<DD>
|
|
The upperdir is normally on a writable filesystem.
|
|
<DT id="195"><B>workdir=</B><I>directory</I>
|
|
|
|
<DD>
|
|
The workdir needs to be an empty directory on the same filesystem as upperdir.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbBB"> </A>
|
|
<H3>Mount options for reiserfs</H3>
|
|
|
|
Reiserfs is a journaling filesystem.
|
|
<DL COMPACT>
|
|
<DT id="196"><B>conv</B>
|
|
|
|
<DD>
|
|
Instructs version 3.6 reiserfs software to mount a version 3.5 filesystem,
|
|
using the 3.6 format for newly created objects. This filesystem will no
|
|
longer be compatible with reiserfs 3.5 tools.
|
|
<DT id="197"><B>hash=</B>{<B>rupasov</B>|<B>tea</B>|<B>r5</B>|<B>detect</B>}
|
|
|
|
<DD>
|
|
Choose which hash function reiserfs will use to find files within directories.
|
|
<DL COMPACT><DT id="198"><DD>
|
|
<DL COMPACT>
|
|
<DT id="199"><B>rupasov</B>
|
|
|
|
<DD>
|
|
A hash invented by Yury Yu. Rupasov. It is fast and preserves locality,
|
|
mapping lexicographically close file names to close hash values.
|
|
This option should not be used, as it causes a high probability of hash
|
|
collisions.
|
|
<DT id="200"><B>tea</B>
|
|
|
|
<DD>
|
|
A Davis-Meyer function implemented by Jeremy Fitzhardinge.
|
|
It uses hash permuting bits in the name. It gets high randomness
|
|
and, therefore, low probability of hash collisions at some CPU cost.
|
|
This may be used if EHASHCOLLISION errors are experienced with the r5 hash.
|
|
<DT id="201"><B>r5</B>
|
|
|
|
<DD>
|
|
A modified version of the rupasov hash. It is used by default and is
|
|
the best choice unless the filesystem has huge directories and
|
|
unusual file-name patterns.
|
|
<DT id="202"><B>detect</B>
|
|
|
|
<DD>
|
|
Instructs
|
|
<I>mount</I>
|
|
|
|
to detect which hash function is in use by examining
|
|
the filesystem being mounted, and to write this information into
|
|
the reiserfs superblock. This is only useful on the first mount of
|
|
an old format filesystem.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="203"><B>hashed_relocation</B>
|
|
|
|
<DD>
|
|
Tunes the block allocator. This may provide performance improvements
|
|
in some situations.
|
|
<DT id="204"><B>no_unhashed_relocation</B>
|
|
|
|
<DD>
|
|
Tunes the block allocator. This may provide performance improvements
|
|
in some situations.
|
|
<DT id="205"><B>noborder</B>
|
|
|
|
<DD>
|
|
Disable the border allocator algorithm invented by Yury Yu. Rupasov.
|
|
This may provide performance improvements in some situations.
|
|
<DT id="206"><B>nolog</B>
|
|
|
|
<DD>
|
|
Disable journaling. This will provide slight performance improvements in
|
|
some situations at the cost of losing reiserfs's fast recovery from crashes.
|
|
Even with this option turned on, reiserfs still performs all journaling
|
|
operations, save for actual writes into its journaling area. Implementation
|
|
of
|
|
<I>nolog</I>
|
|
|
|
is a work in progress.
|
|
<DT id="207"><B>notail</B>
|
|
|
|
<DD>
|
|
By default, reiserfs stores small files and `file tails' directly into its
|
|
tree. This confuses some utilities such as
|
|
<B><A HREF="/cgi-bin/man/man2html?8+LILO">LILO</A></B>(8).
|
|
|
|
This option is used to disable packing of files into the tree.
|
|
<DT id="208"><B>replayonly</B>
|
|
|
|
<DD>
|
|
Replay the transactions which are in the journal, but do not actually
|
|
mount the filesystem. Mainly used by
|
|
<I>reiserfsck</I>.
|
|
|
|
<DT id="209"><B>resize=</B><I>number</I>
|
|
|
|
<DD>
|
|
A remount option which permits online expansion of reiserfs partitions.
|
|
Instructs reiserfs to assume that the device has
|
|
<I>number</I>
|
|
|
|
blocks.
|
|
This option is designed for use with devices which are under logical
|
|
volume management (LVM).
|
|
There is a special
|
|
<I>resizer</I>
|
|
|
|
utility which can be obtained from
|
|
<I><A HREF="ftp://ftp.namesys.com/pub/reiserfsprogs">ftp://ftp.namesys.com/pub/reiserfsprogs</A></I>.
|
|
|
|
<DT id="210"><B>user_xattr</B>
|
|
|
|
<DD>
|
|
Enable Extended User Attributes. See the
|
|
<B><A HREF="/cgi-bin/man/man2html?5+attr">attr</A></B>(5)
|
|
|
|
manual page.
|
|
<DT id="211"><B>acl</B>
|
|
|
|
<DD>
|
|
Enable POSIX Access Control Lists. See the
|
|
<B><A HREF="/cgi-bin/man/man2html?5+acl">acl</A></B>(5)
|
|
|
|
manual page.
|
|
<DT id="212"><B>barrier=none</B> / <B>barrier=flush</B>
|
|
|
|
<DD>
|
|
This disables / enables the use of write barriers in the journaling code.
|
|
barrier=none disables, barrier=flush enables (default). This also requires an
|
|
IO stack which can support barriers, and if reiserfs gets an error on a barrier
|
|
write, it will disable barriers again with a warning. Write barriers enforce
|
|
proper on-disk ordering of journal commits, making volatile disk write caches
|
|
safe to use, at some performance penalty. If your disks are battery-backed in
|
|
one way or another, disabling barriers may safely improve performance.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbBC"> </A>
|
|
<H3>Mount options for ubifs</H3>
|
|
|
|
UBIFS is a flash filesystem which works on top of UBI volumes. Note that
|
|
<B>atime</B> is not supported and is always turned off.
|
|
<DL COMPACT>
|
|
<DT id="213">The device name may be specified as<DD>
|
|
<DL COMPACT><DT id="214"><DD>
|
|
<B>ubiX_Y</B>
|
|
|
|
UBI device number
|
|
<B>X</B>,
|
|
|
|
volume number
|
|
<B>Y</B>
|
|
|
|
<DL COMPACT>
|
|
<DT id="215"><B>ubiY</B>
|
|
|
|
<DD>
|
|
UBI device number
|
|
<B>0</B>,
|
|
|
|
volume number
|
|
<B>Y</B>
|
|
|
|
<DT id="216"><B>ubiX:NAME</B>
|
|
|
|
<DD>
|
|
UBI device number
|
|
<B>X</B>,
|
|
|
|
volume with name
|
|
<B>NAME</B>
|
|
|
|
<DT id="217"><B>ubi:NAME</B>
|
|
|
|
<DD>
|
|
UBI device number
|
|
<B>0</B>,
|
|
|
|
volume with name
|
|
<B>NAME</B>
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
Alternative
|
|
<B>!</B>
|
|
|
|
separator may be used instead of
|
|
<B>:</B>.
|
|
|
|
<DT id="218">The following mount options are available:<DD>
|
|
<DT id="219"><B>bulk_read</B>
|
|
|
|
<DD>
|
|
Enable bulk-read. VFS read-ahead is disabled because it slows down the file
|
|
system. Bulk-Read is an internal optimization. Some flashes may read faster if
|
|
the data are read at one go, rather than at several read requests. For
|
|
example, OneNAND can do "read-while-load" if it reads more than one NAND page.
|
|
<DT id="220"><B>no_bulk_read</B>
|
|
|
|
<DD>
|
|
Do not bulk-read. This is the default.
|
|
<DT id="221"><B>chk_data_crc</B>
|
|
|
|
<DD>
|
|
Check data CRC-32 checksums. This is the default.
|
|
<DT id="222"><B>no_chk_data_crc</B>.
|
|
|
|
<DD>
|
|
Do not check data CRC-32 checksums. With this option, the filesystem does not
|
|
check CRC-32 checksum for data, but it does check it for the internal indexing
|
|
information. This option only affects reading, not writing. CRC-32 is always
|
|
calculated when writing the data.
|
|
<DT id="223"><B>compr=</B>{<B>none</B>|<B>lzo</B>|<B>zlib</B>}
|
|
|
|
<DD>
|
|
Select the default compressor which is used when new files are written. It is
|
|
still possible to read compressed files if mounted with the
|
|
<B>none</B>
|
|
|
|
option.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbBD"> </A>
|
|
<H3>Mount options for udf</H3>
|
|
|
|
UDF is the "Universal Disk Format" filesystem defined by OSTA, the Optical
|
|
Storage Technology Association, and is often used for DVD-ROM, frequently
|
|
in the form of a hybrid UDF/ISO-9660 filesystem. It is, however,
|
|
perfectly usable by itself on disk drives, flash drives and other block devices.
|
|
See also
|
|
<I>iso9660</I>.
|
|
|
|
<DL COMPACT>
|
|
<DT id="224"><B>uid=</B>
|
|
|
|
<DD>
|
|
Make all files in the filesystem belong to the given user.
|
|
uid=forget can be specified independently of (or usually in
|
|
addition to) uid=<user> and results in UDF
|
|
not storing uids to the media. In fact the recorded uid
|
|
is the 32-bit overflow uid -1 as defined by the UDF standard.
|
|
The value is given as either <user> which is a valid user name or the corresponding
|
|
decimal user id, or the special string "forget".
|
|
<DT id="225"><B>gid=</B>
|
|
|
|
<DD>
|
|
Make all files in the filesystem belong to the given group.
|
|
gid=forget can be specified independently of (or usually in
|
|
addition to) gid=<group> and results in UDF
|
|
not storing gids to the media. In fact the recorded gid
|
|
is the 32-bit overflow gid -1 as defined by the UDF standard.
|
|
The value is given as either <group> which is a valid group name or the corresponding
|
|
decimal group id, or the special string "forget".
|
|
<DT id="226"><B>umask=</B>
|
|
|
|
<DD>
|
|
Mask out the given permissions from all inodes read from the filesystem.
|
|
The value is given in octal.
|
|
<DT id="227"><B>mode=</B>
|
|
|
|
<DD>
|
|
If mode= is set the permissions of all non-directory inodes read from the
|
|
filesystem will be set to the given mode. The value is given in octal.
|
|
<DT id="228"><B>dmode=</B>
|
|
|
|
<DD>
|
|
If dmode= is set the permissions of all directory inodes read from the
|
|
filesystem will be set to the given dmode. The value is given in octal.
|
|
<DT id="229"><B>bs=</B>
|
|
|
|
<DD>
|
|
Set the block size. Default value prior to kernel version 2.6.30 was
|
|
2048. Since 2.6.30 and prior to 4.11 it was logical device block size with
|
|
fallback to 2048. Since 4.11 it is logical block size with fallback to
|
|
any valid block size between logical device block size and 4096.
|
|
<P>
|
|
For other details see the <B><A HREF="/cgi-bin/man/man2html?8+mkudffs">mkudffs</A></B>(8) 2.0+ manpage, sections
|
|
<B>COMPATIBILITY</B> and <B>BLOCK SIZE</B>.
|
|
<DT id="230"><B>unhide</B>
|
|
|
|
<DD>
|
|
Show otherwise hidden files.
|
|
<DT id="231"><B>undelete</B>
|
|
|
|
<DD>
|
|
Show deleted files in lists.
|
|
<DT id="232"><B>adinicb</B>
|
|
|
|
<DD>
|
|
Embed data in the inode. (default)
|
|
<DT id="233"><B>noadinicb</B>
|
|
|
|
<DD>
|
|
Don't embed data in the inode.
|
|
<DT id="234"><B>shortad</B>
|
|
|
|
<DD>
|
|
Use short UDF address descriptors.
|
|
<DT id="235"><B>longad</B>
|
|
|
|
<DD>
|
|
Use long UDF address descriptors. (default)
|
|
<DT id="236"><B>nostrict</B>
|
|
|
|
<DD>
|
|
Unset strict conformance.
|
|
<DT id="237"><B>iocharset=</B>
|
|
|
|
<DD>
|
|
Set the NLS character set. This requires kernel compiled with CONFIG_UDF_NLS option.
|
|
<DT id="238"><B>utf8</B>
|
|
|
|
<DD>
|
|
Set the UTF-8 character set.
|
|
</DL>
|
|
<A NAME="lbBE"> </A>
|
|
<H3>Mount options for debugging and disaster recovery</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="239"><B>novrs</B>
|
|
|
|
<DD>
|
|
Ignore the Volume Recognition Sequence and attempt to mount anyway.
|
|
<DT id="240"><B>session=</B>
|
|
|
|
<DD>
|
|
Select the session number for multi-session recorded optical media. (default= last session)
|
|
<DT id="241"><B>anchor=</B>
|
|
|
|
<DD>
|
|
Override standard anchor location. (default= 256)
|
|
<DT id="242"><B>lastblock=</B>
|
|
|
|
<DD>
|
|
Set the last block of the filesystem.
|
|
</DL>
|
|
<A NAME="lbBF"> </A>
|
|
<H3>Unused historical mount options that may be encountered and should be removed</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="243"><B>uid=ignore</B>
|
|
|
|
<DD>
|
|
Ignored, use uid=<user> instead.
|
|
<DT id="244"><B>gid=ignore</B>
|
|
|
|
<DD>
|
|
Ignored, use gid=<group> instead.
|
|
<DT id="245"><B>volume=</B>
|
|
|
|
<DD>
|
|
Unimplemented and ignored.
|
|
<DT id="246"><B>partition=</B>
|
|
|
|
<DD>
|
|
Unimplemented and ignored.
|
|
<DT id="247"><B>fileset=</B>
|
|
|
|
<DD>
|
|
Unimplemented and ignored.
|
|
<DT id="248"><B>rootdir=</B>
|
|
|
|
<DD>
|
|
Unimplemented and ignored.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbBG"> </A>
|
|
<H3>Mount options for ufs</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="249"><B>ufstype=</B><I>value</I>
|
|
|
|
<DD>
|
|
UFS is a filesystem widely used in different operating systems.
|
|
The problem are differences among implementations. Features of some
|
|
implementations are undocumented, so its hard to recognize the
|
|
type of ufs automatically.
|
|
That's why the user must specify the type of ufs by mount option.
|
|
Possible values are:
|
|
<DL COMPACT><DT id="250"><DD>
|
|
<DL COMPACT>
|
|
<DT id="251"><B>old</B>
|
|
|
|
<DD>
|
|
Old format of ufs, this is the default, read only.
|
|
(Don't forget to give the -r option.)
|
|
<DT id="252"><B>44bsd</B>
|
|
|
|
<DD>
|
|
For filesystems created by a BSD-like system (NetBSD, FreeBSD, OpenBSD).
|
|
<DT id="253"><B>ufs2</B>
|
|
|
|
<DD>
|
|
Used in FreeBSD 5.x supported as read-write.
|
|
<DT id="254"><B>5xbsd</B>
|
|
|
|
<DD>
|
|
Synonym for ufs2.
|
|
<DT id="255"><B>sun</B>
|
|
|
|
<DD>
|
|
For filesystems created by SunOS or Solaris on Sparc.
|
|
<DT id="256"><B>sunx86</B>
|
|
|
|
<DD>
|
|
For filesystems created by Solaris on x86.
|
|
<DT id="257"><B>hp</B>
|
|
|
|
<DD>
|
|
For filesystems created by HP-UX, read-only.
|
|
<DT id="258"><B>nextstep</B>
|
|
|
|
<DD>
|
|
For filesystems created by NeXTStep (on NeXT station) (currently read only).
|
|
<DT id="259"><B>nextstep-cd</B>
|
|
|
|
<DD>
|
|
For NextStep CDROMs (block_size == 2048), read-only.
|
|
<DT id="260"><B>openstep</B>
|
|
|
|
<DD>
|
|
For filesystems created by OpenStep (currently read only).
|
|
The same filesystem type is also used by Mac OS X.
|
|
</DL>
|
|
</DL>
|
|
|
|
<P>
|
|
<DT id="261"><B>onerror=</B><I>value</I>
|
|
|
|
<DD>
|
|
Set behavior on error:
|
|
<DL COMPACT><DT id="262"><DD>
|
|
<DL COMPACT>
|
|
<DT id="263"><B>panic</B>
|
|
|
|
<DD>
|
|
If an error is encountered, cause a kernel panic.
|
|
<DT id="264">[<B>lock</B>|<B>umount</B>|<B>repair</B>]
|
|
|
|
<DD>
|
|
These mount options don't do anything at present;
|
|
when an error is encountered only a console message is printed.
|
|
</DL>
|
|
</DL>
|
|
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbBH"> </A>
|
|
<H3>Mount options for umsdos</H3>
|
|
|
|
See mount options for msdos.
|
|
The
|
|
<B>dotsOK</B>
|
|
|
|
option is explicitly killed by
|
|
<I>umsdos</I>.
|
|
|
|
<P>
|
|
<A NAME="lbBI"> </A>
|
|
<H3>Mount options for vfat</H3>
|
|
|
|
First of all, the mount options for
|
|
<I>fat</I>
|
|
|
|
are recognized.
|
|
The
|
|
<B>dotsOK</B>
|
|
|
|
option is explicitly killed by
|
|
<I>vfat</I>.
|
|
|
|
Furthermore, there are
|
|
<DL COMPACT>
|
|
<DT id="265"><B>uni_xlate</B>
|
|
|
|
<DD>
|
|
Translate unhandled Unicode characters to special escaped sequences.
|
|
This lets you backup and restore filenames that are created with any
|
|
Unicode characters. Without this option, a '?' is used when no
|
|
translation is possible. The escape character is ':' because it is
|
|
otherwise invalid on the vfat filesystem. The escape sequence
|
|
that gets used, where u is the Unicode character,
|
|
is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
|
|
<DT id="266"><B>posix</B>
|
|
|
|
<DD>
|
|
Allow two files with names that only differ in case.
|
|
This option is obsolete.
|
|
<DT id="267"><B>nonumtail</B>
|
|
|
|
<DD>
|
|
First try to make a short name without sequence number,
|
|
before trying
|
|
<I>name</I><FONT SIZE="+3"><I>~</I></FONT><I>num.ext</I>.
|
|
|
|
<DT id="268"><B>utf8</B>
|
|
|
|
<DD>
|
|
UTF8 is the filesystem safe 8-bit encoding of Unicode that is used by the
|
|
console. It can be enabled for the filesystem with this option or disabled
|
|
with utf8=0, utf8=no or utf8=false. If `uni_xlate' gets set, UTF8 gets
|
|
disabled.
|
|
<DT id="269"><B>shortname=</B><I>mode</I>
|
|
|
|
<DD>
|
|
Defines the behavior for creation and display of filenames which fit into
|
|
8.3 characters. If a long name for a file exists, it will always be the
|
|
preferred one for display. There are four <I>mode</I>s:
|
|
<DL COMPACT><DT id="270"><DD>
|
|
<DL COMPACT>
|
|
<DT id="271"><B>lower</B>
|
|
|
|
<DD>
|
|
Force the short name to lower case upon display; store a long name when
|
|
the short name is not all upper case.
|
|
<DT id="272"><B>win95</B>
|
|
|
|
<DD>
|
|
Force the short name to upper case upon display; store a long name when
|
|
the short name is not all upper case.
|
|
<DT id="273"><B>winnt</B>
|
|
|
|
<DD>
|
|
Display the short name as is; store a long name when the short name is
|
|
not all lower case or all upper case.
|
|
<DT id="274"><B>mixed</B>
|
|
|
|
<DD>
|
|
Display the short name as is; store a long name when the short name is not
|
|
all upper case. This mode is the default since Linux 2.6.32.
|
|
</DL>
|
|
</DL>
|
|
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbBJ"> </A>
|
|
<H3>Mount options for usbfs</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="275"><B>devuid=</B>,<I>uid</I> and <B>devgid=</B>,<I>gid</I> and <B>devmode=</B>,<I>mode</I><DD>
|
|
Set the owner and group and mode of the device files in the usbfs filesystem
|
|
(default: uid=gid=0, mode=0644). The mode is given in octal.
|
|
<DT id="276"><B>busuid=</B>,<I>uid</I> and <B>busgid=</B>,<I>gid</I> and <B>busmode=</B>,<I>mode</I><DD>
|
|
Set the owner and group and mode of the bus directories in the usbfs
|
|
filesystem (default: uid=gid=0, mode=0555). The mode is given in octal.
|
|
<DT id="277"><B>listuid=</B>,<I>uid</I> and <B>listgid=</B>,<I>gid</I> and <B>listmode=</B>,<I>mode</I><DD>
|
|
Set the owner and group and mode of the file
|
|
<I>devices</I>
|
|
|
|
(default: uid=gid=0, mode=0444). The mode is given in octal.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbBK"> </A>
|
|
<H2>THE LOOP DEVICE</H2>
|
|
|
|
One further possible type is a mount via the loop device. For example,
|
|
the command
|
|
<DL COMPACT><DT id="278"><DD>
|
|
<P>
|
|
<B>mount /tmp/disk.img /mnt -t vfat -o loop=/dev/loop3</B>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
will set up the loop device
|
|
<I>/dev/loop3</I>
|
|
|
|
to correspond to the file
|
|
<I>/tmp/disk.img</I>,
|
|
|
|
and then mount this device on
|
|
<I>/mnt</I>.
|
|
|
|
<P>
|
|
If no explicit loop device is mentioned
|
|
(but just an option `<B>-o loop</B>' is given), then
|
|
<B>mount</B>
|
|
|
|
will try to find some unused loop device and use that, for example
|
|
<DL COMPACT><DT id="279"><DD>
|
|
<P>
|
|
<B>mount /tmp/disk.img /mnt -o loop</B>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
The mount command
|
|
<B>automatically</B>
|
|
|
|
creates a loop device from a regular file if a filesystem type is
|
|
not specified or the filesystem is known for libblkid, for example:
|
|
<DL COMPACT><DT id="280"><DD>
|
|
<P>
|
|
<B>mount /tmp/disk.img /mnt</B>
|
|
|
|
<P>
|
|
<B>mount -t ext4 /tmp/disk.img /mnt</B>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
This type of mount knows about three options, namely
|
|
<B>loop</B>, <B>offset</B> and <B>sizelimit</B>,
|
|
|
|
that are really options to
|
|
<B><A HREF="/cgi-bin/man/man2html?8+losetup">losetup</A></B>(8).
|
|
|
|
(These options can be used in addition to those specific
|
|
to the filesystem type.)
|
|
<P>
|
|
Since Linux 2.6.25 auto-destruction of loop devices is supported,
|
|
meaning that any loop device allocated by
|
|
<B>mount</B>
|
|
|
|
will be freed by
|
|
<B>umount</B>
|
|
|
|
independently of
|
|
<I>/etc/mtab</I>.
|
|
|
|
<P>
|
|
You can also free a loop device by hand, using
|
|
<B>losetup -d </B>or<B> umount -d</B>.
|
|
|
|
<P>
|
|
Since util-linux v2.29 mount command re-uses the loop device rather than
|
|
initialize a new device if the same backing file is already used for some loop
|
|
device with the same offset and sizelimit. This is necessary to avoid
|
|
a filesystem corruption.
|
|
<P>
|
|
<A NAME="lbBL"> </A>
|
|
<H2>RETURN CODES</H2>
|
|
|
|
<B>mount</B>
|
|
|
|
has the following return codes (the bits can be ORed):
|
|
<DL COMPACT>
|
|
<DT id="281"><B>0</B>
|
|
|
|
<DD>
|
|
success
|
|
<DT id="282"><B>1</B>
|
|
|
|
<DD>
|
|
incorrect invocation or permissions
|
|
<DT id="283"><B>2</B>
|
|
|
|
<DD>
|
|
system error (out of memory, cannot fork, no more loop devices)
|
|
<DT id="284"><B>4</B>
|
|
|
|
<DD>
|
|
internal
|
|
<B>mount</B>
|
|
|
|
bug
|
|
<DT id="285"><B>8</B>
|
|
|
|
<DD>
|
|
user interrupt
|
|
<DT id="286"><B>16</B>
|
|
|
|
<DD>
|
|
problems writing or locking /etc/mtab
|
|
<DT id="287"><B>32</B>
|
|
|
|
<DD>
|
|
mount failure
|
|
<DT id="288"><B>64</B>
|
|
|
|
<DD>
|
|
some mount succeeded
|
|
|
|
<P>
|
|
The command <B>mount -a</B> returns 0 (all succeeded), 32 (all failed), or 64 (some
|
|
failed, some succeeded).
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbBM"> </A>
|
|
<H2>EXTERNAL HELPERS</H2>
|
|
|
|
The syntax of external mount helpers is:
|
|
<P>
|
|
|
|
<B>/sbin/mount.</B><I>suffix</I>
|
|
|
|
<I>spec dir</I>
|
|
|
|
[<B>-sfnv</B>]
|
|
|
|
[<B>-N</B>
|
|
|
|
<I>namespace</I>]
|
|
|
|
[<B>-o</B>
|
|
|
|
<I>options</I>]
|
|
|
|
[<B>-t</B>
|
|
|
|
<I>type</I><B>.</B><I>subtype</I>]
|
|
|
|
|
|
<P>
|
|
where the <I>suffix</I> is the filesystem type and the <B>-sfnvoN</B> options have
|
|
the same meaning as the normal mount options. The <B>-t</B> option is used for
|
|
filesystems with subtypes support (for example
|
|
<B>/sbin/mount.fuse -t fuse.sshfs</B>).
|
|
|
|
<P>
|
|
The command <B>mount</B> does not pass the mount options
|
|
<B>unbindable</B>,
|
|
|
|
<B>runbindable</B>,
|
|
|
|
<B>private</B>,
|
|
|
|
<B>rprivate</B>,
|
|
|
|
<B>slave</B>,
|
|
|
|
<B>rslave</B>,
|
|
|
|
<B>shared</B>,
|
|
|
|
<B>rshared</B>,
|
|
|
|
<B>auto</B>,
|
|
|
|
<B>noauto</B>,
|
|
|
|
<B>comment</B>,
|
|
|
|
<B>x-*</B>,
|
|
|
|
<B>loop</B>,
|
|
|
|
<B>offset</B>
|
|
|
|
and
|
|
<B>sizelimit</B>
|
|
|
|
to the mount.<suffix> helpers. All other options are used in a
|
|
comma-separated list as argument to the <B>-o</B> option.
|
|
<P>
|
|
<A NAME="lbBN"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
See also "<B>The files /etc/fstab, /etc/mtab and /proc/mounts</B>" section above.
|
|
<DL COMPACT>
|
|
<DT id="289"><I>/etc/fstab</I>
|
|
|
|
<DD>
|
|
filesystem table
|
|
<DT id="290"><I>/run/mount</I>
|
|
|
|
<DD>
|
|
libmount private runtime directory
|
|
<DT id="291"><I>/etc/mtab</I>
|
|
|
|
<DD>
|
|
table of mounted filesystems or symlink to /proc/mounts
|
|
<DT id="292"><I>/etc/mtab</I><FONT SIZE="+3"><I>~</I></FONT><I></I>
|
|
|
|
<DD>
|
|
lock file (unused on systems with mtab symlink)
|
|
<DT id="293"><I>/etc/mtab.tmp</I>
|
|
|
|
<DD>
|
|
temporary file (unused on systems with mtab symlink)
|
|
<DT id="294"><I>/etc/filesystems</I>
|
|
|
|
<DD>
|
|
a list of filesystem types to try
|
|
</DL>
|
|
<A NAME="lbBO"> </A>
|
|
<H2>ENVIRONMENT</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="295">LIBMOUNT_FSTAB=<path><DD>
|
|
overrides the default location of the fstab file (ignored for suid)
|
|
<DT id="296">LIBMOUNT_MTAB=<path><DD>
|
|
overrides the default location of the mtab file (ignored for suid)
|
|
<DT id="297">LIBMOUNT_DEBUG=all<DD>
|
|
enables libmount debug output
|
|
<DT id="298">LIBBLKID_DEBUG=all<DD>
|
|
enables libblkid debug output
|
|
<DT id="299">LOOPDEV_DEBUG=all<DD>
|
|
enables loop device setup debug output
|
|
</DL>
|
|
<A NAME="lbBP"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mount">mount</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+umount">umount</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+umount">umount</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+fstab">fstab</A></B>(5),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+nfs">nfs</A></B>(5),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+xfs">xfs</A></B>(5),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+e2label">e2label</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+findmnt">findmnt</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+losetup">losetup</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mke2fs">mke2fs</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mountd">mountd</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+nfsd">nfsd</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+swapon">swapon</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+tune2fs">tune2fs</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+xfs_admin">xfs_admin</A></B>(8)
|
|
|
|
|
|
<A NAME="lbBQ"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
It is possible for a corrupted filesystem to cause a crash.
|
|
<P>
|
|
|
|
Some Linux filesystems don't support
|
|
<B>-o sync </B>nor<B> -o dirsync</B>
|
|
|
|
(the ext2, ext3, ext4, fat and vfat filesystems
|
|
<I>do</I>
|
|
|
|
support synchronous updates (a la BSD) when mounted with the
|
|
<B>sync</B>
|
|
|
|
option).
|
|
<P>
|
|
|
|
The
|
|
<B>-o remount</B>
|
|
|
|
may not be able to change mount parameters (all
|
|
<I>ext2fs</I>-specific
|
|
|
|
parameters, except
|
|
<B>sb</B>,
|
|
|
|
are changeable with a remount, for example, but you can't change
|
|
<B>gid</B>
|
|
|
|
or
|
|
<B>umask</B>
|
|
|
|
for the
|
|
<I>fatfs</I>).
|
|
|
|
<P>
|
|
|
|
It is possible that the files
|
|
<I>/etc/mtab</I>
|
|
|
|
and
|
|
<I>/proc/mounts</I>
|
|
|
|
don't match on systems with a regular mtab file. The first file is based only on
|
|
the mount command options, but the content of the second file also depends on
|
|
the kernel and others settings (e.g. on a remote NFS server -- in certain cases
|
|
the mount command may report unreliable information about an NFS mount point
|
|
and the /proc/mounts file usually contains more reliable information.) This is
|
|
another reason to replace the mtab file with a symlink to the
|
|
<I>/proc/mounts</I>
|
|
|
|
file.
|
|
<P>
|
|
|
|
Checking files on NFS filesystems referenced by file descriptors (i.e. the
|
|
<B>fcntl</B>
|
|
|
|
and
|
|
<B>ioctl</B>
|
|
|
|
families of functions) may lead to inconsistent results due to the lack of
|
|
a consistency check in the kernel even if noac is used.
|
|
<P>
|
|
|
|
The
|
|
<B>loop</B>
|
|
|
|
option with the
|
|
<B>offset</B>
|
|
|
|
or
|
|
<B>sizelimit</B>
|
|
|
|
options used may fail when using older kernels if the
|
|
<B>mount</B>
|
|
|
|
command can't confirm that the size of the block device has been configured
|
|
as requested. This situation can be worked around by using
|
|
the
|
|
<B>losetup</B>
|
|
|
|
command manually before calling
|
|
<B>mount</B>
|
|
|
|
with the configured loop device.
|
|
<A NAME="lbBR"> </A>
|
|
<H2>HISTORY</H2>
|
|
|
|
A
|
|
<B>mount</B>
|
|
|
|
command existed in Version 5 AT&T UNIX.
|
|
<A NAME="lbBS"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
<PRE>
|
|
Karel Zak <<A HREF="mailto:kzak@redhat.com">kzak@redhat.com</A>>
|
|
</PRE>
|
|
|
|
<A NAME="lbBT"> </A>
|
|
<H2>AVAILABILITY</H2>
|
|
|
|
The mount command is part of the util-linux package and is available from
|
|
<A HREF="https://www.kernel.org/pub/linux/utils/util-linux/.">https://www.kernel.org/pub/linux/utils/util-linux/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="300"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="301"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="302"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DL>
|
|
<DT id="303"><A HREF="#lbAE">Listing the mounts</A><DD>
|
|
<DT id="304"><A HREF="#lbAF">Indicating the device and filesystem</A><DD>
|
|
<DT id="305"><A HREF="#lbAG">The files /etc/fstab, /etc/mtab and /proc/mounts</A><DD>
|
|
<DT id="306"><A HREF="#lbAH">Non-superuser mounts</A><DD>
|
|
<DT id="307"><A HREF="#lbAI">Bind mount operation</A><DD>
|
|
<DT id="308"><A HREF="#lbAJ">The move operation</A><DD>
|
|
<DT id="309"><A HREF="#lbAK">Shared subtree operations</A><DD>
|
|
</DL>
|
|
<DT id="310"><A HREF="#lbAL">COMMAND-LINE OPTIONS</A><DD>
|
|
<DT id="311"><A HREF="#lbAM">FILESYSTEM-INDEPENDENT MOUNT OPTIONS</A><DD>
|
|
<DT id="312"><A HREF="#lbAN">FILESYSTEM-SPECIFIC MOUNT OPTIONS</A><DD>
|
|
<DL>
|
|
<DT id="313"><A HREF="#lbAO">Mount options for adfs</A><DD>
|
|
<DT id="314"><A HREF="#lbAP">Mount options for affs</A><DD>
|
|
<DT id="315"><A HREF="#lbAQ">Mount options for debugfs</A><DD>
|
|
<DT id="316"><A HREF="#lbAR">Mount options for devpts</A><DD>
|
|
<DT id="317"><A HREF="#lbAS">Mount options for fat</A><DD>
|
|
<DT id="318"><A HREF="#lbAT">Mount options for hfs</A><DD>
|
|
<DT id="319"><A HREF="#lbAU">Mount options for hpfs</A><DD>
|
|
<DT id="320"><A HREF="#lbAV">Mount options for iso9660</A><DD>
|
|
<DT id="321"><A HREF="#lbAW">Mount options for jfs</A><DD>
|
|
<DT id="322"><A HREF="#lbAX">Mount options for msdos</A><DD>
|
|
<DT id="323"><A HREF="#lbAY">Mount options for ncpfs</A><DD>
|
|
<DT id="324"><A HREF="#lbAZ">Mount options for ntfs</A><DD>
|
|
<DT id="325"><A HREF="#lbBA">Mount options for overlay</A><DD>
|
|
<DT id="326"><A HREF="#lbBB">Mount options for reiserfs</A><DD>
|
|
<DT id="327"><A HREF="#lbBC">Mount options for ubifs</A><DD>
|
|
<DT id="328"><A HREF="#lbBD">Mount options for udf</A><DD>
|
|
<DT id="329"><A HREF="#lbBE">Mount options for debugging and disaster recovery</A><DD>
|
|
<DT id="330"><A HREF="#lbBF">Unused historical mount options that may be encountered and should be removed</A><DD>
|
|
<DT id="331"><A HREF="#lbBG">Mount options for ufs</A><DD>
|
|
<DT id="332"><A HREF="#lbBH">Mount options for umsdos</A><DD>
|
|
<DT id="333"><A HREF="#lbBI">Mount options for vfat</A><DD>
|
|
<DT id="334"><A HREF="#lbBJ">Mount options for usbfs</A><DD>
|
|
</DL>
|
|
<DT id="335"><A HREF="#lbBK">THE LOOP DEVICE</A><DD>
|
|
<DT id="336"><A HREF="#lbBL">RETURN CODES</A><DD>
|
|
<DT id="337"><A HREF="#lbBM">EXTERNAL HELPERS</A><DD>
|
|
<DT id="338"><A HREF="#lbBN">FILES</A><DD>
|
|
<DT id="339"><A HREF="#lbBO">ENVIRONMENT</A><DD>
|
|
<DT id="340"><A HREF="#lbBP">SEE ALSO</A><DD>
|
|
<DT id="341"><A HREF="#lbBQ">BUGS</A><DD>
|
|
<DT id="342"><A HREF="#lbBR">HISTORY</A><DD>
|
|
<DT id="343"><A HREF="#lbBS">AUTHORS</A><DD>
|
|
<DT id="344"><A HREF="#lbBT">AVAILABILITY</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:14 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|