]> git.ipfire.org Git - thirdparty/util-linux.git/blame - sys-utils/mount.8
mount: (man) be explicit about bind operation
[thirdparty/util-linux.git] / sys-utils / mount.8
CommitLineData
60a2a323 1.\" Copyright (c) 1996-2004 Andries Brouwer
0d05f161 2.\" Copyright (C) 2006-2012 Karel Zak <kzak@redhat.com>
60a2a323
KZ
3.\"
4.\" This page is somewhat derived from a page that was
5.\" (c) 1980, 1989, 1991 The Regents of the University of California
6.\" and had been heavily modified by Rik Faith and myself.
7.\" (Probably no BSD text remains.)
8.\" Fragments of text were written by Werner Almesberger, Remy Card,
9.\" Stephen Tweedie and Eric Youngdale.
10.\"
11.\" This is free documentation; you can redistribute it and/or
12.\" modify it under the terms of the GNU General Public License as
13.\" published by the Free Software Foundation; either version 2 of
14.\" the License, or (at your option) any later version.
15.\"
16.\" The GNU General Public License's references to "object code"
17.\" and "executables" are to be interpreted as the output of any
18.\" document formatting or typesetting system, including
19.\" intermediate and printed output.
20.\"
21.\" This manual is distributed in the hope that it will be useful,
22.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
23.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24.\" GNU General Public License for more details.
25.\"
7cebf0bb
SK
26.\" You should have received a copy of the GNU General Public License along
27.\" with this program; if not, write to the Free Software Foundation, Inc.,
28.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
60a2a323 29.\"
bcdf0978 30.TH MOUNT 8 "August 2015" "util-linux" "System Administration"
60a2a323
KZ
31.SH NAME
32mount \- mount a filesystem
33.SH SYNOPSIS
34.B mount
00d1cc1d 35.RB [ \-l | \-h | \-V ]
60a2a323 36.LP
00d1cc1d 37.B mount \-a
60a2a323
KZ
38.RB [ \-fFnrsvw ]
39.RB [ \-t
00d1cc1d 40.IR fstype ]
60a2a323
KZ
41.RB [ \-O
42.IR optlist ]
43.LP
44.B mount
45.RB [ \-fnrsvw ]
46.RB [ \-o
00d1cc1d 47.IR options ]
60a2a323
KZ
48.IR device | dir
49.LP
50.B mount
51.RB [ \-fnrsvw ]
52.RB [ \-t
00d1cc1d 53.IB fstype ]
60a2a323
KZ
54.RB [ \-o
55.IR options ]
56.I device dir
57.SH DESCRIPTION
58All files accessible in a Unix system are arranged in one big
59tree, the file hierarchy, rooted at
46f057ed 60.IR / .
3711f113 61These files can be spread out over several devices. The
60a2a323
KZ
62.B mount
63command serves to attach the filesystem found on some device
3711f113 64to the big file tree. Conversely, the
60a2a323 65.BR umount (8)
0ed9c7d5
KZ
66command will detach it again. The filesystem is used to control how data is
67stored on the device or provided in a virtual way by network or another services.
60a2a323
KZ
68
69The standard form of the
70.B mount
3711f113 71command is:
60a2a323
KZ
72.RS
73
74.br
75.BI "mount \-t" " type device dir"
76.br
77
78.RE
79This tells the kernel to attach the filesystem found on
80.I device
81(which is of type
82.IR type )
83at the directory
84.IR dir .
9fb4ab8e
KZ
85The option \fB\-t \fItype\fR is optional. The
86.B mount
87command is usually able to detect a filesystem. The root permissions are necessary
88to mount a filesystem by default. See section "Non-superuser mounts" below for more details.
60a2a323
KZ
89The previous contents (if any) and owner and mode of
90.I dir
91become invisible, and as long as this filesystem remains mounted,
92the pathname
93.I dir
94refers to the root of the filesystem on
95.IR device .
96
3711f113 97If only the directory or the device is given, for example:
60a2a323 98.RS
bcdf0978 99.sp
60a2a323 100.BI "mount /dir"
bcdf0978 101.sp
60a2a323 102.RE
3711f113
BS
103then \fBmount\fR looks for a mountpoint (and if not found then for a device) in the
104.IR /etc/fstab
105file. It's possible to use the
0d05f161 106.B \-\-target
aedeaa40 107or
0d05f161 108.B \-\-source
3711f113 109options to avoid ambivalent interpretation of the given argument. For example:
aedeaa40 110.RS
bcdf0978 111.sp
0d05f161 112.BI "mount \-\-target /mountpoint"
bcdf0978 113.sp
aedeaa40
KZ
114.RE
115
8e782a83
KZ
116The same filesystem may be mounted more than once, and in some cases (e.g.
117network filesystems) the same filesystem maybe be mounted on the same
118mountpoint more times. The mount command does not implement any policy to
119control this behavior. All behavior is controlled by kernel and it is usually
120specific to filesystem driver. The exception is \fB\-\-all\fR, in this case
f49cf49b 121already mounted filesystems are ignored (see \fB\-\-all\fR below for more details).
8e782a83 122
81421334 123.SS Listing the mounts
5f7c1890
KZ
124The listing mode is maintained for backward compatibility only.
125
3711f113 126For more robust and customizable output use
5f7c1890 127.BR findmnt (8),
3711f113 128\fBespecially in your scripts\fP. Note that control characters in the
5f7c1890
KZ
129mountpoint name are replaced with '?'.
130
3711f113
BS
131The following command lists all mounted filesystems (of type
132.IR type ):
3711f113 133.RS
bcdf0978 134.sp
0d05f161 135.BR "mount " [ \-l "] [" "\-t \fItype\/\fP" ]
bcdf0978 136.sp
3711f113 137.RE
3711f113 138The option \fB\-l\fR adds labels to this listing. See below.
60a2a323 139
0ed9c7d5 140.SS Indicating the device and filesystem
3711f113 141Most devices are indicated by a filename (of a block special device), like
60a2a323 142.IR /dev/sda1 ,
3711f113 143but there are other possibilities. For example, in the case of an NFS mount,
60a2a323
KZ
144.I device
145may look like
146.IR knuth.cwi.nl:/dir .
3711f113
BS
147It is also possible to indicate a block special device using its filesystem label
148or UUID (see the \fB\-L\fR and \fB\-U\fR options below), or its partition label
0ed9c7d5
KZ
149or UUID. Partition identifiers are supported for example for GUID Partition
150Tables (GPT).
151
152The device name of disk partitions are unstable; hardware reconfiguration,
153adding or removing a device can cause change in names. This is reason why it's
154strongly recommended to use filesystem or partition identificators like UUID or
155LABEL.
156
157The command \fBlsblk --fs\fR provides overview of filesystems, LABELs and UUIDs
158on available block devices. The command \fBblkid -p <device>\fR provides details about
159a filesystem on the specified device.
71e87708
KZ
160
161Don't forget that there is no guarantee that UUIDs and labels are really
162unique, especially if you move, share or copy the device. Use
0d05f161 163.B "lsblk \-o +UUID,PARTUUID"
71e87708 164to verify that the UUIDs are really unique in your system.
60a2a323 165
0ed9c7d5 166The recommended setup is to use tags (e.g.\& \fBUUID=\fIuuid\fR) rather than
46f057ed
MK
167.I /dev/disk/by-{label,uuid,partuuid,partlabel}
168udev symlinks in the
169.I /etc/fstab
170file. Tags are
3711f113 171more readable, robust and portable. The
60a2a323
KZ
172.BR mount (8)
173command internally uses udev
3711f113 174symlinks, so the use of symlinks in /etc/fstab has no advantage over tags.
60a2a323
KZ
175For more details see
176.BR libblkid (3).
177
178Note that
179.BR mount (8)
3711f113 180uses UUIDs as strings. The UUIDs from the command line or from
60a2a323 181.BR fstab (5)
3711f113 182are not converted to internal binary representation. The string representation
60a2a323
KZ
183of the UUID should be based on lower case characters.
184
185The
186.I proc
187filesystem is not associated with a special device, and when
188mounting it, an arbitrary keyword, such as
189.I proc
190can be used instead of a device specification.
191(The customary choice
192.I none
c72fa620
AJ
193is less fortunate: the error message `none already mounted' from
194.B mount
60a2a323 195can be confusing.)
60a2a323 196
81421334 197.SS The files /etc/fstab, /etc/mtab and /proc/mounts
60a2a323
KZ
198The file
199.I /etc/fstab
200(see
201.BR fstab (5)),
202may contain lines describing what devices are usually
3711f113 203mounted where, using which options. The default location of the
60a2a323 204.BR fstab (5)
3711f113
BS
205file can be overridden with the
206.BI \-\-fstab " path"
207command-line option (see below for more details).
60a2a323
KZ
208.LP
209The command
210.RS
211.sp
212.B mount \-a
213.RB [ \-t
214.IR type ]
215.RB [ \-O
216.IR optlist ]
217.sp
218.RE
219(usually given in a bootscript) causes all filesystems mentioned in
220.I fstab
221(of the proper type and/or having or not having the proper options)
222to be mounted as indicated, except for those whose line contains the
223.B noauto
3711f113 224keyword. Adding the
60a2a323 225.B \-F
00d1cc1d 226option will make \fBmount\fR fork, so that the
60a2a323
KZ
227filesystems are mounted simultaneously.
228.LP
229When mounting a filesystem mentioned in
0d05f161 230.I fstab
60a2a323 231or
0d05f161 232.IR mtab ,
3711f113 233it suffices to specify on the command line only the device, or only the mount point.
00d1cc1d 234.sp
60a2a323
KZ
235The programs
236.B mount
237and
238.B umount
00d1cc1d 239traditionally maintained a list of currently mounted filesystems in the file
60a2a323 240.IR /etc/mtab .
00d1cc1d
BS
241This real mtab file is still supported, but on current Linux systems it is
242better to make it a symlink to
06716dff 243.I /proc/mounts
00d1cc1d
BS
244instead, because a regular mtab file maintained in userspace cannot reliably
245work with namespaces, containers and other advanced Linux features.
246.sp
60a2a323
KZ
247If no arguments are given to
248.BR mount ,
00d1cc1d
BS
249the list of mounted filesystems is printed.
250.sp
3711f113
BS
251If you want to override mount options from
252.I /etc/fstab
253you have to use the \fB\-o\fR option:
254.RS
255.sp
256.BI mount " device" \fR| "dir " \-o " options"
257.sp
258.RE
259and then the mount options from the command line will be appended to
260the list of options from
261.IR /etc/fstab .
262The usual behavior is that the last option wins if there are conflicting
263ones.
00d1cc1d 264.sp
60a2a323
KZ
265The
266.B mount
267program does not read the
268.I /etc/fstab
3711f113 269file if both
60a2a323 270.I device
eb0eb262 271(or LABEL, UUID, PARTUUID or PARTLABEL) and
60a2a323 272.I dir
3711f113
BS
273are specified. For example, to mount device
274.BR foo " at " /dir :
60a2a323
KZ
275.RS
276.sp
277.B "mount /dev/foo /dir"
278.sp
279.RE
60a2a323 280
81421334 281.SS Non-superuser mounts
60a2a323
KZ
282Normally, only the superuser can mount filesystems.
283However, when
284.I fstab
285contains the
286.B user
3711f113 287option on a line, anybody can mount the corresponding filesystem.
60a2a323
KZ
288.LP
289Thus, given a line
290.RS
291.sp
292.B "/dev/cdrom /cd iso9660 ro,user,noauto,unhide"
293.sp
294.RE
3711f113 295any user can mount the iso9660 filesystem found on an inserted CDROM
bcdf0978 296using the command:
60a2a323 297.RS
60a2a323
KZ
298.B "mount /cd"
299.sp
300.RE
2480b527
KZ
301Note that \fBmount\fR is very strict about non-root users and all paths
302specified on command line are verified before fstab is parsed or a helper
cf41837f 303program is executed. It's strongly recommended to use a valid mountpoint to
2480b527
KZ
304specify filesystem, otherwise \fBmount\fR may fail. For example it's bad idea
305to use NFS or CIFS source on command line.
306.PP
60a2a323
KZ
307For more details, see
308.BR fstab (5).
309Only the user that mounted a filesystem can unmount it again.
3711f113 310If any user should be able to unmount it, then use
60a2a323
KZ
311.B users
312instead of
313.B user
314in the
315.I fstab
316line.
317The
318.B owner
319option is similar to the
320.B user
321option, with the restriction that the user must be the owner
3711f113 322of the special file. This may be useful e.g.\& for
60a2a323
KZ
323.I /dev/fd
324if a login script makes the console user owner of this device.
325The
326.B group
327option is similar, with the restriction that the user must be
328member of the group of the special file.
60a2a323 329
5109589c 330.SS Bind mount operation
9f3d0fce 331Remount part of the file hierarchy somewhere else. The call is:
3711f113 332
60a2a323
KZ
333.RS
334.br
0d05f161 335.B mount \-\-bind
60a2a323
KZ
336.I olddir newdir
337.RE
3711f113
BS
338
339or by using this fstab entry:
340
60a2a323
KZ
341.RS
342.br
3711f113
BS
343.BI / olddir
344.BI / newdir
fb724eef 345.B none bind
60a2a323
KZ
346.RE
347
3711f113 348After this call the same contents are accessible in two places.
5109589c
KZ
349
350It is important to understand that "bind" does not to create any second-class
351or special node in the kernel VFS. The "bind" is just another operation to
352attach a filesystem. There is nowhere stored information that the filesystem
353has been attached by "bind" operation. The \fIolddir\fR and \fInewdir\fR are
354independent and the \fIolddir\fR maybe be umounted.
355
3711f113 356One can also remount a single file (on a single file). It's also
60a2a323
KZ
357possible to use the bind mount to create a mountpoint from a regular
358directory, for example:
359
360.RS
361.br
3711f113 362.B mount \-\-bind foo foo
60a2a323
KZ
363.RE
364
365The bind mount call attaches only (part of) a single filesystem, not possible
3711f113
BS
366submounts. The entire file hierarchy including submounts is attached
367a second place by using:
60a2a323
KZ
368
369.RS
370.br
0d05f161 371.B mount \-\-rbind
60a2a323
KZ
372.I olddir newdir
373.RE
374
60a2a323 375Note that the filesystem mount options will remain the same as those
9ac77b8a
KZ
376on the original mount point.
377
bcdf0978
BS
378.BR mount (8)
379since v2.27 allows to change the mount options by passing the
380relevant options along with
381.BR \-\-bind .
382For example:
60a2a323
KZ
383
384.RS
385.br
417234cb 386.B mount -o bind,ro foo foo
60a2a323
KZ
387.RE
388
bcdf0978 389This feature is not supported by the Linux kernel; it is implemented in userspace
3be5d977
MK
390by an additional \fBmount\fR(2) remounting system call.
391This solution is not atomic.
9ac77b8a 392
bcdf0978 393The alternative (classic) way to create a read-only bind mount is to use the remount
9ac77b8a 394operation, for example:
60a2a323
KZ
395
396.RS
397.br
0d05f161 398.B mount \-\-bind
60a2a323
KZ
399.I olddir newdir
400.br
fa177917 401.B mount \-o remount,bind,ro
60a2a323
KZ
402.I olddir newdir
403.RE
d7890778 404
bcdf0978
BS
405Note that a read-only bind will create a read-only mountpoint (VFS entry),
406but the original filesystem superblock will still be writable, meaning that the
d7890778
KZ
407.I olddir
408will be writable, but the
409.I newdir
410will be read-only.
9ac77b8a 411
fa177917
KZ
412It's also possible to change nosuid, nodev, noexec, noatime, nodiratime and
413relatime VFS entry flags by "remount,bind" operation. It's impossible to change
414mount options recursively (for example with \fB-o rbind,ro\fR).
9b76b0e9
KZ
415
416.BR mount (8)
417since v2.31 ignores the \fBbind\fR flag from
418.I /etc/fstab
419on
420.B remount operation
421(if "-o remount" specified on command line). This is necessary to fully control
422mount options on remount by command line. In the previous versions the bind
423flag has been always applied and it was impossible to re-define mount options
424without interaction with the bind semantic. This
425.BR mount (8)
426behavior does not affect situations when "remount,bind" is specified in the
427.I /etc/fstab
428file.
60a2a323
KZ
429.RE
430
81421334 431.SS The move operation
9f3d0fce 432Move a
60a2a323 433.B mounted tree
9f3d0fce 434to another place (atomically). The call is:
3711f113 435
60a2a323
KZ
436.RS
437.br
0d05f161 438.B mount \-\-move
60a2a323
KZ
439.I olddir newdir
440.RE
3711f113
BS
441
442This will cause the contents which previously appeared under
443.I olddir
444to now be accessible under
445.IR newdir .
446The physical location of the files is not changed.
447Note that
60a2a323
KZ
448.I olddir
449has to be a mountpoint.
fcc0413a 450
3711f113
BS
451Note also that moving a mount residing under a shared mount is invalid and
452unsupported. Use
8a4c64e6 453.B findmnt \-o TARGET,PROPAGATION
fcc0413a 454to see the current propagation flags.
60a2a323 455
81421334 456.SS Shared subtree operations
60a2a323 457Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared,
3711f113
BS
458private, slave or unbindable. A shared mount provides the ability to create mirrors
459of that mount such that mounts and unmounts within any of the mirrors propagate
460to the other mirror. A slave mount receives propagation from its master, but
461not vice versa. A private mount carries no propagation abilities. An
60a2a323 462unbindable mount is a private mount which cannot be cloned through a bind
3711f113 463operation. The detailed semantics are documented in
46f057ed 464.I Documentation/filesystems/sharedsubtree.txt
60a2a323
KZ
465file in the kernel source tree.
466
3711f113
BS
467Supported operations are:
468
60a2a323
KZ
469.RS
470.nf
b06c1ca6
WP
471.BI "mount \-\-make\-shared " mountpoint
472.BI "mount \-\-make\-slave " mountpoint
473.BI "mount \-\-make\-private " mountpoint
474.BI "mount \-\-make\-unbindable " mountpoint
60a2a323
KZ
475.fi
476.RE
477
3711f113 478The following commands allow one to recursively change the type of all the
60a2a323
KZ
479mounts under a given mountpoint.
480
481.RS
482.nf
b06c1ca6
WP
483.BI "mount \-\-make\-rshared " mountpoint
484.BI "mount \-\-make\-rslave " mountpoint
485.BI "mount \-\-make\-rprivate " mountpoint
486.BI "mount \-\-make\-runbindable " mountpoint
60a2a323
KZ
487.fi
488.RE
be6904b9
KZ
489
490.BR mount (8)
491.B does not read
492.BR fstab (5)
3711f113
BS
493when a \fB\-\-make-\fR* operation is requested. All necessary information has to be
494specified on the command line.
be6904b9 495
3711f113
BS
496Note that the Linux kernel does not allow to change multiple propagation flags
497with a single
be6904b9 498.BR mount (2)
267b44e6
KZ
499system call, and the flags cannot be mixed with other mount options and operations.
500
501Since util-linux 2.23 the \fBmount\fR command allows to do more propagation
502(topology) changes by one mount(8) call and do it also together with other
503mount operations. This feature is EXPERIMENTAL. The propagation flags are applied
504by additional \fBmount\fR(2) system calls when the preceding mount operations
505were successful. Note that this use case is not atomic. It is possible to
506specify the propagation flags in
be6904b9
KZ
507.BR fstab (5)
508as mount options
3711f113
BS
509.RB ( private ,
510.BR slave ,
511.BR shared ,
512.BR unbindable ,
513.BR rprivate ,
514.BR rslave ,
515.BR rshared ,
516.BR runbindable ).
517
518For example:
519
be6904b9
KZ
520.RS
521.nf
b06c1ca6 522.BI "mount \-\-make\-private \-\-make\-unbindable /dev/sda1 /foo"
be6904b9
KZ
523.fi
524.RE
525
3711f113
BS
526is the same as:
527
be6904b9
KZ
528.RS
529.nf
3711f113 530.BI "mount /dev/sda1 /foo"
b06c1ca6
WP
531.BI "mount \-\-make\-private /foo"
532.BI "mount \-\-make\-unbindable /foo"
be6904b9
KZ
533.fi
534.RE
60a2a323 535
3711f113 536.SH COMMAND-LINE OPTIONS
60a2a323
KZ
537The full set of mount options used by an invocation of
538.B mount
539is determined by first extracting the
540mount options for the filesystem from the
541.I fstab
542table, then applying any options specified by the
543.B \-o
544argument, and finally applying a
545.BR \-r " or " \-w
546option, when present.
547
3711f113
BS
548The command \fBmount\fR does not pass all command-line options to the
549\fB/sbin/mount.\fIsuffix\fR mount helpers. The interface between \fBmount\fR
81421334 550and the mount helpers is described below in the section \fBEXTERNAL HELPERS\fR.
00d1cc1d 551.sp
3711f113 552Command-line options available for the
60a2a323 553.B mount
3711f113 554command are:
00d1cc1d
BS
555.TP
556.BR \-a , " \-\-all"
60a2a323 557Mount all filesystems (of the given types) mentioned in
0d05f161 558.I fstab
31e93a55
KZ
559(except for those whose line contains the
560.B noauto
3711f113
BS
561keyword). The filesystems are mounted following their order in
562.IR fstab .
f49cf49b
KZ
563The mount command compares filesystem source, target (and fs root for bind
564mount or btrfs) to detect already mounted filesystems. The kernel table with
565already mounted filesystems is cached during \fBmount \-\-all\fR. It means
566that all duplicated fstab entries will be mounted.
302419e8 567.sp
f3af8329 568Note that it is a bad practice to use \fBmount \-a\fR for
302419e8
KZ
569.IR fstab
570checking. The recommended solution is \fBfindmnt \-\-verify\fR.
00d1cc1d
BS
571.TP
572.BR \-B , " \-\-bind"
573Remount a subtree somewhere else (so that its contents are available
81421334 574in both places). See above, under \fBBind mounts\fR.
00d1cc1d 575.TP
b06c1ca6 576.BR \-c , " \-\-no\-canonicalize"
00d1cc1d
BS
577Don't canonicalize paths. The mount command canonicalizes all paths
578(from command line or fstab) by default. This option can be used
579together with the
580.B \-f
581flag for already canonicalized absolute paths. The option is designed for mount
582helpers which call \fBmount -i\fR. It is strongly recommended to not use this
583command-line option for normal mount operations.
584.sp
585Note that \fBmount\fR(8) does not pass this option to the
586\fB/sbin/mount.\fItype\fR helpers.
587.TP
588.BR \-F , " \-\-fork"
60a2a323
KZ
589(Used in conjunction with
590.BR \-a .)
3711f113 591Fork off a new incarnation of \fBmount\fR for each device.
60a2a323
KZ
592This will do the mounts on different devices or different NFS servers
593in parallel.
594This has the advantage that it is faster; also NFS timeouts go in
3711f113 595parallel. A disadvantage is that the mounts are done in undefined order.
60a2a323
KZ
596Thus, you cannot use this option if you want to mount both
597.I /usr
598and
599.IR /usr/spool .
600.IP "\fB\-f, \-\-fake\fP"
601Causes everything to be done except for the actual system call; if it's not
602obvious, this ``fakes'' mounting the filesystem. This option is useful in
603conjunction with the
604.B \-v
605flag to determine what the
606.B mount
3711f113
BS
607command is trying to do. It can also be used to add entries for devices
608that were mounted earlier with the \fB\-n\fR option. The \fB\-f\fR option
609checks for an existing record in /etc/mtab and fails when the record already
610exists (with a regular non-fake mount, this check is done by the kernel).
b06c1ca6 611.IP "\fB\-i, \-\-internal\-only\fP"
3711f113 612Don't call the \fB/sbin/mount.\fIfilesystem\fR helper even if it exists.
00d1cc1d
BS
613.TP
614.BR \-L , " \-\-label " \fIlabel
615Mount the partition that has the specified
616.IR label .
617.TP
b06c1ca6 618.BR \-l , " \-\-show\-labels"
3711f113 619Add the labels in the mount output. \fBmount\fR must have
aedd46f6 620permission to read the disk device (e.g.\& be set-user-ID root) for this to work.
60a2a323
KZ
621One can set such a label for ext2, ext3 or ext4 using the
622.BR e2label (8)
623utility, or for XFS using
624.BR xfs_admin (8),
625or for reiserfs using
626.BR reiserfstune (8).
00d1cc1d
BS
627.TP
628.BR \-M , " \-\-move"
81421334
BS
629Move a subtree to some other place. See above, the subsection
630\fBThe move operation\fR.
00d1cc1d 631.TP
b06c1ca6 632.BR \-n , " \-\-no\-mtab"
60a2a323
KZ
633Mount without writing in
634.IR /etc/mtab .
635This is necessary for example when
636.I /etc
637is on a read-only filesystem.
00d1cc1d 638.TP
b06c1ca6 639.BR \-O , " \-\-test\-opts " \fIopts
00d1cc1d
BS
640Limit the set of filesystems to which the
641.B \-a
642option applies. In this regard it is like the
643.B \-t
644option except that
645.B \-O
646is useless without
647.BR \-a .
648For example, the command:
649.RS
650.RS
651.sp
652.B "mount \-a \-O no_netdev"
653.sp
654.RE
655mounts all filesystems except those which have the option
656.I _netdev
657specified in the options field in the
658.I /etc/fstab
659file.
4593e075 660
00d1cc1d
BS
661It is different from
662.B \-t
663in that each option is matched exactly; a leading
664.B no
665at the beginning of one option does not negate the rest.
666
667The
668.B \-t
669and
670.B \-O
671options are cumulative in effect; that is, the command
672.RS
673.sp
674.B "mount \-a \-t ext2 \-O _netdev"
675.sp
676.RE
677mounts all ext2 filesystems with the _netdev option, not all filesystems
678that are either ext2 or have the _netdev option specified.
679.RE
680.TP
681.BR \-o , " \-\-options " \fIopts
682Use the specified mount options. The \fIopts\fR argument is
683a comma-separated list. For example:
684.RS
685.RS
686.sp
687.B "mount LABEL=mydisk \-o noatime,nodev,nosuid"
688.sp
689.RE
690
691For more details, see the
692.B FILESYSTEM-INDEPENDENT MOUNT OPTIONS
693and
694.B FILESYSTEM-SPECIFIC MOUNT OPTIONS
695sections.
696.RE
697
698.TP
699.BR \-R , " \-\-rbind"
700Remount a subtree and all possible submounts somewhere else (so that its
81421334
BS
701contents are available in both places). See above, the subsection
702\fBBind mounts\fR.
00d1cc1d 703.TP
b06c1ca6 704.BR \-r , " \-\-read\-only"
3711f113 705Mount the filesystem read-only. A synonym is
60a2a323 706.BR "\-o ro" .
00d1cc1d 707.sp
60a2a323 708Note that, depending on the filesystem type, state and kernel behavior, the
3711f113
BS
709system may still write to the device. For example, ext3 and ext4 will replay the
710journal if the filesystem is dirty. To prevent this kind of write access, you
711may want to mount an ext3 or ext4 filesystem with the \fBro,noload\fR mount
712options or set the block device itself to read-only mode, see the
713.BR blockdev (8)
714command.
00d1cc1d
BS
715.TP
716.B \-s
717Tolerate sloppy mount options rather than failing. This will ignore mount
718options not supported by a filesystem type. Not all filesystems support this
719option. Currently it's supported by the \fBmount.nfs\fR mount helper only.
720.TP
721.BI \-\-source " device"
722If only one argument for the mount command is given then the argument might be
723interpreted as target (mountpoint) or source (device). This option allows to
724explicitly define that the argument is the mount source.
725.TP
726.BI \-\-target " directory"
727If only one argument for the mount command is given then the argument might be
728interpreted as target (mountpoint) or source (device). This option allows to
729explicitly define that the argument is the mount target.
730.TP
731.BR \-T , " \-\-fstab " \fIpath
3711f113 732Specifies an alternative fstab file. If \fIpath\fP is a directory then the files
c633953c 733in the directory are sorted by
3711f113
BS
734.BR strverscmp (3);
735files that start with "."\& or without an \&.fstab extension are ignored. The option
736can be specified more than once. This option is mostly designed for initramfs
737or chroot scripts where additional configuration is specified beyond standard
c633953c 738system configuration.
00d1cc1d 739.sp
3711f113
BS
740Note that \fBmount\fR(8) does not pass the option \fB\-\-fstab\fP to the
741\fB/sbin/mount.\fItype\fR helpers, meaning that the alternative fstab files will be
742invisible for the helpers. This is no problem for normal mounts, but user
743(non-root) mounts always require fstab to verify the user's rights.
00d1cc1d
BS
744.TP
745.BR \-t , " \-\-types " \fIfstype
60a2a323
KZ
746The argument following the
747.B \-t
748is used to indicate the filesystem type. The filesystem types which are
00d1cc1d 749currently supported depend on the running kernel. See
e9b6e76a 750.I /proc/filesystems
60a2a323 751and
e9b6e76a 752.I /lib/modules/$(uname -r)/kernel/fs
00d1cc1d 753for a complete list of the filesystems. The most common are ext2, ext3, ext4,
e9b6e76a 754xfs, btrfs, vfat, sysfs, proc, nfs and cifs.
00d1cc1d 755.sp
60a2a323
KZ
756The programs
757.B mount
758and
759.B umount
3711f113
BS
760support filesystem subtypes. The subtype is defined by a '.subtype' suffix. For
761example 'fuse.sshfs'. It's recommended to use subtype notation rather than add
60a2a323 762any prefix to the mount source (for example 'sshfs#example.com' is
ef75bc88 763deprecated).
60a2a323 764
60a2a323
KZ
765If no
766.B \-t
767option is given, or if the
768.B auto
769type is specified, mount will try to guess the desired type.
770Mount uses the blkid library for guessing the filesystem
771type; if that does not turn up anything that looks familiar,
772mount will try to read the file
773.IR /etc/filesystems ,
774or, if that does not exist,
775.IR /proc/filesystems .
776All of the filesystem types listed there will be tried,
81421334 777except for those that are labeled "nodev" (e.g.\&
60a2a323
KZ
778.IR devpts ,
779.I proc
780and
781.IR nfs ).
782If
783.I /etc/filesystems
3711f113 784ends in a line with a single *, mount will read
60a2a323 785.I /proc/filesystems
3711f113
BS
786afterwards. While trying, all filesystem types will be
787mounted with the mount option \fBsilent\fR.
00d1cc1d 788.sp
60a2a323
KZ
789The
790.B auto
791type may be useful for user-mounted floppies.
792Creating a file
793.I /etc/filesystems
794can be useful to change the probe order (e.g., to try vfat before msdos
795or ext3 before ext2) or if you use a kernel module autoloader.
00d1cc1d 796.sp
3711f113 797More than one type may be specified in a comma-separated
00d1cc1d 798list, for option
e9b6e76a 799.B \-t
00d1cc1d 800as well as in an
e9b6e76a 801.I /etc/fstab
00d1cc1d
BS
802entry. The list of filesystem types for option
803.B \-t
e9b6e76a 804can be prefixed with
60a2a323
KZ
805.B no
806to specify the filesystem types on which no action should be taken.
e9b6e76a
KZ
807The prefix
808.B no
00d1cc1d 809has no effect when specified in an
e9b6e76a
KZ
810.I /etc/fstab
811entry.
00d1cc1d 812.sp
e9b6e76a
KZ
813The prefix
814.B no
815can be meaningful with the
60a2a323 816.B \-a
e9b6e76a 817option. For example, the command
60a2a323
KZ
818.RS
819.RS
820.sp
6070a985 821.B "mount \-a \-t nomsdos,smbfs"
60a2a323
KZ
822.sp
823.RE
824mounts all filesystems except those of type
825.I msdos
826and
6070a985
BS
827.IR smbfs .
828.sp
e9b6e76a
KZ
829For most types all the
830.B mount
831program has to do is issue a simple
42632a90 832.BR mount (2)
e9b6e76a
KZ
833system call, and no detailed knowledge of the filesystem type is required.
834For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) an ad hoc code is
835necessary. The nfs, nfs4, cifs, smbfs, and ncpfs filesystems
836have a separate mount program. In order to make it possible to
837treat all types in a uniform way, \fBmount\fR will execute the program
838.BI /sbin/mount. type
839(if that exists) when called with type
840.IR type .
841Since different versions of the
842.B smbmount
843program have different calling conventions,
844.B /sbin/mount.smbfs
845may have to be a shell script that sets up the desired call.
60a2a323 846.RE
00d1cc1d
BS
847.TP
848.BR \-U , " \-\-uuid " \fIuuid
849Mount the partition that has the specified
850.IR uuid .
851.TP
852.BR \-v , " \-\-verbose"
853Verbose mode.
854.TP
b06c1ca6 855.BR \-w , " \-\-rw" , " \-\-read\-write"
6dede2f2 856Mount the filesystem read/write. The read-write is kernel default. A synonym is
00d1cc1d 857.BR "\-o rw" .
6dede2f2
KZ
858
859Note that specify \fB\-w\fR on command line forces \fBmount\fR command
860to never try read-only mount on write-protected devices. The default is
861try read-only if the previous mount syscall with read-write flags failed.
00d1cc1d
BS
862.TP
863.BR \-V , " \-\-version"
864Display version information and exit.
865.TP
866.BR \-h , " \-\-help"
867Display help text and exit.
60a2a323 868
3711f113 869.SH FILESYSTEM-INDEPENDENT MOUNT OPTIONS
60a2a323
KZ
870Some of these options are only useful when they appear in the
871.I /etc/fstab
872file.
873
874Some of these options could be enabled or disabled by default
3711f113
BS
875in the system kernel. To check the current setting see the options
876in /proc/mounts. Note that filesystems also have per-filesystem
58d1d54d
KZ
877specific default mount options (see for example \fBtune2fs \-l\fP
878output for extN filesystems).
60a2a323
KZ
879
880The following options apply to any filesystem that is being
0d05f161 881mounted (but not every filesystem actually honors them \(en e.g.\&, the
60a2a323 882.B sync
3711f113 883option today has an effect only for ext2, ext3, fat, vfat and ufs):
60a2a323
KZ
884
885.TP
886.B async
3711f113 887All I/O to the filesystem should be done asynchronously. (See also the
60a2a323
KZ
888.B sync
889option.)
890.TP
891.B atime
81421334
BS
892Do not use the \fBnoatime\fR feature, so the inode access time is controlled
893by kernel defaults. See also the descriptions of the \fB\%relatime\fR and
60a2a323 894.B strictatime
60a2a323
KZ
895mount options.
896.TP
897.B noatime
81421334
BS
898Do not update inode access times on this filesystem (e.g.\& for faster
899access on the news spool to speed up news servers). This works for all
900inode types (directories too), so it implies \fB\%nodiratime\fR.
60a2a323
KZ
901.TP
902.B auto
903Can be mounted with the
904.B \-a
905option.
906.TP
907.B noauto
908Can only be mounted explicitly (i.e., the
909.B \-a
910option will not cause the filesystem to be mounted).
911.TP
81421334
BS
912.na
913.BR context=\fIcontext ", " fscontext=\fIcontext ", " defcontext=\fIcontext ", and " \%rootcontext=\fIcontext
914.ad
60a2a323 915The
0d05f161 916.B context=
60a2a323
KZ
917option is useful when mounting filesystems that do not support
918extended attributes, such as a floppy or hard disk formatted with VFAT, or
919systems that are not normally running under SELinux, such as an ext3 formatted
3711f113 920disk from a non-SELinux workstation. You can also use
0d05f161 921.B context=
3711f113
BS
922on filesystems you do not trust, such as a floppy. It also helps in compatibility with
923xattr-supporting filesystems on earlier 2.4.<x> kernel versions. Even where
60a2a323
KZ
924xattrs are supported, you can save time not having to label every file by
925assigning the entire disk one security context.
926
927A commonly used option for removable media is
81421334 928.BR \%context="system_u:object_r:removable_t" .
60a2a323
KZ
929
930Two other options are
0d05f161 931.B fscontext=
60a2a323
KZ
932and
933.BR defcontext= ,
3711f113 934both of which are mutually exclusive of the context option. This means you
60a2a323
KZ
935can use fscontext and defcontext with each other, but neither can be used with
936context.
937
938The
0d05f161 939.B fscontext=
60a2a323 940option works for all filesystems, regardless of their xattr
3711f113
BS
941support. The fscontext option sets the overarching filesystem label to a
942specific security context. This filesystem label is separate from the
943individual labels on the files. It represents the entire filesystem for
60a2a323
KZ
944certain kinds of permission checks, such as during mount or file creation.
945Individual file labels are still obtained from the xattrs on the files
3711f113 946themselves. The context option actually sets the aggregate context that
60a2a323
KZ
947fscontext provides, in addition to supplying the same label for individual
948files.
949
950You can set the default security context for unlabeled files using
0d05f161 951.B defcontext=
3711f113 952option. This overrides the value set for unlabeled files in the policy and requires a
60a2a323
KZ
953filesystem that supports xattr labeling.
954
955The
0d05f161 956.B rootcontext=
60a2a323 957option allows you to explicitly label the root inode of a FS being mounted
60c02107 958before that FS or inode becomes visible to userspace. This was found to be
60a2a323
KZ
959useful for things like stateless linux.
960
60c02107
BS
961Note that the kernel rejects any remount request that includes the context
962option, \fBeven\fP when unchanged from the current context.
60a2a323 963
60c02107
BS
964.BR "Warning: the \fIcontext\fP value might contain commas" ,
965in which case the value has to be properly quoted, otherwise
60a2a323 966.BR mount (8)
60c02107
BS
967will interpret the comma as a separator between mount options. Don't forget that
968the shell strips off quotes and thus
969.BR "double quoting is required" .
970For example:
60a2a323
KZ
971.RS
972.RS
973.sp
0d05f161
BIG
974.nf
975.B mount \-t tmpfs none /mnt \-o \e
81421334 976.B \ \ 'context="system_u:object_r:tmp_t:s0:c127,c456",noexec'
0d05f161 977.fi
60a2a323
KZ
978.sp
979.RE
60a2a323 980For more details, see
60c02107 981.BR selinux (8).
60a2a323
KZ
982.RE
983
984.TP
985.B defaults
3711f113
BS
986Use the default options:
987.BR rw ", " suid ", " dev ", " exec ", " auto ", " nouser ", and " async .
58d1d54d 988
3711f113
BS
989Note that the real set of all default mount options depends on kernel
990and filesystem type. See the beginning of this section for more details.
60a2a323
KZ
991.TP
992.B dev
993Interpret character or block special devices on the filesystem.
994.TP
995.B nodev
996Do not interpret character or block special devices on the file
997system.
998.TP
999.B diratime
3711f113 1000Update directory inode access times on this filesystem. This is the default.
81421334 1001(This option is ignored when \fBnoatime\fR is set.)
60a2a323
KZ
1002.TP
1003.B nodiratime
81421334
BS
1004Do not update directory inode access times on this filesystem.
1005(This option is implied when \fBnoatime\fR is set.)
60a2a323
KZ
1006.TP
1007.B dirsync
1008All directory updates within the filesystem should be done synchronously.
1009This affects the following system calls: creat, link, unlink, symlink,
1010mkdir, rmdir, mknod and rename.
1011.TP
1012.B exec
1013Permit execution of binaries.
1014.TP
1015.B noexec
3711f113 1016Do not permit direct execution of any binaries on the mounted filesystem.
60a2a323
KZ
1017.TP
1018.B group
00d1cc1d
BS
1019Allow an ordinary user to mount the filesystem if one
1020of that user's groups matches the group of the device.
60a2a323
KZ
1021This option implies the options
1022.BR nosuid " and " nodev
1023(unless overridden by subsequent options, as in the option line
1024.BR group,dev,suid ).
1025.TP
1026.B iversion
1027Every time the inode is modified, the i_version field will be incremented.
1028.TP
1029.B noiversion
1030Do not increment the i_version inode field.
1031.TP
1032.B mand
3711f113 1033Allow mandatory locks on this filesystem. See
60a2a323
KZ
1034.BR fcntl (2).
1035.TP
1036.B nomand
1037Do not allow mandatory locks on this filesystem.
1038.TP
1039.B _netdev
1040The filesystem resides on a device that requires network access
1041(used to prevent the system from attempting to mount these filesystems
1042until the network has been enabled on the system).
1043.TP
1044.B nofail
1045Do not report errors for this device if it does not exist.
1046.TP
1047.B relatime
1048Update inode access times relative to modify or change time. Access
1049time is only updated if the previous access time was earlier than the
81421334 1050current modify or change time. (Similar to \fB\%noatime\fR, but it doesn't
3711f113
BS
1051break \fBmutt\fR or other applications that need to know if a file has been
1052read since the last time it was modified.)
60a2a323
KZ
1053
1054Since Linux 2.6.30, the kernel defaults to the behavior provided by this
1055option (unless
81421334 1056.B \%noatime
3711f113 1057was specified), and the
81421334 1058.B \%strictatime
3711f113
BS
1059option is required to obtain traditional semantics. In addition, since Linux
10602.6.30, the file's last access time is always updated if it is more than 1
60a2a323
KZ
1061day old.
1062.TP
1063.B norelatime
3711f113 1064Do not use the
60a2a323 1065.B relatime
3711f113 1066feature. See also the
60a2a323
KZ
1067.B strictatime
1068mount option.
1069.TP
1070.B strictatime
3711f113
BS
1071Allows to explicitly request full atime updates. This makes it
1072possible for the kernel to default to
81421334 1073.B \%relatime
60a2a323 1074or
81421334 1075.B \%noatime
3711f113 1076but still allow userspace to override it. For more details about the default
60a2a323
KZ
1077system mount options see /proc/mounts.
1078.TP
1079.B nostrictatime
ee312c65 1080Use the kernel's default behavior for inode access time updates.
60a2a323 1081.TP
8c7f073a
KZ
1082.B lazytime
1083Only update times (atime, mtime, ctime) on the in-memory version of the file inode.
1084
1085This mount option significantly reduces writes to the inode table for
1086workloads that perform frequent random writes to preallocated files.
8c7f073a
KZ
1087
1088The on-disk timestamps are updated only when:
1089.sp
1090.RS
1091- the inode needs to be updated for some change unrelated to file timestamps
1092.sp
1093- the application employs
1094.BR fsync (2),
1095.BR syncfs (2),
1096or
1097.BR sync (2)
1098.sp
1099- an undeleted inode is evicted from memory
1100.sp
1101- more than 24 hours have passed since the i-node was written to disk.
1102.RE
1103.sp
1104.TP
1105.B nolazytime
c4417ee9 1106Do not use the lazytime feature.
8c7f073a 1107.TP
60a2a323 1108.B suid
aedd46f6 1109Allow set-user-ID or set-group-ID bits to take
60a2a323
KZ
1110effect.
1111.TP
1112.B nosuid
aedd46f6 1113Do not allow set-user-ID or set-group-ID bits to take
c12e0662 1114effect.
60a2a323
KZ
1115.TP
1116.B silent
1117Turn on the silent flag.
1118.TP
1119.B loud
1120Turn off the silent flag.
1121.TP
1122.B owner
00d1cc1d
BS
1123Allow an ordinary user to mount the filesystem if that
1124user is the owner of the device.
60a2a323
KZ
1125This option implies the options
1126.BR nosuid " and " nodev
1127(unless overridden by subsequent options, as in the option line
1128.BR owner,dev,suid ).
1129.TP
1130.B remount
1131Attempt to remount an already-mounted filesystem. This is commonly
1132used to change the mount flags for a filesystem, especially to make a
3711f113 1133readonly filesystem writable. It does not change device or mount point.
60a2a323 1134
9b76b0e9
KZ
1135The remount operation together with the
1136.B bind
1137flag has special semantic. See above, the subsection \fBBind mounts\fR.
1138
24983035 1139The remount functionality follows the standard way the mount command works
81421334
BS
1140with options from fstab. This means that \fBmount\fR does not
1141read fstab (or mtab) only when both
0d05f161 1142.I device
60a2a323 1143and
0d05f161 1144.I dir
3711f113 1145are specified.
81421334
BS
1146.sp
1147.in +4
0d05f161 1148.B "mount \-o remount,rw /dev/foo /dir"
81421334
BS
1149.in
1150.sp
60a2a323 1151After this call all old mount options are replaced and arbitrary stuff from
24983035
KZ
1152fstab (or mtab) is ignored, except the loop= option which is internally
1153generated and maintained by the mount command.
81421334
BS
1154.sp
1155.in +4
0d05f161 1156.B "mount \-o remount,rw /dir"
81421334
BS
1157.in
1158.sp
1159After this call, mount reads fstab and merges these options with
1160the options from the command line (\fB\-o\fR).
1161If no mountpoint is found in fstab, then a remount with unspecified source is
24983035 1162allowed.
60a2a323
KZ
1163.TP
1164.B ro
1165Mount the filesystem read-only.
1166.TP
1167.B rw
1168Mount the filesystem read-write.
1169.TP
1170.B sync
3711f113
BS
1171All I/O to the filesystem should be done synchronously. In the case of
1172media with a limited number of write cycles
1173(e.g.\& some flash drives), \fBsync\fR may cause life-cycle shortening.
60a2a323
KZ
1174.TP
1175.B user
1176Allow an ordinary user to mount the filesystem.
00d1cc1d
BS
1177The name of the mounting user is written to the mtab file (or to the private
1178libmount file in /run/mount on systems without a regular mtab) so that this
1179same user can unmount the filesystem again.
60a2a323
KZ
1180This option implies the options
1181.BR noexec ", " nosuid ", and " nodev
1182(unless overridden by subsequent options, as in the option line
1183.BR user,exec,dev,suid ).
1184.TP
1185.B nouser
00d1cc1d 1186Forbid an ordinary user to mount the filesystem.
08626e33 1187This is the default; it does not imply any other options.
60a2a323
KZ
1188.TP
1189.B users
00d1cc1d
BS
1190Allow any user to mount and to unmount the filesystem, even
1191when some other ordinary user mounted it.
60a2a323
KZ
1192This option implies the options
1193.BR noexec ", " nosuid ", and " nodev
1194(unless overridden by subsequent options, as in the option line
1195.BR users,exec,dev,suid ).
f3242e06 1196.TP
0a14cc8b
KZ
1197.B X-*
1198All options prefixed with "X-" are interpreted as comments or as userspace
83601b1a 1199application-specific options. These options are not stored in the user space (e.g. mtab file),
00d1cc1d 1200nor sent to the mount.\fItype\fR helpers nor to the
0d05f161 1201.BR mount (2)
0a14cc8b 1202system call. The suggested format is \fBX-\fIappname\fR.\fIoption\fR.
83601b1a 1203.TP
0a14cc8b
KZ
1204.B x-*
1205The same as \fBX-*\fR options, but stored permanently in the user space. It
83601b1a 1206means the options are also available for umount or another operations. Note
0a14cc8b
KZ
1207that maintain mount options in user space is tricky, because it's necessary use
1208libmount based tools and there is no guarantee that the options will be always
1209available (for example after a move mount operation or in unshared namespace).
5c493bd9 1210
0a14cc8b
KZ
1211Note that before util-linux v2.30 the x-* options have not been maintained by
1212libmount and stored in user space (functionality was the same as have X-* now),
1213but due to growing number of use-cases (in initrd, systemd etc.) the
1214functionality have been extended to keep existing fstab configurations usable
1215without a change.
701c6961 1216.TP
0a14cc8b 1217.BR X-mount.mkdir [ = \fImode\fR ]
3711f113
BS
1218Allow to make a target directory (mountpoint). The optional argument
1219.I mode
1220specifies the filesystem access mode used for
0d05f161 1221.BR mkdir (2)
3711f113 1222in octal notation. The default mode is 0755. This functionality is supported
0a14cc8b
KZ
1223only for root users. The option is also supported as x-mount.mkdir, this notation
1224is deprecated for mount.mkdir since v2.30.
60a2a323 1225
3711f113 1226.SH "FILESYSTEM-SPECIFIC MOUNT OPTIONS"
0aade1d3
MF
1227You should consult the respective man page for the filesystem first.
1228If you want to know what options the ext4 filesystem supports, then check the
1229.BR ext4 (5)
1230man page.
1231If that doesn't exist, you can also check the corresponding mount page like
1232.BR mount.cifs (8).
1233Note that you might have to install the respective userland tools.
1234.sp
60a2a323 1235The following options apply only to certain filesystems.
3711f113 1236We sort them by filesystem. They all follow the
60a2a323
KZ
1237.B \-o
1238flag.
00d1cc1d 1239.sp
60a2a323
KZ
1240What options are supported depends a bit on the running kernel.
1241More info may be found in the kernel source subdirectory
1242.IR Documentation/filesystems .
1243
81421334 1244.SS "Mount options for adfs"
60a2a323 1245.TP
0d05f161 1246\fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
60a2a323
KZ
1247Set the owner and group of the files in the filesystem (default: uid=gid=0).
1248.TP
0d05f161 1249\fBownmask=\fP\,\fIvalue\fP and \fBothmask=\fP\,\fIvalue\fP
60a2a323
KZ
1250Set the permission mask for ADFS 'owner' permissions and 'other' permissions,
1251respectively (default: 0700 and 0077, respectively).
1252See also
1253.IR /usr/src/linux/Documentation/filesystems/adfs.txt .
81421334
BS
1254
1255.SS "Mount options for affs"
60a2a323 1256.TP
0d05f161 1257\fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
60a2a323
KZ
1258Set the owner and group of the root of the filesystem (default: uid=gid=0,
1259but with option
1260.B uid
1261or
1262.B gid
a72fa61a 1263without specified value, the UID and GID of the current process are taken).
60a2a323 1264.TP
0d05f161 1265\fBsetuid=\fP\,\fIvalue\fP and \fBsetgid=\fP\,\fIvalue\fP
60a2a323
KZ
1266Set the owner and group of all files.
1267.TP
1268.BI mode= value
1269Set the mode of all files to
1270.IR value " & 0777"
1271disregarding the original permissions.
1272Add search permission to directories that have read permission.
1273The value is given in octal.
1274.TP
1275.B protect
1276Do not allow any changes to the protection bits on the filesystem.
1277.TP
1278.B usemp
a72fa61a 1279Set UID and GID of the root of the filesystem to the UID and GID
60a2a323 1280of the mount point upon the first sync or umount, and then
3711f113 1281clear this option. Strange...
60a2a323
KZ
1282.TP
1283.B verbose
1284Print an informational message for each successful mount.
1285.TP
1286.BI prefix= string
1287Prefix used before volume name, when following a link.
1288.TP
1289.BI volume= string
1290Prefix (of length at most 30) used before '/' when following a symbolic link.
1291.TP
1292.BI reserved= value
1293(Default: 2.) Number of unused blocks at the start of the device.
1294.TP
1295.BI root= value
1296Give explicitly the location of the root block.
1297.TP
1298.BI bs= value
3711f113 1299Give blocksize. Allowed values are 512, 1024, 2048, 4096.
60a2a323
KZ
1300.TP
1301.BR grpquota | noquota | quota | usrquota
1302These options are accepted but ignored.
1303(However, quota utilities may react to such strings in
1304.IR /etc/fstab .)
81421334 1305
81421334 1306.SS "Mount options for debugfs"
60a2a323
KZ
1307The debugfs filesystem is a pseudo filesystem, traditionally mounted on
1308.IR /sys/kernel/debug .
1309.\" or just /debug
1310.\" present since 2.6.11
88633047
DR
1311As of kernel version 3.4, debugfs has the following options:
1312.TP
1313.BI uid= n ", gid=" n
1314Set the owner and group of the mountpoint.
1315.TP
1316.BI mode= value
1317Sets the mode of the mountpoint.
81421334
BS
1318
1319.SS "Mount options for devpts"
60a2a323
KZ
1320The devpts filesystem is a pseudo filesystem, traditionally mounted on
1321.IR /dev/pts .
1322In order to acquire a pseudo terminal, a process opens
1323.IR /dev/ptmx ;
1324the number of the pseudo terminal is then made available to the process
1325and the pseudo terminal slave can be accessed as
1326.IR /dev/pts/ <number>.
1327.TP
0d05f161 1328\fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
60a2a323 1329This sets the owner or the group of newly created PTYs to
3711f113 1330the specified values. When nothing is specified, they will
60a2a323
KZ
1331be set to the UID and GID of the creating process.
1332For example, if there is a tty group with GID 5, then
1333.B gid=5
1334will cause newly created PTYs to belong to the tty group.
1335.TP
1336.BI mode= value
1337Set the mode of newly created PTYs to the specified value.
1338The default is 0600.
1339A value of
1340.B mode=620
1341and
1342.B gid=5
1343makes "mesg y" the default on newly created PTYs.
1344.TP
1345\fBnewinstance
1346Create a private instance of devpts filesystem, such that
1347indices of ptys allocated in this new instance are
1348independent of indices created in other instances of devpts.
1349
1350All mounts of devpts without this
1351.B newinstance
1352option share the same set of pty indices (i.e legacy mode).
1353Each mount of devpts with the
1354.B newinstance
1355option has a private set of pty indices.
1356
1357This option is mainly used to support containers in the
3711f113 1358linux kernel. It is implemented in linux kernel versions
60a2a323
KZ
1359starting with 2.6.29. Further, this mount option is valid
1360only if CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the
1361kernel configuration.
1362
1363To use this option effectively,
0d05f161 1364.I /dev/ptmx
60a2a323 1365must be a symbolic link to
0d05f161 1366.I pts/ptmx.
60a2a323 1367See
0d05f161 1368.I Documentation/filesystems/devpts.txt
60a2a323
KZ
1369in the linux kernel source tree for details.
1370.TP
1371.BI ptmxmode= value
1372
1373Set the mode for the new
0d05f161 1374.I ptmx
60a2a323
KZ
1375device node in the devpts filesystem.
1376
1377With the support for multiple instances of devpts (see
1378.B newinstance
1379option above), each instance has a private
0d05f161 1380.I ptmx
60a2a323 1381node in the root of the devpts filesystem (typically
0d05f161 1382.IR /dev/pts/ptmx ).
60a2a323
KZ
1383
1384For compatibility with older versions of the kernel, the
1385default mode of the new
0d05f161 1386.I ptmx
60a2a323
KZ
1387node is 0000.
1388.BI ptmxmode= value
1389specifies a more useful mode for the
0d05f161 1390.I ptmx
60a2a323
KZ
1391node and is highly recommended when the
1392.B newinstance
1393option is specified.
1394
1395This option is only implemented in linux kernel versions
3711f113 1396starting with 2.6.29. Further, this option is valid only if
60a2a323
KZ
1397CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the kernel
1398configuration.
1399
81421334 1400.SS "Mount options for fat"
60a2a323
KZ
1401(Note:
1402.I fat
1403is not a separate filesystem, but a common part of the
1404.IR msdos ,
1405.I umsdos
1406and
1407.I vfat
1408filesystems.)
1409.TP
1410.BR blocksize= { 512 | 1024 | 2048 }
3711f113 1411Set blocksize (default 512). This option is obsolete.
60a2a323 1412.TP
0d05f161 1413\fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
60a2a323 1414Set the owner and group of all files.
a72fa61a 1415(Default: the UID and GID of the current process.)
60a2a323
KZ
1416.TP
1417.BI umask= value
1418Set the umask (the bitmask of the permissions that are
1419.B not
3711f113 1420present). The default is the umask of the current process.
60a2a323
KZ
1421The value is given in octal.
1422.TP
1423.BI dmask= value
1424Set the umask applied to directories only.
1425The default is the umask of the current process.
1426The value is given in octal.
60a2a323
KZ
1427.TP
1428.BI fmask= value
1429Set the umask applied to regular files only.
1430The default is the umask of the current process.
1431The value is given in octal.
60a2a323
KZ
1432.TP
1433.BI allow_utime= value
1434This option controls the permission check of mtime/atime.
1435.RS
1436.TP
1437.B 20
1438If current process is in group of file's group ID, you can change timestamp.
1439.TP
1440.B 2
1441Other users can change timestamp.
1442.PP
1443The default is set from `dmask' option. (If the directory is writable,
8323d9fd 1444.BR utime (2)
3711f113 1445is also allowed. I.e.\& \s+3~\s0dmask & 022)
60a2a323
KZ
1446
1447Normally
8323d9fd 1448.BR utime (2)
60a2a323 1449checks current process is owner of the file, or it has
a72fa61a 1450CAP_FOWNER capability. But FAT filesystem doesn't have UID/GID on disk, so
3711f113 1451normal check is too inflexible. With this option you can relax it.
60a2a323
KZ
1452.RE
1453.TP
1454.BI check= value
d35df4db 1455Three different levels of pickyness can be chosen:
60a2a323
KZ
1456.RS
1457.TP
1458.BR r [ elaxed ]
1459Upper and lower case are accepted and equivalent, long name parts are
fb724eef 1460truncated (e.g.\&
60a2a323
KZ
1461.I verylongname.foobar
1462becomes
1463.IR verylong.foo ),
1464leading and embedded spaces are accepted in each name part (name and extension).
1465.TP
1466.BR n [ ormal ]
1467Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are
1468rejected. This is the default.
1469.TP
1470.BR s [ trict ]
3711f113
BS
1471Like "normal", but names that contain long parts or special characters
1472that are sometimes used on Linux but are not accepted by MS-DOS
1473(+, =, etc.) are rejected.
60a2a323
KZ
1474.RE
1475.TP
1476.BI codepage= value
1477Sets the codepage for converting to shortname characters on FAT
3711f113 1478and VFAT filesystems. By default, codepage 437 is used.
60a2a323 1479.TP
3711f113 1480.BI conv= mode
9f3d0fce 1481This option is obsolete and may fail or being ignored.
60a2a323
KZ
1482.TP
1483.BI cvf_format= module
1484Forces the driver to use the CVF (Compressed Volume File) module
1485.RI cvf_ module
3711f113 1486instead of auto-detection. If the kernel supports kmod, the
60a2a323
KZ
1487cvf_format=xxx option also controls on-demand CVF module loading.
1488This option is obsolete.
1489.TP
1490.BI cvf_option= option
3711f113 1491Option passed to the CVF module. This option is obsolete.
60a2a323
KZ
1492.TP
1493.B debug
1494Turn on the
1495.I debug
1496flag. A version string and a list of filesystem parameters will be
1497printed (these data are also printed if the parameters appear to be
1498inconsistent).
1499.TP
ec34526a
SM
1500.B discard
1501If set, causes discard/TRIM commands to be issued to the block device
3711f113 1502when blocks are freed. This is useful for SSD devices and
f036b4c7 1503sparse/thinly-provisioned LUNs.
ec34526a 1504.TP
3c1f7603
JK
1505.B dos1xfloppy
1506If set, use a fallback default BIOS Parameter Block configuration, determined
81421334 1507by backing device size. These static parameters match defaults assumed by DOS
3c1f7603
JK
15081.x for 160 kiB, 180 kiB, 320 kiB, and 360 kiB floppies and floppy images.
1509.TP
1510.BR errors= { panic | continue | remount-ro }
1511Specify FAT behavior on critical errors: panic, continue without doing
1512anything, or remount the partition in read-only mode (default behavior).
1513.TP
1514.BR fat= { 12 | 16 | 32 }
60a2a323
KZ
1515Specify a 12, 16 or 32 bit fat. This overrides
1516the automatic FAT type detection routine. Use with caution!
1517.TP
1518.BI iocharset= value
1519Character set to use for converting between 8 bit characters
3711f113 1520and 16 bit Unicode characters. The default is iso8859-1.
60a2a323
KZ
1521Long filenames are stored on disk in Unicode format.
1522.TP
3c1f7603
JK
1523.BR nfs= { stale_rw | nostale_ro }
1524Enable this only if you want to export the FAT filesystem over NFS.
1525
1526.BR stale_rw :
1527This option maintains an index (cache) of directory inodes which is used by the
81421334 1528nfs-related code to improve look-ups. Full file operations (read/write) over
3c1f7603
JK
1529NFS are supported but with cache eviction at NFS server, this could result in
1530spurious
1531.B ESTALE
1532errors.
1533
1534.BR nostale_ro :
d35df4db 1535This option bases the inode number and file handle
3c1f7603
JK
1536on the on-disk location of a file in the FAT directory entry.
1537This ensures that
1538.B ESTALE
1539will not be returned after a file is
81421334 1540evicted from the inode cache. However, it means that operations
d35df4db 1541such as rename, create and unlink could cause file handles that
3c1f7603 1542previously pointed at one file to point at a different file,
81421334 1543potentially causing data corruption. For this reason, this
3c1f7603
JK
1544option also mounts the filesystem readonly.
1545
1546To maintain backward compatibility, '-o nfs' is also accepted,
1547defaulting to
1548.BR stale_rw .
ec34526a 1549.TP
60a2a323
KZ
1550.BI tz=UTC
1551This option disables the conversion of timestamps
1552between local time (as used by Windows on FAT) and UTC
1553(which Linux uses internally). This is particularly
1554useful when mounting devices (like digital cameras)
1555that are set to UTC in order to avoid the pitfalls of
1556local time.
1557.TP
b7b16b0b
JK
1558.BI time_offset= minutes
1559Set offset for conversion of timestamps from local time used by FAT to UTC.
1560I.e.,
1561.I minutes
6627bc79 1562will be subtracted from each timestamp to convert it to UTC used
81421334 1563internally by Linux. This is useful when the time zone set in the kernel via
b7b16b0b 1564.BR settimeofday (2)
81421334 1565is not the time zone used by the filesystem. Note
b7b16b0b
JK
1566that this option still does not provide correct time stamps in all cases in
1567presence of DST - time stamps in a different DST setting will be off by one
1568hour.
1569.TP
60a2a323
KZ
1570.B quiet
1571Turn on the
1572.I quiet
1573flag. Attempts to chown or chmod files do not return errors,
3711f113 1574although they fail. Use with caution!
60a2a323 1575.TP
3c1f7603 1576.B rodir
81421334 1577FAT has the ATTR_RO (read-only) attribute. On Windows, the ATTR_RO of the
3c1f7603 1578directory will just be ignored, and is used only by applications as a flag
81421334 1579(e.g.\& it's set for the customized folder).
3c1f7603
JK
1580
1581If you want to use ATTR_RO as read-only flag even for the directory, set this
1582option.
1583.TP
60a2a323
KZ
1584.B showexec
1585If set, the execute permission bits of the file will be allowed only if
3711f113 1586the extension part of the name is \&.EXE, \&.COM, or \&.BAT. Not set by default.
60a2a323
KZ
1587.TP
1588.B sys_immutable
1589If set, ATTR_SYS attribute on FAT is handled as IMMUTABLE flag on Linux.
1590Not set by default.
1591.TP
1592.B flush
1593If set, the filesystem will try to flush to disk more early than normal.
1594Not set by default.
1595.TP
1596.B usefree
3711f113 1597Use the "free clusters" value stored on FSINFO. It'll
60a2a323 1598be used to determine number of free clusters without
3711f113 1599scanning disk. But it's not used by default, because
60a2a323 1600recent Windows don't update it correctly in some
3711f113 1601case. If you are sure the "free clusters" on FSINFO is
60a2a323
KZ
1602correct, by this option you can avoid scanning disk.
1603.TP
1604.BR dots ", " nodots ", " dotsOK= [ yes | no ]
1605Various misguided attempts to force Unix or DOS conventions
1606onto a FAT filesystem.
1607
81421334 1608.SS "Mount options for hfs"
60a2a323
KZ
1609.TP
1610.BI creator= cccc ", type=" cccc
1611Set the creator/type values as shown by the MacOS finder
1612used for creating new files. Default values: '????'.
1613.TP
1614.BI uid= n ", gid=" n
1615Set the owner and group of all files.
a72fa61a 1616(Default: the UID and GID of the current process.)
60a2a323
KZ
1617.TP
1618.BI dir_umask= n ", file_umask=" n ", umask=" n
1619Set the umask used for all directories, all regular files, or all
1620files and directories. Defaults to the umask of the current process.
1621.TP
1622.BI session= n
1623Select the CDROM session to mount.
1624Defaults to leaving that decision to the CDROM driver.
1625This option will fail with anything but a CDROM as underlying device.
1626.TP
1627.BI part= n
1628Select partition number n from the device.
1629Only makes sense for CDROMs.
1630Defaults to not parsing the partition table at all.
1631.TP
1632.B quiet
1633Don't complain about invalid mount options.
1634
81421334 1635.SS "Mount options for hpfs"
60a2a323 1636.TP
0d05f161 1637\fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
a72fa61a 1638Set the owner and group of all files. (Default: the UID and GID
60a2a323
KZ
1639of the current process.)
1640.TP
1641.BI umask= value
1642Set the umask (the bitmask of the permissions that are
1643.B not
3711f113 1644present). The default is the umask of the current process.
60a2a323
KZ
1645The value is given in octal.
1646.TP
1647.BR case= { lower | asis }
1648Convert all files names to lower case, or leave them.
1649(Default:
1650.BR case=lower .)
1651.TP
9f3d0fce
RM
1652.BI conv= mode
1653This option is obsolete and may fail or being ignored.
60a2a323
KZ
1654.TP
1655.B nocheck
1656Do not abort mounting when certain consistency checks fail.
1657
81421334 1658.SS "Mount options for iso9660"
60a2a323 1659ISO 9660 is a standard describing a filesystem structure to be used
3711f113 1660on CD-ROMs. (This filesystem type is also seen on some DVDs. See also the
60a2a323
KZ
1661.I udf
1662filesystem.)
1663
1664Normal
1665.I iso9660
1666filenames appear in a 8.3 format (i.e., DOS-like restrictions on filename
1667length), and in addition all characters are in upper case. Also there is
1668no field for file ownership, protection, number of links, provision for
1669block/character devices, etc.
1670
1671Rock Ridge is an extension to iso9660 that provides all of these UNIX-like
1672features. Basically there are extensions to each directory record that
1673supply all of the additional information, and when Rock Ridge is in use,
1674the filesystem is indistinguishable from a normal UNIX filesystem (except
1675that it is read-only, of course).
1676.TP
1677.B norock
3711f113 1678Disable the use of Rock Ridge extensions, even if available. Cf.\&
60a2a323
KZ
1679.BR map .
1680.TP
1681.B nojoliet
3711f113 1682Disable the use of Microsoft Joliet extensions, even if available. Cf.\&
60a2a323
KZ
1683.BR map .
1684.TP
1685.BR check= { r [ elaxed ]| s [ trict ]}
1686With
1687.BR check=relaxed ,
1688a filename is first converted to lower case before doing the lookup.
1689This is probably only meaningful together with
1690.B norock
1691and
1692.BR map=normal .
1693(Default:
1694.BR check=strict .)
1695.TP
0d05f161 1696\fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
60a2a323
KZ
1697Give all files in the filesystem the indicated user or group id,
1698possibly overriding the information found in the Rock Ridge extensions.
1699(Default:
1700.BR uid=0,gid=0 .)
1701.TP
1702.BR map= { n [ ormal ]| o [ ff ]| a [ corn ]}
1703For non-Rock Ridge volumes, normal name translation maps upper
1704to lower case ASCII, drops a trailing `;1', and converts `;' to `.'.
1705With
1706.B map=off
3711f113 1707no name translation is done. See
60a2a323
KZ
1708.BR norock .
1709(Default:
1710.BR map=normal .)
1711.B map=acorn
1712is like
0d05f161 1713.B map=normal
60a2a323
KZ
1714but also apply Acorn extensions if present.
1715.TP
1716.BI mode= value
1717For non-Rock Ridge volumes, give all files the indicated mode.
9167f4c2 1718(Default: read and execute permission for everybody.)
9f3d0fce 1719Octal mode values require a leading 0.
60a2a323
KZ
1720.TP
1721.B unhide
1722Also show hidden and associated files.
1723(If the ordinary files and the associated or hidden files have
1724the same filenames, this may make the ordinary files inaccessible.)
1725.TP
1726.BR block= { 512 | 1024 | 2048 }
1727Set the block size to the indicated value.
1728(Default:
1729.BR block=1024 .)
1730.TP
9f3d0fce
RM
1731.BI conv= mode
1732This option is obsolete and may fail or being ignored.
60a2a323
KZ
1733.TP
1734.B cruft
1735If the high byte of the file length contains other garbage,
1736set this mount option to ignore the high order bits of the file length.
fb724eef 1737This implies that a file cannot be larger than 16\ MB.
60a2a323
KZ
1738.TP
1739.BI session= x
9f3d0fce 1740Select number of session on multisession CD.
60a2a323
KZ
1741.TP
1742.BI sbsector= xxx
9f3d0fce 1743Session begins from sector xxx.
60a2a323
KZ
1744.LP
1745The following options are the same as for vfat and specifying them only makes
1746sense when using discs encoded using Microsoft's Joliet extensions.
1747.TP
1748.BI iocharset= value
1749Character set to use for converting 16 bit Unicode characters on CD
3711f113 1750to 8 bit characters. The default is iso8859-1.
60a2a323
KZ
1751.TP
1752.B utf8
1753Convert 16 bit Unicode characters on CD to UTF-8.
1754
81421334 1755.SS "Mount options for jfs"
60a2a323
KZ
1756.TP
1757.BI iocharset= name
1758Character set to use for converting from Unicode to ASCII. The default is
1759to do no conversion. Use
1760.B iocharset=utf8
1761for UTF8 translations. This requires CONFIG_NLS_UTF8 to be set in
1762the kernel
1763.I ".config"
1764file.
1765.TP
1766.BI resize= value
1767Resize the volume to
1768.I value
3711f113
BS
1769blocks. JFS only supports growing a volume, not shrinking it. This option
1770is only valid during a remount, when the volume is mounted read-write. The
60a2a323
KZ
1771.B resize
1772keyword with no value will grow the volume to the full size of the partition.
1773.TP
1774.B nointegrity
1775Do not write to the journal. The primary use of this option is to allow
3711f113 1776for higher performance when restoring a volume from backup media. The
f036b4c7 1777integrity of the volume is not guaranteed if the system abnormally ends.
60a2a323
KZ
1778.TP
1779.B integrity
1780Default. Commit metadata changes to the journal. Use this option to remount
1781a volume where the
1782.B nointegrity
1783option was previously specified in order to restore normal behavior.
1784.TP
1785.BR errors= { continue | remount-ro | panic }
ee312c65 1786Define the behavior when an error is encountered.
60a2a323
KZ
1787(Either ignore errors and just mark the filesystem erroneous and continue,
1788or remount the filesystem read-only, or panic and halt the system.)
1789.TP
1790.BR noquota | quota | usrquota | grpquota
1791These options are accepted but ignored.
1792
81421334 1793.SS "Mount options for msdos"
60a2a323
KZ
1794See mount options for fat.
1795If the
1796.I msdos
1797filesystem detects an inconsistency, it reports an error and sets the file
3711f113 1798system read-only. The filesystem can be made writable again by remounting
60a2a323
KZ
1799it.
1800
81421334 1801.SS "Mount options for ncpfs"
60a2a323
KZ
1802Just like
1803.IR nfs ", the " ncpfs
1804implementation expects a binary argument (a
1805.IR "struct ncp_mount_data" )
3711f113 1806to the mount system call. This argument is constructed by
60a2a323
KZ
1807.BR ncpmount (8)
1808and the current version of
1809.B mount
1810(2.12) does not know anything about ncpfs.
1811
81421334 1812.SS "Mount options for ntfs"
60a2a323
KZ
1813.TP
1814.BI iocharset= name
1815Character set to use when returning file names.
1816Unlike VFAT, NTFS suppresses names that contain
3711f113 1817nonconvertible characters. Deprecated.
60a2a323
KZ
1818.TP
1819.BI nls= name
1820New name for the option earlier called
1821.IR iocharset .
60a2a323 1822.TP
0d05f161 1823.B utf8
60a2a323
KZ
1824Use UTF-8 for converting file names.
1825.TP
1826.BR uni_xlate= { 0 | 1 | 2 }
1827For 0 (or `no' or `false'), do not use escape sequences
1828for unknown Unicode characters.
1829For 1 (or `yes' or `true') or 2, use vfat-style 4-byte escape sequences
3711f113 1830starting with ":". Here 2 give a little-endian encoding
60a2a323
KZ
1831and 1 a byteswapped bigendian encoding.
1832.TP
1833.B posix=[0|1]
1834If enabled (posix=1), the filesystem distinguishes between
3711f113
BS
1835upper and lower case. The 8.3 alias names are presented as
1836hard links instead of being suppressed. This option is obsolete.
60a2a323 1837.TP
0d05f161 1838\fBuid=\fP\,\fIvalue\fP, \fBgid=\fP\,\fIvalue\fP and \fBumask=\fP\,\fIvalue\fP
60a2a323
KZ
1839Set the file permission on the filesystem.
1840The umask value is given in octal.
1841By default, the files are owned by root and not readable by somebody else.
1842
81421334 1843.SS "Mount options for overlay"
7054d8a6 1844Since Linux 3.18 the overlay pseudo filesystem implements a union mount for
49b7f95e 1845other filesystems.
7054d8a6
OA
1846
1847An overlay filesystem combines two filesystems - an \fBupper\fR filesystem and
1848a \fBlower\fR filesystem. When a name exists in both filesystems, the object
1849in the upper filesystem is visible while the object in the lower filesystem is
1850either hidden or, in the case of directories, merged with the upper object.
1851
1852The lower filesystem can be any filesystem supported by Linux and does not need
1853to be writable. The lower filesystem can even be another overlayfs. The upper
1854filesystem will normally be writable and if it is it must support the creation
49b7f95e 1855of trusted.* extended attributes, and must provide a valid d_type in readdir
7054d8a6 1856responses, so NFS is not suitable.
49b7f95e 1857
7054d8a6
OA
1858A read-only overlay of two read-only filesystems may use any filesystem type.
1859The options \fBlowerdir\fR and \fBupperdir\fR are combined into a merged
1860directory by using:
1861
1862.RS
1863.br
bed9c1f5
BS
1864.nf
1865.B "mount \-t overlay overlay \e"
1866.B " \-olowerdir=/lower,upperdir=/upper,workdir=/work /merged"
1867.fi
7054d8a6
OA
1868.br
1869.RE
1870
1871.TP
1872.BI lowerdir= directory
1873Any filesystem, does not need to be on a writable filesystem.
1874.TP
1875.BI upperdir= directory
1876The upperdir is normally on a writable filesystem.
1877.TP
1878.BI workdir= directory
1879The workdir needs to be an empty directory on the same filesystem as upperdir.
1880
81421334 1881.SS "Mount options for reiserfs"
60a2a323
KZ
1882Reiserfs is a journaling filesystem.
1883.TP
0d05f161 1884.B conv
60a2a323 1885Instructs version 3.6 reiserfs software to mount a version 3.5 filesystem,
3711f113 1886using the 3.6 format for newly created objects. This filesystem will no
60a2a323
KZ
1887longer be compatible with reiserfs 3.5 tools.
1888.TP
1889.BR hash= { rupasov | tea | r5 | detect }
1890Choose which hash function reiserfs will use to find files within directories.
1891.RS
1892.TP
1893.B rupasov
81421334 1894A hash invented by Yury Yu.\& Rupasov. It is fast and preserves locality,
60a2a323
KZ
1895mapping lexicographically close file names to close hash values.
1896This option should not be used, as it causes a high probability of hash
1897collisions.
1898.TP
1899.B tea
1900A Davis-Meyer function implemented by Jeremy Fitzhardinge.
1901It uses hash permuting bits in the name. It gets high randomness
1902and, therefore, low probability of hash collisions at some CPU cost.
1903This may be used if EHASHCOLLISION errors are experienced with the r5 hash.
1904.TP
1905.B r5
3711f113 1906A modified version of the rupasov hash. It is used by default and is
60a2a323
KZ
1907the best choice unless the filesystem has huge directories and
1908unusual file-name patterns.
1909.TP
1910.B detect
1911Instructs
0d05f161 1912.I mount
60a2a323 1913to detect which hash function is in use by examining
fb724eef 1914the filesystem being mounted, and to write this information into
3711f113 1915the reiserfs superblock. This is only useful on the first mount of
60a2a323
KZ
1916an old format filesystem.
1917.RE
1918.TP
0d05f161 1919.B hashed_relocation
3711f113 1920Tunes the block allocator. This may provide performance improvements
60a2a323
KZ
1921in some situations.
1922.TP
0d05f161 1923.B no_unhashed_relocation
3711f113 1924Tunes the block allocator. This may provide performance improvements
60a2a323
KZ
1925in some situations.
1926.TP
0d05f161 1927.B noborder
81421334 1928Disable the border allocator algorithm invented by Yury Yu.\& Rupasov.
60a2a323
KZ
1929This may provide performance improvements in some situations.
1930.TP
0d05f161 1931.B nolog
3711f113 1932Disable journaling. This will provide slight performance improvements in
60a2a323 1933some situations at the cost of losing reiserfs's fast recovery from crashes.
f036b4c7
MF
1934Even with this option turned on, reiserfs still performs all journaling
1935operations, save for actual writes into its journaling area. Implementation
60a2a323 1936of
0d05f161 1937.I nolog
60a2a323
KZ
1938is a work in progress.
1939.TP
0d05f161 1940.B notail
60a2a323 1941By default, reiserfs stores small files and `file tails' directly into its
3711f113 1942tree. This confuses some utilities such as
60a2a323
KZ
1943.BR LILO (8).
1944This option is used to disable packing of files into the tree.
1945.TP
0d05f161 1946.B replayonly
60a2a323 1947Replay the transactions which are in the journal, but do not actually
3711f113 1948mount the filesystem. Mainly used by
60a2a323
KZ
1949.IR reiserfsck .
1950.TP
1951.BI resize= number
1952A remount option which permits online expansion of reiserfs partitions.
1953Instructs reiserfs to assume that the device has
1954.I number
1955blocks.
1956This option is designed for use with devices which are under logical
1957volume management (LVM).
1958There is a special
1959.I resizer
1960utility which can be obtained from
1961.IR ftp://ftp.namesys.com/pub/reiserfsprogs .
1962.TP
0d05f161 1963.B user_xattr
3711f113 1964Enable Extended User Attributes. See the
60a2a323
KZ
1965.BR attr (5)
1966manual page.
1967.TP
0d05f161 1968.B acl
3711f113 1969Enable POSIX Access Control Lists. See the
60a2a323
KZ
1970.BR acl (5)
1971manual page.
1972.TP
fb724eef 1973.BR barrier=none " / " barrier=flush "
94b559e0 1974This disables / enables the use of write barriers in the journaling code.
3711f113 1975barrier=none disables, barrier=flush enables (default). This also requires an
94b559e0
RM
1976IO stack which can support barriers, and if reiserfs gets an error on a barrier
1977write, it will disable barriers again with a warning. Write barriers enforce
60a2a323 1978proper on-disk ordering of journal commits, making volatile disk write caches
94b559e0
RM
1979safe to use, at some performance penalty. If your disks are battery-backed in
1980one way or another, disabling barriers may safely improve performance.
60a2a323 1981
81421334 1982.SS "Mount options for ubifs"
49b7f95e
BS
1983UBIFS is a flash filesystem which works on top of UBI volumes. Note that
1984\fBatime\fR is not supported and is always turned off.
60a2a323
KZ
1985.TP
1986The device name may be specified as
1987.RS
1988.B ubiX_Y
1989UBI device number
1990.BR X ,
1991volume number
1992.B Y
1993.TP
1994.B ubiY
1995UBI device number
1996.BR 0 ,
1997volume number
1998.B Y
1999.TP
2000.B ubiX:NAME
2001UBI device number
2002.BR X ,
2003volume with name
2004.B NAME
2005.TP
2006.B ubi:NAME
2007UBI device number
2008.BR 0 ,
2009volume with name
2010.B NAME
2011.RE
2012Alternative
2013.B !
2014separator may be used instead of
2015.BR : .
2016.TP
2017The following mount options are available:
2018.TP
0d05f161 2019.B bulk_read
3711f113
BS
2020Enable bulk-read. VFS read-ahead is disabled because it slows down the file
2021system. Bulk-Read is an internal optimization. Some flashes may read faster if
2022the data are read at one go, rather than at several read requests. For
60a2a323
KZ
2023example, OneNAND can do "read-while-load" if it reads more than one NAND page.
2024.TP
0d05f161 2025.B no_bulk_read
3711f113 2026Do not bulk-read. This is the default.
60a2a323 2027.TP
0d05f161 2028.B chk_data_crc
3711f113 2029Check data CRC-32 checksums. This is the default.
60a2a323 2030.TP
0d05f161 2031.BR no_chk_data_crc .
3711f113 2032Do not check data CRC-32 checksums. With this option, the filesystem does not
60a2a323 2033check CRC-32 checksum for data, but it does check it for the internal indexing
3711f113 2034information. This option only affects reading, not writing. CRC-32 is always
60a2a323
KZ
2035calculated when writing the data.
2036.TP
2037.BR compr= { none | lzo | zlib }
3711f113 2038Select the default compressor which is used when new files are written. It is
60a2a323
KZ
2039still possible to read compressed files if mounted with the
2040.B none
2041option.
2042
81421334 2043.SS "Mount options for udf"
bde5d1aa
SK
2044UDF is the "Universal Disk Format" filesystem defined by OSTA, the Optical
2045Storage Technology Association, and is often used for DVD-ROM, frequently
2046in the form of a hybrid UDF/ISO-9660 filesystem. It is, however,
2047perfectly usable by itself on disk drives, flash drives and other block devices.
60a2a323
KZ
2048See also
2049.IR iso9660 .
2050.TP
bde5d1aa
SK
2051.B uid=
2052Make all files in the filesystem belong to the given user.
2053uid=forget can be specified independently of (or usually in
2054addition to) uid=<user> and results in UDF
2055not storing uids to the media. In fact the recorded uid
2056is the 32-bit overflow uid -1 as defined by the UDF standard.
2057The value is given as either <user> which is a valid user name or the corresponding
2058decimal user id, or the special string "forget".
2059.TP
60a2a323 2060.B gid=
bde5d1aa
SK
2061Make all files in the filesystem belong to the given group.
2062gid=forget can be specified independently of (or usually in
2063addition to) gid=<group> and results in UDF
2064not storing gids to the media. In fact the recorded gid
2065is the 32-bit overflow gid -1 as defined by the UDF standard.
2066The value is given as either <group> which is a valid group name or the corresponding
2067decimal group id, or the special string "forget".
60a2a323
KZ
2068.TP
2069.B umask=
bde5d1aa 2070Mask out the given permissions from all inodes read from the filesystem.
60a2a323
KZ
2071The value is given in octal.
2072.TP
bde5d1aa
SK
2073.B mode=
2074If mode= is set the permissions of all non-directory inodes read from the
2075filesystem will be set to the given mode. The value is given in octal.
2076.TP
2077.B dmode=
2078If dmode= is set the permissions of all directory inodes read from the
2079filesystem will be set to the given dmode. The value is given in octal.
2080.TP
2081.B bs=
2082Set the block size. Default value prior to kernel version 2.6.30 was
20832048. Since 2.6.30 and prior to 4.11 it was logical device block size with
2084fallback to 2048. Since 4.11 it is logical block size with fallback to
2085any valid block size between logical device block size and 4096.
2086
2087For other details see the updated mkudffs.8 manpage, section
2088COMPATIBILITY and BLOCK SIZE.
60a2a323
KZ
2089.TP
2090.B unhide
2091Show otherwise hidden files.
2092.TP
2093.B undelete
2094Show deleted files in lists.
2095.TP
bde5d1aa
SK
2096.B adinicb
2097Embed data in the inode. (default)
2098.TP
2099.B noadinicb
2100Don't embed data in the inode.
2101.TP
2102.B shortad
2103Use short UDF address descriptors.
2104.TP
2105.B longad
2106Use long UDF address descriptors. (default)
2107.TP
60a2a323
KZ
2108.B nostrict
2109Unset strict conformance.
60a2a323
KZ
2110.TP
2111.B iocharset
2112Set the NLS character set.
bde5d1aa 2113.SS Mount options for debugging and disaster recovery
60a2a323
KZ
2114.TP
2115.B novrs
bde5d1aa 2116Ignore the Volume Recognition Sequence and attempt to mount anyway.
60a2a323
KZ
2117.TP
2118.B session=
bde5d1aa 2119Select the session number for multi-session recorded optical media. (default= last session)
60a2a323
KZ
2120.TP
2121.B anchor=
bde5d1aa
SK
2122Override standard anchor location. (default= 256)
2123.TP
2124.B lastblock=
2125Set the last block of the filesystem.
2126.SS Unused historical mount options that may be encountered and should be removed
2127.TP
2128.B uid=ignore
2129use uid=<user> instead.
2130.TP
2131.B gid=ignore
2132use gid=<group> instead.
60a2a323
KZ
2133.TP
2134.B volume=
bde5d1aa 2135Override the VolumeDesc location.
60a2a323
KZ
2136.TP
2137.B partition=
bde5d1aa 2138Override the PartitionDesc location.
60a2a323
KZ
2139.TP
2140.B fileset=
bde5d1aa 2141Override the fileset block location.
60a2a323
KZ
2142.TP
2143.B rootdir=
bde5d1aa 2144Override the root directory location.
60a2a323 2145
81421334 2146.SS "Mount options for ufs"
60a2a323
KZ
2147.TP
2148.BI ufstype= value
2149UFS is a filesystem widely used in different operating systems.
3711f113 2150The problem are differences among implementations. Features of some
60a2a323
KZ
2151implementations are undocumented, so its hard to recognize the
2152type of ufs automatically.
2153That's why the user must specify the type of ufs by mount option.
2154Possible values are:
2155.RS
2156.TP
2157.B old
2158Old format of ufs, this is the default, read only.
2159(Don't forget to give the \-r option.)
2160.TP
2161.B 44bsd
0d05f161 2162For filesystems created by a BSD-like system (NetBSD, FreeBSD, OpenBSD).
60a2a323
KZ
2163.TP
2164.B ufs2
2165Used in FreeBSD 5.x supported as read-write.
2166.TP
2167.B 5xbsd
2168Synonym for ufs2.
2169.TP
2170.B sun
2171For filesystems created by SunOS or Solaris on Sparc.
2172.TP
2173.B sunx86
2174For filesystems created by Solaris on x86.
2175.TP
2176.B hp
2177For filesystems created by HP-UX, read-only.
2178.TP
2179.B nextstep
2180For filesystems created by NeXTStep (on NeXT station) (currently read only).
2181.TP
2182.B nextstep-cd
2183For NextStep CDROMs (block_size == 2048), read-only.
2184.TP
2185.B openstep
2186For filesystems created by OpenStep (currently read only).
2187The same filesystem type is also used by Mac OS X.
2188.RE
2189
2190.TP
2191.BI onerror= value
ee312c65 2192Set behavior on error:
60a2a323
KZ
2193.RS
2194.TP
2195.B panic
2196If an error is encountered, cause a kernel panic.
2197.TP
2198.RB [ lock | umount | repair ]
2199These mount options don't do anything at present;
2200when an error is encountered only a console message is printed.
2201.RE
2202
81421334 2203.SS "Mount options for umsdos"
60a2a323
KZ
2204See mount options for msdos.
2205The
2206.B dotsOK
2207option is explicitly killed by
2208.IR umsdos .
2209
81421334 2210.SS "Mount options for vfat"
60a2a323
KZ
2211First of all, the mount options for
2212.I fat
2213are recognized.
2214The
2215.B dotsOK
2216option is explicitly killed by
2217.IR vfat .
2218Furthermore, there are
2219.TP
2220.B uni_xlate
2221Translate unhandled Unicode characters to special escaped sequences.
2222This lets you backup and restore filenames that are created with any
3711f113
BS
2223Unicode characters. Without this option, a '?' is used when no
2224translation is possible. The escape character is ':' because it is
2225otherwise invalid on the vfat filesystem. The escape sequence
2226that gets used, where u is the Unicode character,
60a2a323
KZ
2227is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
2228.TP
2229.B posix
2230Allow two files with names that only differ in case.
2231This option is obsolete.
2232.TP
2233.B nonumtail
2234First try to make a short name without sequence number,
2235before trying
0d05f161 2236.IR name\s+3~\s0num.ext .
60a2a323
KZ
2237.TP
2238.B utf8
2239UTF8 is the filesystem safe 8-bit encoding of Unicode that is used by the
3711f113
BS
2240console. It can be enabled for the filesystem with this option or disabled
2241with utf8=0, utf8=no or utf8=false. If `uni_xlate' gets set, UTF8 gets
60a2a323
KZ
2242disabled.
2243.TP
3711f113 2244.BI shortname= mode
ee312c65 2245Defines the behavior for creation and display of filenames which fit into
3711f113
BS
22468.3 characters. If a long name for a file exists, it will always be the
2247preferred one for display. There are four \fImode\fRs:
60a2a323
KZ
2248.RS
2249.TP
3711f113 2250.B lower
60a2a323
KZ
2251Force the short name to lower case upon display; store a long name when
2252the short name is not all upper case.
2253.TP
3711f113 2254.B win95
60a2a323
KZ
2255Force the short name to upper case upon display; store a long name when
2256the short name is not all upper case.
2257.TP
3711f113
BS
2258.B winnt
2259Display the short name as is; store a long name when the short name is
60a2a323
KZ
2260not all lower case or all upper case.
2261.TP
3711f113 2262.B mixed
60a2a323 2263Display the short name as is; store a long name when the short name is not
3711f113 2264all upper case. This mode is the default since Linux 2.6.32.
60a2a323
KZ
2265.RE
2266
81421334 2267.SS "Mount options for usbfs"
60a2a323 2268.TP
0d05f161 2269\fBdevuid=\fP\,\fIuid\fP and \fBdevgid=\fP\,\fIgid\fP and \fBdevmode=\fP\,\fImode\fP
60a2a323 2270Set the owner and group and mode of the device files in the usbfs filesystem
3711f113 2271(default: uid=gid=0, mode=0644). The mode is given in octal.
60a2a323 2272.TP
0d05f161 2273\fBbusuid=\fP\,\fIuid\fP and \fBbusgid=\fP\,\fIgid\fP and \fBbusmode=\fP\,\fImode\fP
60a2a323 2274Set the owner and group and mode of the bus directories in the usbfs
3711f113 2275filesystem (default: uid=gid=0, mode=0555). The mode is given in octal.
60a2a323 2276.TP
0d05f161 2277\fBlistuid=\fP\,\fIuid\fP and \fBlistgid=\fP\,\fIgid\fP and \fBlistmode=\fP\,\fImode\fP
60a2a323
KZ
2278Set the owner and group and mode of the file
2279.I devices
3711f113 2280(default: uid=gid=0, mode=0444). The mode is given in octal.
60a2a323 2281
60a2a323 2282.SH "THE LOOP DEVICE"
3711f113 2283One further possible type is a mount via the loop device. For example,
60a2a323
KZ
2284the command
2285.RS
2286.sp
4b8f8336 2287.B "mount /tmp/disk.img /mnt \-t vfat \-o loop=/dev/loop3"
60a2a323
KZ
2288.sp
2289.RE
2290will set up the loop device
2291.I /dev/loop3
2292to correspond to the file
2293.IR /tmp/disk.img ,
2294and then mount this device on
2295.IR /mnt .
2296
2297If no explicit loop device is mentioned
2298(but just an option `\fB\-o loop\fP' is given), then
2299.B mount
2300will try to find some unused loop device and use that, for example
2301.RS
2302.sp
0d05f161 2303.B "mount /tmp/disk.img /mnt \-o loop"
60a2a323
KZ
2304.sp
2305.RE
2306The mount command
2307.B automatically
2308creates a loop device from a regular file if a filesystem type is
2309not specified or the filesystem is known for libblkid, for example:
2310.RS
2311.sp
2312.B "mount /tmp/disk.img /mnt"
2313.sp
0d05f161 2314.B "mount \-t ext3 /tmp/disk.img /mnt"
60a2a323
KZ
2315.sp
2316.RE
3711f113
BS
2317This type of mount knows about three options, namely
2318.BR loop ", " offset " and " sizelimit ,
60a2a323
KZ
2319that are really options to
2320.BR \%losetup (8).
2321(These options can be used in addition to those specific
2322to the filesystem type.)
2323
3711f113
BS
2324Since Linux 2.6.25 auto-destruction of loop devices is supported,
2325meaning that any loop device allocated by
60a2a323
KZ
2326.B mount
2327will be freed by
2328.B umount
3711f113 2329independently of
60a2a323
KZ
2330.IR /etc/mtab .
2331
3711f113
BS
2332You can also free a loop device by hand, using
2333.BR "losetup \-d " or " umount \-d" .
60a2a323 2334
d08b58c4 2335Since util-linux v2.29 mount command re-uses the loop device rather than
03b4519b
KZ
2336initialize a new device if the same backing file is already used for some loop
2337device with the same offset and sizelimit. This is necessary to avoid
2338a filesystem corruption.
d08b58c4 2339
60a2a323
KZ
2340.SH RETURN CODES
2341.B mount
2342has the following return codes (the bits can be ORed):
2343.TP
0d05f161 2344.B 0
60a2a323
KZ
2345success
2346.TP
0d05f161 2347.B 1
60a2a323
KZ
2348incorrect invocation or permissions
2349.TP
0d05f161 2350.B 2
60a2a323
KZ
2351system error (out of memory, cannot fork, no more loop devices)
2352.TP
0d05f161 2353.B 4
60a2a323
KZ
2354internal
2355.B mount
2356bug
2357.TP
0d05f161 2358.B 8
60a2a323
KZ
2359user interrupt
2360.TP
0d05f161 2361.B 16
60a2a323
KZ
2362problems writing or locking /etc/mtab
2363.TP
0d05f161 2364.B 32
60a2a323
KZ
2365mount failure
2366.TP
0d05f161 2367.B 64
60a2a323 2368some mount succeeded
16b73aae
KZ
2369.RE
2370
3711f113
BS
2371The command \fBmount \-a\fR returns 0 (all succeeded), 32 (all failed), or 64 (some
2372failed, some succeeded).
60a2a323 2373
00963eac 2374.SH "EXTERNAL HELPERS"
60a2a323 2375The syntax of external mount helpers is:
81421334
BS
2376.sp
2377.in +4
3711f113 2378.BI /sbin/mount. suffix
60a2a323
KZ
2379.I spec dir
2380.RB [ \-sfnv ]
2381.RB [ \-o
2382.IR options ]
2383.RB [ \-t
3711f113 2384.IR type \fB. subtype ]
81421334
BS
2385.in
2386.sp
3711f113
BS
2387where the \fIsuffix\fR is the filesystem type and the \fB\-sfnvo\fR options have
2388the same meaning as the normal mount options. The \fB\-t\fR option is used for
2389filesystems with subtypes support (for example
2390.BR "/sbin/mount.fuse \-t fuse.sshfs" ).
60a2a323 2391
3711f113 2392The command \fBmount\fR does not pass the mount options
00963eac
KZ
2393.BR unbindable ,
2394.BR runbindable ,
2395.BR private ,
2396.BR rprivate ,
2397.BR slave ,
2398.BR rslave ,
2399.BR shared ,
2400.BR rshared ,
2401.BR auto ,
2402.BR noauto ,
2403.BR comment ,
0d05f161 2404.BR x-* ,
00963eac 2405.BR loop ,
0d05f161 2406.B offset
00963eac 2407and
0d05f161 2408.B sizelimit
3711f113
BS
2409to the mount.<suffix> helpers. All other options are used in a
2410comma-separated list as argument to the \fB\-o\fR option.
00963eac 2411
60a2a323
KZ
2412.SH FILES
2413.TP 18n
2414.I /etc/fstab
2415filesystem table
2416.TP
60a2a323
KZ
2417.I /etc/mtab
2418table of mounted filesystems
2419.TP
0d05f161 2420.I /etc/mtab\s+3~\s0
60a2a323
KZ
2421lock file
2422.TP
2423.I /etc/mtab.tmp
2424temporary file
2425.TP
2426.I /etc/filesystems
2427a list of filesystem types to try
2428.SH ENVIRONMENT
2429.IP LIBMOUNT_FSTAB=<path>
68e422ec 2430overrides the default location of the fstab file (ignored for suid)
60a2a323 2431.IP LIBMOUNT_MTAB=<path>
68e422ec
KZ
2432overrides the default location of the mtab file (ignored for suid)
2433.IP LIBMOUNT_DEBUG=all
2434enables libmount debug output
2435.IP LIBBLKID_DEBUG=all
2436enables libblkid debug output
0bf03740
KZ
2437.IP LOOPDEV_DEBUG=all
2438enables loop device setup debug output
60a2a323 2439.SH "SEE ALSO"
81421334 2440.na
60a2a323
KZ
2441.BR mount (2),
2442.BR umount (2),
60a2a323 2443.BR umount (8),
81421334 2444.BR fstab (5),
60a2a323
KZ
2445.BR nfs (5),
2446.BR xfs (5),
81421334 2447.BR e2label (8),
f053ff1e
MK
2448.BR findmnt (8),
2449.BR losetup (8),
2450.BR mke2fs (8),
2451.BR mountd (8),
2452.BR nfsd (8),
81421334 2453.BR swapon (8),
f053ff1e
MK
2454.BR tune2fs (8),
2455.BR xfs_admin (8)
81421334 2456.ad
60a2a323
KZ
2457.SH BUGS
2458It is possible for a corrupted filesystem to cause a crash.
2459.PP
2460Some Linux filesystems don't support
81421334 2461.BR "\-o sync " nor " \-o dirsync"
60a2a323
KZ
2462(the ext2, ext3, fat and vfat filesystems
2463.I do
2464support synchronous updates (a la BSD) when mounted with the
2465.B sync
2466option).
2467.PP
2468The
2469.B "\-o remount"
2470may not be able to change mount parameters (all
2471.IR ext2fs -specific
2472parameters, except
fb724eef 2473.BR sb ,
60a2a323
KZ
2474are changeable with a remount, for example, but you can't change
2475.B gid
2476or
2477.B umask
2478for the
2479.IR fatfs ).
2480.PP
81421334 2481It is possible that the files
0d05f161 2482.I /etc/mtab
60a2a323 2483and
0d05f161 2484.I /proc/mounts
81421334 2485don't match on systems with a regular mtab file. The first file is based only on
06716dff 2486the mount command options, but the content of the second file also depends on
81421334
BS
2487the kernel and others settings (e.g.\& on a remote NFS server -- in certain cases
2488the mount command may report unreliable information about an NFS mount point
2489and the /proc/mounts file usually contains more reliable information.) This is
2490another reason to replace the mtab file with a symlink to the
06716dff
KZ
2491.I /proc/mounts
2492file.
60a2a323 2493.PP
81421334 2494Checking files on NFS filesystems referenced by file descriptors (i.e.\& the
0d05f161 2495.B fcntl
60a2a323 2496and
0d05f161 2497.B ioctl
81421334
BS
2498families of functions) may lead to inconsistent results due to the lack of
2499a consistency check in the kernel even if noac is used.
293714c0
JM
2500.PP
2501The
2502.B loop
2503option with the
2504.B offset
2505or
2506.B sizelimit
2507options used may fail when using older kernels if the
2508.B mount
2509command can't confirm that the size of the block device has been configured
3711f113 2510as requested. This situation can be worked around by using
293714c0
JM
2511the
2512.B losetup
2513command manually before calling
2514.B mount
2515with the configured loop device.
60a2a323
KZ
2516.SH HISTORY
2517A
2518.B mount
2519command existed in Version 5 AT&T UNIX.
2520.SH AUTHORS
2521.nf
2522Karel Zak <kzak@redhat.com>
2523.fi
2524.SH AVAILABILITY
2525The mount command is part of the util-linux package and is available from
d673b74e 2526https://www.kernel.org/pub/linux/utils/util-linux/.