]> git.ipfire.org Git - thirdparty/util-linux.git/blame - sys-utils/mount.8
libmount: cleanup fix_optstr() regards to selinux and smack
[thirdparty/util-linux.git] / sys-utils / mount.8
CommitLineData
60a2a323
KZ
1.\" Copyright (c) 1996-2004 Andries Brouwer
2.\" Copyright (C) 2006-2012 Karel Zak <kzak@redhat.com>
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
KZ
29.\"
30.\"
31.TH MOUNT 8 "January 2012" "util-linux" "System Administration"
32.SH NAME
33mount \- mount a filesystem
34.SH SYNOPSIS
35.B mount
36.RB [ \-lhV ]
37.LP
38.BI "mount \-a
39.RB [ \-fFnrsvw ]
40.RB [ \-t
41.IR vfstype ]
42.RB [ \-O
43.IR optlist ]
44.LP
45.B mount
46.RB [ \-fnrsvw ]
47.RB [ \-o
48.IR option [ \fB,\fPoption ]...]
49.IR device | dir
50.LP
51.B mount
52.RB [ \-fnrsvw ]
53.RB [ \-t
54.IB vfstype ]
55.RB [ \-o
56.IR options ]
57.I device dir
58.SH DESCRIPTION
59All files accessible in a Unix system are arranged in one big
60tree, the file hierarchy, rooted at
61.BR / .
62These files can be spread out over several devices. The
63.B mount
64command serves to attach the filesystem found on some device
65to the big file tree. Conversely, the
66.BR umount (8)
67command will detach it again.
68
69The standard form of the
70.B mount
71command, is
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 .
85The previous contents (if any) and owner and mode of
86.I dir
87become invisible, and as long as this filesystem remains mounted,
88the pathname
89.I dir
90refers to the root of the filesystem on
91.IR device .
92
93If only directory or device is given, for example:
94.RS
95
96.br
97.BI "mount /dir"
98.br
99
100.RE
101then mount looks for a mountpoint and if not found then for a device in the
aedeaa40
KZ
102/etc/fstab file. It's possible to use
103.B --target
104or
105.B --source
106options to avoid ambivalent interpretation of the given argument. For example
107.RS
108
109.br
110.BI "mount --target /mountpoint"
111.br
112
113.RE
114
60a2a323
KZ
115
116.B The listing and help.
117.RS
5f7c1890
KZ
118The listing mode is maintained for backward compatibility only.
119
120For more robust and definable output use
121.BR findmnt (8),
122\fBespecially in your scripts\fP. Note that control characters in the
123mountpoint name are replaced with '?'.
124
60a2a323
KZ
125.TP
126.BR "mount " [ -l "] [" "-t \fItype\fP" ]
127lists all mounted filesystems (of type
128.IR type ).
129The option \-l adds the labels in this listing.
130See below.
131.RE
132
133.B The device indication.
134.RS
135Most devices are indicated by a file name (of a block special device), like
136.IR /dev/sda1 ,
137but there are other possibilities. For example, in the case of an NFS mount,
138.I device
139may look like
140.IR knuth.cwi.nl:/dir .
141It is possible to indicate a block special device using its
eb0eb262 142filesystem
60a2a323
KZ
143.B LABEL
144or
145.B UUID
eb0eb262
KZ
146(see the \-L and \-U options below) and
147partition
148.B PARTUUID
149or
150.B PARTLABEL
71e87708
KZ
151(partition identifiers are supported for example for GUID Partition Table (GPT)
152partition tables).
153
154Don't forget that there is no guarantee that UUIDs and labels are really
155unique, especially if you move, share or copy the device. Use
156.BR "lsblk -o +UUID,PARTUUID"
157to verify that the UUIDs are really unique in your system.
60a2a323 158
eb0eb262
KZ
159The recommended setup is to use tags (e.g. LABEL=<label>) rather than
160.B /dev/disk/by-{label,uuid,partuuid,partlabel}
60a2a323
KZ
161udev symlinks in the /etc/fstab file. The tags are
162more readable, robust and portable. The
163.BR mount (8)
164command internally uses udev
eb0eb262 165symlinks, so use the symlinks in /etc/fstab has no advantage over the tags.
60a2a323
KZ
166For more details see
167.BR libblkid (3).
168
169Note that
170.BR mount (8)
171uses UUIDs as strings. The UUIDs from command line or
172.BR fstab (5)
173are not converted to internal binary representation. The string representation
174of the UUID should be based on lower case characters.
175
176The
177.I proc
178filesystem is not associated with a special device, and when
179mounting it, an arbitrary keyword, such as
180.I proc
181can be used instead of a device specification.
182(The customary choice
183.I none
184is less fortunate: the error message `none busy' from
185.B umount
186can be confusing.)
187.RE
188
189.B The /etc/fstab, /etc/mtab and /proc/mounts files.
190.RS
191The file
192.I /etc/fstab
193(see
194.BR fstab (5)),
195may contain lines describing what devices are usually
196mounted where, using which options. The default location of the
197.BR fstab (5)
f036b4c7 198file could be overridden by --fstab <path> command line option (see below for
60a2a323 199more details).
60a2a323
KZ
200.LP
201The command
202.RS
203.sp
204.B mount \-a
205.RB [ \-t
206.IR type ]
207.RB [ \-O
208.IR optlist ]
209.sp
210.RE
211(usually given in a bootscript) causes all filesystems mentioned in
212.I fstab
213(of the proper type and/or having or not having the proper options)
214to be mounted as indicated, except for those whose line contains the
215.B noauto
216keyword. Adding the
217.B \-F
218option will make mount fork, so that the
219filesystems are mounted simultaneously.
220.LP
221When mounting a filesystem mentioned in
222.IR fstab
223or
224.IR mtab,
225it suffices to give only the device, or only the mount point.
226
227
228The programs
229.B mount
230and
231.B umount
232maintain a list of currently mounted filesystems in the file
233.IR /etc/mtab .
234If no arguments are given to
235.BR mount ,
236this list is printed.
237
238The
239.B mount
240program does not read the
241.I /etc/fstab
242file if
243.I device
eb0eb262 244(or LABEL, UUID, PARTUUID or PARTLABEL) and
60a2a323
KZ
245.I dir
246are specified. For example:
247.RS
248.sp
249.B "mount /dev/foo /dir"
250.sp
251.RE
252If you want to override mount options from
253.I /etc/fstab
254you have to use:
255.RS
256.sp
257.B "mount device|dir -o <options>"
258.sp
259.RE
260and then the mount options from command line will be appended to
261the list of options from
262.IR /etc/fstab .
263The usual behaviour is that the last option wins if there is more duplicated
264options.
265
266When the
267.I proc
268filesystem is mounted (say at
269.IR /proc ),
270the files
271.I /etc/mtab
272and
273.I /proc/mounts
274have very similar contents. The former has somewhat
275more information, such as the mount options used,
276but is not necessarily up-to-date (cf. the
277.B \-n
278option below). It is possible to replace
279.I /etc/mtab
280by a symbolic link to
281.IR /proc/mounts ,
282and especially when you have very large numbers of mounts
283things will be much faster with that symlink,
284but some information is lost that way, and in particular
285using the "user" option will fail.
286.RE
287
288.B The non-superuser mounts.
289.RS
290Normally, only the superuser can mount filesystems.
291However, when
292.I fstab
293contains the
294.B user
295option on a line, anybody can mount the corresponding system.
296.LP
297Thus, given a line
298.RS
299.sp
300.B "/dev/cdrom /cd iso9660 ro,user,noauto,unhide"
301.sp
302.RE
303any user can mount the iso9660 filesystem found on his CDROM
304using the command
305.RS
306.sp
307.B "mount /dev/cdrom"
308.sp
309.RE
310or
311.RS
312.sp
313.B "mount /cd"
314.sp
315.RE
316For more details, see
317.BR fstab (5).
318Only the user that mounted a filesystem can unmount it again.
319If any user should be able to unmount, then use
320.B users
321instead of
322.B user
323in the
324.I fstab
325line.
326The
327.B owner
328option is similar to the
329.B user
330option, with the restriction that the user must be the owner
331of the special file. This may be useful e.g. for
332.I /dev/fd
333if a login script makes the console user owner of this device.
334The
335.B group
336option is similar, with the restriction that the user must be
337member of the group of the special file.
338.RE
339
340
341.B The bind mounts.
342.RS
343.\" In fact since 2.3.99. At first the syntax was mount -t bind.
344Since Linux 2.4.0 it is possible to remount part of the
345file hierarchy somewhere else. The call is
346.RS
347.br
348.B mount --bind
349.I olddir newdir
350.RE
351or shortoption
352.RS
353.br
354.B mount -B
355.I olddir newdir
356.RE
357or fstab entry is:
358.RS
359.br
360.I /olddir
361.I /newdir
362.B none bind
363.RE
364
365After this call the same contents is accessible in two places.
366One can also remount a single file (on a single file). It's also
367possible to use the bind mount to create a mountpoint from a regular
368directory, for example:
369
370.RS
371.br
372.B mount --bind
373.I foo foo
374.RE
375
376The bind mount call attaches only (part of) a single filesystem, not possible
377submounts. The entire file hierarchy including submounts is attached
378a second place using
379
380.RS
381.br
382.B mount --rbind
383.I olddir newdir
384.RE
385
386or shortoption
387
388.RS
389.br
390.B mount -R
391.I olddir newdir
392.RE
393.\" available since Linux 2.4.11.
394
395Note that the filesystem mount options will remain the same as those
396on the original mount point, and cannot be changed by passing the -o
397option along with --bind/--rbind. The mount options can be
398changed by a separate remount command, for example:
399
400.RS
401.br
402.B mount --bind
403.I olddir newdir
404.br
405.B mount -o remount,ro
406.I newdir
407.RE
408
409Note that behavior of the remount operation depends on the /etc/mtab file. The
410first command stores the 'bind' flag to the /etc/mtab file and the second
411command reads the flag from the file. If you have a system without the
412/etc/mtab file or if you explicitly define source and target for the remount
413command (then mount(8) does not read /etc/mtab), then you have to use bind flag
414(or option) for the remount command too. For example:
415
416.RS
417.br
418.B mount --bind
419.I olddir newdir
420.br
421.B mount -o remount,ro,bind
422.I olddir newdir
423.RE
d7890778
KZ
424
425Note that
426.I remount,ro,bind
427will create a read-only mountpoint (VFS entry), but the original filesystem suberblock
428will be still writable, it means that the
429.I olddir
430will be writable, but the
431.I newdir
432will be read-only.
60a2a323
KZ
433.RE
434
435.B The move operation.
436.RS
437Since Linux 2.5.1 it is possible to atomically move a
438.B mounted tree
439to another place. The call is
440.RS
441.br
442.B mount --move
443.I olddir newdir
444.RE
445or shortoption
446.RS
447.br
448.B mount -M
449.I olddir newdir
450.RE
451This will cause the contents which previously appeared under olddir to be
452accessed under newdir. The physical location of the files is not changed.
453Note that the
454.I olddir
455has to be a mountpoint.
fcc0413a
KZ
456
457Note that moving a mount residing under a shared mount is invalid and
458unsupported. Use
459.B findmnt -o TARGET,PROPAGATION /dir
460to see the current propagation flags.
60a2a323
KZ
461.RE
462
463.B The shared subtrees operations.
464.RS
465Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared,
466private, slave or unbindable. A shared mount provides ability to create mirrors
467of that mount such that mounts and umounts within any of the mirrors propagate
468to the other mirror. A slave mount receives propagation from its master, but
469any not vice-versa. A private mount carries no propagation abilities. A
470unbindable mount is a private mount which cannot be cloned through a bind
be6904b9
KZ
471operation. Detailed semantics is documented in
472.B Documentation/filesystems/sharedsubtree.txt
60a2a323
KZ
473file in the kernel source tree.
474
be6904b9 475Supported operations:
60a2a323
KZ
476.RS
477.nf
478.BI "mount --make-shared " mountpoint
479.BI "mount --make-slave " mountpoint
480.BI "mount --make-private " mountpoint
481.BI "mount --make-unbindable " mountpoint
482.fi
483.RE
484
485The following commands allows one to recursively change the type of all the
486mounts under a given mountpoint.
487
488.RS
489.nf
490.BI "mount --make-rshared " mountpoint
491.BI "mount --make-rslave " mountpoint
492.BI "mount --make-rprivate " mountpoint
493.BI "mount --make-runbindable " mountpoint
494.fi
495.RE
be6904b9
KZ
496
497.BR mount (8)
498.B does not read
499.BR fstab (5)
500when --make-* operation is requested. All necessary information has to be
501specified on command line.
502
503Note that Linux kernel does not allow to change more propagation flags by one
504.BR mount (2)
505syscall and the flags cannot be mixed with another mount options.
506
507Since util-linux 2.23 mount command allows to use more propagation flags
e80d46b0
KZ
508together and with another mount operations. This feature is EXPERIMENTAL.
509The propagation flags are applied by additional mount(2) syscalls
be6904b9 510after previous successful mount operation. Note that this use case is not
e80d46b0 511atomic. The propagation flags is possible to specify in
be6904b9
KZ
512.BR fstab (5)
513as mount options
49c6c4f1
SK
514.RI ( private ,
515.IR slave ,
516.IR shared ,
517.IR unbindable ,
518.IR rprivate ,
519.IR rslave ,
520.IR rshared ,
521.IR runbindable ).
be6904b9
KZ
522
523For example
524.RS
525.nf
526.BI "mount --make-private --make-unbindable /dev/sda1 /A"
527.fi
528.RE
529
530is the same as
531.RS
532.nf
533.BI "mount /dev/sda1 /A"
534.BI "mount --make-private /A"
535.BI "mount --make-unbindable /A"
536.fi
537.RE
60a2a323
KZ
538.RE
539
540.SH COMMAND LINE OPTIONS
541The full set of mount options used by an invocation of
542.B mount
543is determined by first extracting the
544mount options for the filesystem from the
545.I fstab
546table, then applying any options specified by the
547.B \-o
548argument, and finally applying a
549.BR \-r " or " \-w
550option, when present.
551
552Command line options available for the
553.B mount
554command:
555.IP "\fB\-V, \-\-version\fP"
b4362b6f 556Display version information and exit.
60a2a323 557.IP "\fB\-h, \-\-help\fP"
b4362b6f 558Display help text and exit.
60a2a323
KZ
559.IP "\fB\-v, \-\-verbose\fP"
560Verbose mode.
561.IP "\fB\-a, \-\-all\fP"
562Mount all filesystems (of the given types) mentioned in
563.IR fstab .
564.IP "\fB\-F, \-\-fork\fP"
565(Used in conjunction with
566.BR \-a .)
567Fork off a new incarnation of mount for each device.
568This will do the mounts on different devices or different NFS servers
569in parallel.
570This has the advantage that it is faster; also NFS timeouts go in
571parallel. A disadvantage is that the mounts are done in undefined order.
572Thus, you cannot use this option if you want to mount both
573.I /usr
574and
575.IR /usr/spool .
576.IP "\fB\-f, \-\-fake\fP"
577Causes everything to be done except for the actual system call; if it's not
578obvious, this ``fakes'' mounting the filesystem. This option is useful in
579conjunction with the
580.B \-v
581flag to determine what the
582.B mount
583command is trying to do. It can also be used to add entries for devices
584that were mounted earlier with the -n option. The -f option checks for
585existing record in /etc/mtab and fails when the record already
586exists (with regular non-fake mount, this check is done by kernel).
587.IP "\fB\-i, \-\-internal\-only\fP"
588Don't call the /sbin/mount.<filesystem> helper even if it exists.
81009d72 589.IP "\fB\-l, \-\-show\-labels\fP"
60a2a323
KZ
590Add the labels in the mount output. Mount must have
591permission to read the disk device (e.g. be suid root) for this to work.
592One can set such a label for ext2, ext3 or ext4 using the
593.BR e2label (8)
594utility, or for XFS using
595.BR xfs_admin (8),
596or for reiserfs using
597.BR reiserfstune (8).
598.IP "\fB\-n, \-\-no\-mtab\fP"
599Mount without writing in
600.IR /etc/mtab .
601This is necessary for example when
602.I /etc
603is on a read-only filesystem.
249fd011 604.IP "\fB\-c, \-\-no\-canonicalize\fP"
60a2a323
KZ
605Don't canonicalize paths. The mount command canonicalizes all paths
606(from command line or fstab) and stores canonicalized paths to the
607.IR /etc/mtab
608file. This option can be used together with the
609.B \-f
f036b4c7 610flag for already canonicalized absolute paths.
60a2a323 611.IP "\fB\-s\fP"
5875c506
KZ
612Tolerate sloppy mount options rather than failing. This will ignore mount
613options not supported by a filesystem type. Not all filesystems support this
614option. Currently it's supported by the mount.nfs mount helper only.
aedeaa40
KZ
615.IP "\fB\-\-source \fIsrc\fP"
616If only one argument for the mount command is given then the argument might be
617interpreted as target (mountpoint) or source (device). This option allows to
618explicitly define that the argument is mount source.
60a2a323
KZ
619.IP "\fB\-r, \-\-read\-only\fP"
620Mount the filesystem read-only. A synonym is
621.BR "\-o ro" .
622
623Note that, depending on the filesystem type, state and kernel behavior, the
624system may still write to the device. For example, Ext3 or ext4 will replay its
625journal if the filesystem is dirty. To prevent this kind of write access, you
626may want to mount ext3 or ext4 filesystem with "ro,noload" mount options or
627set the block device to read-only mode, see command
628.BR blockdev (8).
6d402bbe 629.IP "\fB\-w, \-\-rw, \-\-read\-write\fP"
60a2a323
KZ
630Mount the filesystem read/write. This is the default. A synonym is
631.BR "\-o rw" .
b4359220 632.IP "\fB\-L, \-\-label \fIlabel\fP"
60a2a323
KZ
633Mount the partition that has the specified
634.IR label .
b4359220 635.IP "\fB\-U, \-\-uuid \fIuuid\fP"
60a2a323
KZ
636Mount the partition that has the specified
637.IR uuid .
638These two options require the file
639.I /proc/partitions
640(present since Linux 2.1.116) to exist.
641.IP "\fB\-T, \-\-fstab \fIpath\fP"
c633953c
KZ
642Specifies alternative fstab file. If the \fIpath\fP is directory then the files
643in the directory are sorted by
60a2a323
KZ
644.BR strverscmp (3),
645files that starts with "." or without .fstab extension are ignored. The option
c633953c
KZ
646can be specified more than once. This option is mostly designed for initramfs
647or chroot scripts where additional configuration is specified outside standard
648system configuration.
649
650Note that mount(8) does not pass the option \fB\-\-fstab\fP to
651/sbin/mount.<type> helpers, it means that the alternative fstab files will be
652invisible for the helpers. This is no problem for normal mounts, but user
653(non-root) mounts always require fstab to verify user's rights.
60a2a323
KZ
654.IP "\fB\-t, \-\-types \fIvfstype\fP"
655The argument following the
656.B \-t
657is used to indicate the filesystem type. The filesystem types which are
658currently supported include:
659.IR adfs ,
660.IR affs ,
661.IR autofs ,
662.IR cifs ,
663.IR coda ,
664.IR coherent ,
665.IR cramfs ,
666.IR debugfs ,
667.IR devpts ,
668.IR efs ,
669.IR ext ,
670.IR ext2 ,
671.IR ext3 ,
672.IR ext4 ,
673.IR hfs ,
674.IR hfsplus ,
675.IR hpfs ,
676.IR iso9660 ,
677.IR jfs ,
678.IR minix ,
679.IR msdos ,
680.IR ncpfs ,
681.IR nfs ,
682.IR nfs4 ,
683.IR ntfs ,
684.IR proc ,
685.IR qnx4 ,
686.IR ramfs ,
687.IR reiserfs ,
688.IR romfs ,
689.IR squashfs ,
690.IR smbfs ,
691.IR sysv ,
692.IR tmpfs ,
693.IR ubifs ,
694.IR udf ,
695.IR ufs ,
696.IR umsdos ,
697.IR usbfs ,
698.IR vfat ,
699.IR xenix ,
700.IR xfs ,
701.IR xiafs .
702Note that coherent, sysv and xenix are equivalent and that
703.I xenix
704and
705.I coherent
706will be removed at some point in the future \(em use
707.I sysv
708instead. Since kernel version 2.1.21 the types
709.I ext
710and
711.I xiafs
712do not exist anymore. Earlier,
713.I usbfs
714was known as
715.IR usbdevfs .
716Note, the real list of all supported filesystems depends on your
717kernel.
718
719The programs
720.B mount
721and
722.B umount
723support filesystem subtypes. The subtype is defined by '.subtype' suffix. For
724example 'fuse.sshfs'. It's recommended to use subtype notation rather than add
725any prefix to the mount source (for example 'sshfs#example.com' is
ef75bc88 726deprecated).
60a2a323
KZ
727
728For most types all the
729.B mount
730program has to do is issue a simple
731.IR mount (2)
732system call, and no detailed knowledge of the filesystem type is required.
733For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) ad hoc code is
734necessary. The nfs, nfs4, cifs, smbfs, and ncpfs filesystems
735have a separate mount program. In order to make it possible to
736treat all types in a uniform way, mount will execute the program
737.BI /sbin/mount. TYPE
738(if that exists) when called with type
739.IR TYPE .
740Since various versions of the
741.B smbmount
742program have different calling conventions,
743.B /sbin/mount.smbfs
744may have to be a shell script that sets up the desired call.
745
746If no
747.B \-t
748option is given, or if the
749.B auto
750type is specified, mount will try to guess the desired type.
751Mount uses the blkid library for guessing the filesystem
752type; if that does not turn up anything that looks familiar,
753mount will try to read the file
754.IR /etc/filesystems ,
755or, if that does not exist,
756.IR /proc/filesystems .
757All of the filesystem types listed there will be tried,
758except for those that are labeled "nodev" (e.g.,
759.IR devpts ,
760.I proc
761and
762.IR nfs ).
763If
764.I /etc/filesystems
765ends in a line with a single * only, mount will read
766.I /proc/filesystems
a21aa92f
KZ
767afterwards. All of the filesystem types will be
768mounted with mount option "silent".
60a2a323
KZ
769
770The
771.B auto
772type may be useful for user-mounted floppies.
773Creating a file
774.I /etc/filesystems
775can be useful to change the probe order (e.g., to try vfat before msdos
776or ext3 before ext2) or if you use a kernel module autoloader.
777
778More than one type may be specified in a comma separated
779list. The list of filesystem types can be prefixed with
780.B no
781to specify the filesystem types on which no action should be taken.
782(This can be meaningful with the
783.B \-a
784option.) For example, the command:
785.RS
786.RS
787.sp
788.B "mount \-a \-t nomsdos,ext"
789.sp
790.RE
791mounts all filesystems except those of type
792.I msdos
793and
794.IR ext .
795.RE
aedeaa40
KZ
796.IP "\fB\-\-target \fIdir\fP"
797If only one argument for the mount command is given then the argument might be
798interpreted as target (mountpoint) or source (device). This option allows to
799explicitly define that the argument is mount target.
60a2a323
KZ
800.IP "\fB\-O, \-\-test-opts \fIopts\fP"
801Used in conjunction with
802.BR \-a ,
803to limit the set of filesystems to which the
804.B \-a
805is applied. Like
806.B \-t
807in this regard except that it is useless except in the context of
808.BR \-a .
809For example, the command:
810.RS
811.RS
812.sp
813.B "mount \-a \-O no_netdev"
814.sp
815.RE
816mounts all filesystems except those which have the option
817.I _netdev
818specified in the options field in the
819.I /etc/fstab
820file.
821
822It is different from
823.B \-t
824in that each option is matched exactly; a leading
825.B no
826at the beginning of one option does not negate the rest.
827
828The
829.B \-t
830and
831.B \-O
832options are cumulative in effect; that is, the command
833.RS
834.sp
835.B "mount \-a \-t ext2 \-O _netdev"
836.sp
837.RE
838mounts all ext2 filesystems with the _netdev option, not all filesystems
839that are either ext2 or have the _netdev option specified.
840.RE
841.IP "\fB\-o, \-\-options \fIopts\fP"
842Options are specified with a
843.B \-o
844flag followed by a comma separated string of options. For example:
845.RS
846.RS
847.sp
848.B "mount LABEL=mydisk \-o noatime,nouser"
849.sp
850.RE
851
852For more details, see
853.B FILESYSTEM INDEPENDENT MOUNT OPTIONS
854and
855.B FILESYSTEM SPECIFIC MOUNT OPTIONS
856sections.
857.RE
858.IP "\fB\-B, \-\-bind\fP"
859Remount a subtree somewhere else (so that its contents are available
860in both places). See above.
861.IP "\fB\-R, \-\-rbind\fP"
862Remount a subtree and all possible submounts somewhere else (so that its
863contents are available in both places). See above.
864.IP "\fB\-M, \-\-move\fP"
865Move a subtree to some other place. See above.
866
867.SH FILESYSTEM INDEPENDENT MOUNT OPTIONS
868Some of these options are only useful when they appear in the
869.I /etc/fstab
870file.
871
872Some of these options could be enabled or disabled by default
873in the system kernel. To check the current setting see the options
874in /proc/mounts.
875
876The following options apply to any filesystem that is being
877mounted (but not every filesystem actually honors them - e.g., the
878.B sync
879option today has effect only for ext2, ext3, fat, vfat and ufs):
880
881.TP
882.B async
883All I/O to the filesystem should be done asynchronously. (See also the
884.B sync
885option.)
886.TP
887.B atime
888Do not use noatime feature, then the inode access time is controlled by kernel
889defaults. See also the description for
890.B strictatime
891and
d5360e92 892.B relatime
60a2a323
KZ
893mount options.
894.TP
895.B noatime
896Do not update inode access times on this filesystem (e.g., for faster
897access on the news spool to speed up news servers).
898.TP
899.B auto
900Can be mounted with the
901.B \-a
902option.
903.TP
904.B noauto
905Can only be mounted explicitly (i.e., the
906.B \-a
907option will not cause the filesystem to be mounted).
908.TP
909\fBcontext=\fP\fIcontext\fP, \fBfscontext=\fP\fIcontext\fP, \fBdefcontext=\fP\fIcontext\fP and \fBrootcontext=\fP\fIcontext\fP
910The
911.BR context=
912option is useful when mounting filesystems that do not support
913extended attributes, such as a floppy or hard disk formatted with VFAT, or
914systems that are not normally running under SELinux, such as an ext3 formatted
915disk from a non-SELinux workstation. You can also use
916.BR context=
917on filesystems you do not trust, such as a floppy. It also helps in compatibility with
918xattr-supporting filesystems on earlier 2.4.<x> kernel versions. Even where
919xattrs are supported, you can save time not having to label every file by
920assigning the entire disk one security context.
921
922A commonly used option for removable media is
923.BR context="system_u:object_r:removable_t" .
924
925Two other options are
926.BR fscontext=
927and
928.BR defcontext= ,
929both of which are mutually exclusive of the context option. This means you
930can use fscontext and defcontext with each other, but neither can be used with
931context.
932
933The
934.BR fscontext=
935option works for all filesystems, regardless of their xattr
936support. The fscontext option sets the overarching filesystem label to a
937specific security context. This filesystem label is separate from the
938individual labels on the files. It represents the entire filesystem for
939certain kinds of permission checks, such as during mount or file creation.
940Individual file labels are still obtained from the xattrs on the files
941themselves. The context option actually sets the aggregate context that
942fscontext provides, in addition to supplying the same label for individual
943files.
944
945You can set the default security context for unlabeled files using
946.BR defcontext=
947option. This overrides the value set for unlabeled files in the policy and requires a
948filesystem that supports xattr labeling.
949
950The
951.BR rootcontext=
952option allows you to explicitly label the root inode of a FS being mounted
60c02107 953before that FS or inode becomes visible to userspace. This was found to be
60a2a323
KZ
954useful for things like stateless linux.
955
60c02107
BS
956Note that the kernel rejects any remount request that includes the context
957option, \fBeven\fP when unchanged from the current context.
60a2a323 958
60c02107
BS
959.BR "Warning: the \fIcontext\fP value might contain commas" ,
960in which case the value has to be properly quoted, otherwise
60a2a323 961.BR mount (8)
60c02107
BS
962will interpret the comma as a separator between mount options. Don't forget that
963the shell strips off quotes and thus
964.BR "double quoting is required" .
965For example:
60a2a323
KZ
966.RS
967.RS
968.sp
60c02107 969.B mount -t tmpfs none /mnt \-o 'context="system_u:object_r:tmp_t:s0:c127,c456",noexec'
60a2a323
KZ
970.sp
971.RE
60a2a323 972For more details, see
60c02107 973.BR selinux (8).
60a2a323
KZ
974.RE
975
976.TP
977.B defaults
978Use default options:
979.BR rw ", " suid ", " dev ", " exec ", " auto ", " nouser ", and " async.
980.TP
981.B dev
982Interpret character or block special devices on the filesystem.
983.TP
984.B nodev
985Do not interpret character or block special devices on the file
986system.
987.TP
988.B diratime
989Update directory inode access times on this filesystem. This is the default.
990.TP
991.B nodiratime
992Do not update directory inode access times on this filesystem.
993.TP
994.B dirsync
995All directory updates within the filesystem should be done synchronously.
996This affects the following system calls: creat, link, unlink, symlink,
997mkdir, rmdir, mknod and rename.
998.TP
999.B exec
1000Permit execution of binaries.
1001.TP
1002.B noexec
1003Do not allow direct execution of any binaries on the mounted filesystem.
1004(Until recently it was possible to run binaries anyway using a command like
1005/lib/ld*.so /mnt/binary. This trick fails since Linux 2.4.25 / 2.6.0.)
1006.TP
1007.B group
1008Allow an ordinary (i.e., non-root) user to mount the filesystem if one
1009of his groups matches the group of the device.
1010This option implies the options
1011.BR nosuid " and " nodev
1012(unless overridden by subsequent options, as in the option line
1013.BR group,dev,suid ).
1014.TP
1015.B iversion
1016Every time the inode is modified, the i_version field will be incremented.
1017.TP
1018.B noiversion
1019Do not increment the i_version inode field.
1020.TP
1021.B mand
1022Allow mandatory locks on this filesystem. See
1023.BR fcntl (2).
1024.TP
1025.B nomand
1026Do not allow mandatory locks on this filesystem.
1027.TP
1028.B _netdev
1029The filesystem resides on a device that requires network access
1030(used to prevent the system from attempting to mount these filesystems
1031until the network has been enabled on the system).
1032.TP
1033.B nofail
1034Do not report errors for this device if it does not exist.
1035.TP
1036.B relatime
1037Update inode access times relative to modify or change time. Access
1038time is only updated if the previous access time was earlier than the
1039current modify or change time. (Similar to noatime, but doesn't break
1040mutt or other applications that need to know if a file has been read
1041since the last time it was modified.)
1042
1043Since Linux 2.6.30, the kernel defaults to the behavior provided by this
1044option (unless
1045.B noatime
1046was specified), and the
1047.B strictatime
1048option is required to obtain traditional semantics. In addition, since Linux
10492.6.30, the file's last access time is always updated if it is more than 1
1050day old.
1051.TP
1052.B norelatime
1053Do not use
1054.B relatime
1055feature. See also the
1056.B strictatime
1057mount option.
1058.TP
1059.B strictatime
1060Allows to explicitly requesting full atime updates. This makes it
1061possible for kernel to defaults to
1062.B relatime
1063or
1064.B noatime
1065but still allow userspace to override it. For more details about the default
1066system mount options see /proc/mounts.
1067.TP
1068.B nostrictatime
1069Use the kernel's default behaviour for inode access time updates.
1070.TP
1071.B suid
1072Allow set-user-identifier or set-group-identifier bits to take
1073effect.
1074.TP
1075.B nosuid
1076Do not allow set-user-identifier or set-group-identifier bits to take
1077effect. (This seems safe, but is in fact rather unsafe if you have
1078suidperl(1) installed.)
1079.TP
1080.B silent
1081Turn on the silent flag.
1082.TP
1083.B loud
1084Turn off the silent flag.
1085.TP
1086.B owner
1087Allow an ordinary (i.e., non-root) user to mount the filesystem if he
1088is the owner of the device.
1089This option implies the options
1090.BR nosuid " and " nodev
1091(unless overridden by subsequent options, as in the option line
1092.BR owner,dev,suid ).
1093.TP
1094.B remount
1095Attempt to remount an already-mounted filesystem. This is commonly
1096used to change the mount flags for a filesystem, especially to make a
1097readonly filesystem writable. It does not change device or mount point.
1098
1099The remount functionality follows the standard way how the mount command works
1100with options from fstab. It means the mount command doesn't read fstab (or
1101mtab) only when a
1102.IR device
1103and
1104.IR dir
1105are fully specified.
1106
1107.BR "mount -o remount,rw /dev/foo /dir"
1108
1109After this call all old mount options are replaced and arbitrary stuff from
1110fstab is ignored, except the loop= option which is internally generated and
1111maintained by the mount command.
1112
1113.BR "mount -o remount,rw /dir"
1114
1115After this call mount reads fstab (or mtab) and merges these options with
1116options from command line (
1117.B -o
1118).
1119.TP
1120.B ro
1121Mount the filesystem read-only.
1122.TP
1123.B rw
1124Mount the filesystem read-write.
1125.TP
1126.B sync
1127All I/O to the filesystem should be done synchronously. In case of media with limited number of write cycles
1128(e.g. some flash drives) "sync" may cause life-cycle shortening.
1129.TP
1130.B user
1131Allow an ordinary user to mount the filesystem.
1132The name of the mounting user is written to mtab so that he can unmount
1133the filesystem again.
1134This option implies the options
1135.BR noexec ", " nosuid ", and " nodev
1136(unless overridden by subsequent options, as in the option line
1137.BR user,exec,dev,suid ).
1138.TP
1139.B nouser
1140Forbid an ordinary (i.e., non-root) user to mount the filesystem.
1141This is the default.
1142.TP
1143.B users
1144Allow every user to mount and unmount the filesystem.
1145This option implies the options
1146.BR noexec ", " nosuid ", and " nodev
1147(unless overridden by subsequent options, as in the option line
1148.BR users,exec,dev,suid ).
f3242e06
KZ
1149.TP
1150.B x-*
1151All options prefixed with "x-" are interpreted as comments or userspace
1152applications specific options. These options are not stored to mtab file, send
1153to mount.<type> helpers or
1154.B mount(2)
1155system call. The suggested format is x-<appname>.<option> (e.g. x-systemd.automount).
701c6961
OO
1156.TP
1157.B x-mount.mkdir[=<mode>]
1158Allow to make a target directory (mountpoint). The optional argument <mode>
1159specifies the file system access mode used for
1160.B mkdir (2)
1161in octal notation. The default mode is 0755. This functionality is supported
1162only for root users.
60a2a323
KZ
1163
1164.SH "FILESYSTEM SPECIFIC MOUNT OPTIONS"
1165The following options apply only to certain filesystems.
1166We sort them by filesystem. They all follow the
1167.B \-o
1168flag.
1169
1170What options are supported depends a bit on the running kernel.
1171More info may be found in the kernel source subdirectory
1172.IR Documentation/filesystems .
1173
1174.SH "Mount options for adfs"
1175.TP
1176\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
1177Set the owner and group of the files in the filesystem (default: uid=gid=0).
1178.TP
1179\fBownmask=\fP\fIvalue\fP and \fBothmask=\fP\fIvalue\fP
1180Set the permission mask for ADFS 'owner' permissions and 'other' permissions,
1181respectively (default: 0700 and 0077, respectively).
1182See also
1183.IR /usr/src/linux/Documentation/filesystems/adfs.txt .
1184.SH "Mount options for affs"
1185.TP
1186\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
1187Set the owner and group of the root of the filesystem (default: uid=gid=0,
1188but with option
1189.B uid
1190or
1191.B gid
1192without specified value, the uid and gid of the current process are taken).
1193.TP
1194\fBsetuid=\fP\fIvalue\fP and \fBsetgid=\fP\fIvalue\fP
1195Set the owner and group of all files.
1196.TP
1197.BI mode= value
1198Set the mode of all files to
1199.IR value " & 0777"
1200disregarding the original permissions.
1201Add search permission to directories that have read permission.
1202The value is given in octal.
1203.TP
1204.B protect
1205Do not allow any changes to the protection bits on the filesystem.
1206.TP
1207.B usemp
1208Set uid and gid of the root of the filesystem to the uid and gid
1209of the mount point upon the first sync or umount, and then
1210clear this option. Strange...
1211.TP
1212.B verbose
1213Print an informational message for each successful mount.
1214.TP
1215.BI prefix= string
1216Prefix used before volume name, when following a link.
1217.TP
1218.BI volume= string
1219Prefix (of length at most 30) used before '/' when following a symbolic link.
1220.TP
1221.BI reserved= value
1222(Default: 2.) Number of unused blocks at the start of the device.
1223.TP
1224.BI root= value
1225Give explicitly the location of the root block.
1226.TP
1227.BI bs= value
1228Give blocksize. Allowed values are 512, 1024, 2048, 4096.
1229.TP
1230.BR grpquota | noquota | quota | usrquota
1231These options are accepted but ignored.
1232(However, quota utilities may react to such strings in
1233.IR /etc/fstab .)
1234
1235.SH "Mount options for cifs"
1236See the options section of the
1237.BR mount.cifs (8)
1238man page (cifs-utils package must be installed).
1239
1240.SH "Mount options for coherent"
1241None.
1242
1243.SH "Mount options for debugfs"
1244The debugfs filesystem is a pseudo filesystem, traditionally mounted on
1245.IR /sys/kernel/debug .
1246.\" or just /debug
1247.\" present since 2.6.11
88633047
DR
1248As of kernel version 3.4, debugfs has the following options:
1249.TP
1250.BI uid= n ", gid=" n
1251Set the owner and group of the mountpoint.
1252.TP
1253.BI mode= value
1254Sets the mode of the mountpoint.
60a2a323
KZ
1255.SH "Mount options for devpts"
1256The devpts filesystem is a pseudo filesystem, traditionally mounted on
1257.IR /dev/pts .
1258In order to acquire a pseudo terminal, a process opens
1259.IR /dev/ptmx ;
1260the number of the pseudo terminal is then made available to the process
1261and the pseudo terminal slave can be accessed as
1262.IR /dev/pts/ <number>.
1263.TP
1264\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
1265This sets the owner or the group of newly created PTYs to
1266the specified values. When nothing is specified, they will
1267be set to the UID and GID of the creating process.
1268For example, if there is a tty group with GID 5, then
1269.B gid=5
1270will cause newly created PTYs to belong to the tty group.
1271.TP
1272.BI mode= value
1273Set the mode of newly created PTYs to the specified value.
1274The default is 0600.
1275A value of
1276.B mode=620
1277and
1278.B gid=5
1279makes "mesg y" the default on newly created PTYs.
1280.TP
1281\fBnewinstance
1282Create a private instance of devpts filesystem, such that
1283indices of ptys allocated in this new instance are
1284independent of indices created in other instances of devpts.
1285
1286All mounts of devpts without this
1287.B newinstance
1288option share the same set of pty indices (i.e legacy mode).
1289Each mount of devpts with the
1290.B newinstance
1291option has a private set of pty indices.
1292
1293This option is mainly used to support containers in the
1294linux kernel. It is implemented in linux kernel versions
1295starting with 2.6.29. Further, this mount option is valid
1296only if CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the
1297kernel configuration.
1298
1299To use this option effectively,
1300.IR /dev/ptmx
1301must be a symbolic link to
1302.IR pts/ptmx.
1303See
1304.IR Documentation/filesystems/devpts.txt
1305in the linux kernel source tree for details.
1306.TP
1307.BI ptmxmode= value
1308
1309Set the mode for the new
1310.IR ptmx
1311device node in the devpts filesystem.
1312
1313With the support for multiple instances of devpts (see
1314.B newinstance
1315option above), each instance has a private
1316.IR ptmx
1317node in the root of the devpts filesystem (typically
1318.IR /dev/pts/ptmx).
1319
1320For compatibility with older versions of the kernel, the
1321default mode of the new
1322.IR ptmx
1323node is 0000.
1324.BI ptmxmode= value
1325specifies a more useful mode for the
1326.IR ptmx
1327node and is highly recommended when the
1328.B newinstance
1329option is specified.
1330
1331This option is only implemented in linux kernel versions
1332starting with 2.6.29. Further this option is valid only if
1333CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the kernel
1334configuration.
1335
1336.SH "Mount options for ext"
1337None.
1338Note that the `ext' filesystem is obsolete. Don't use it.
1339Since Linux version 2.1.21 extfs is no longer part of the kernel source.
1340
1341.SH "Mount options for ext2"
1342The `ext2' filesystem is the standard Linux filesystem.
1343.\" Due to a kernel bug, it may be mounted with random mount options
1344.\" (fixed in Linux 2.0.4).
1345Since Linux 2.5.46, for most mount options the default
1346is determined by the filesystem superblock. Set them with
1347.BR tune2fs (8).
1348.TP
1349.BR acl | noacl
1350Support POSIX Access Control Lists (or not).
1351.\" requires CONFIG_EXT2_FS_POSIX_ACL
1352.TP
1353.BR bsddf | minixdf
1354Set the behaviour for the
1355.I statfs
1356system call. The
1357.B minixdf
1358behaviour is to return in the
1359.I f_blocks
1360field the total number of blocks of the filesystem, while the
1361.B bsddf
1362behaviour (which is the default) is to subtract the overhead blocks
1363used by the ext2 filesystem and not available for file storage. Thus
1364.nf
1365
1366% mount /k -o minixdf; df /k; umount /k
1367Filesystem 1024-blocks Used Available Capacity Mounted on
1368/dev/sda6 2630655 86954 2412169 3% /k
1369% mount /k -o bsddf; df /k; umount /k
1370Filesystem 1024-blocks Used Available Capacity Mounted on
1371/dev/sda6 2543714 13 2412169 0% /k
1372
1373.fi
1374(Note that this example shows that one can add command line options
1375to the options given in
1376.IR /etc/fstab .)
1377
1378.TP
1379.BR check=none " or " nocheck
1380No checking is done at mount time. This is the default. This is fast.
1381It is wise to invoke
1382.BR e2fsck (8)
f036b4c7 1383every now and then, e.g. at boot time. The non-default behavior is unsupported
60a2a323
KZ
1384(check=normal and check=strict options have been removed). Note that these mount options
1385don't have to be supported if ext4 kernel driver is used for ext2 and ext3 filesystems.
1386.TP
1387.B debug
1388Print debugging info upon each (re)mount.
1389.TP
1390.BR errors= { continue | remount-ro | panic }
1391Define the behaviour when an error is encountered.
1392(Either ignore errors and just mark the filesystem erroneous and continue,
1393or remount the filesystem read-only, or panic and halt the system.)
1394The default is set in the filesystem superblock, and can be
1395changed using
1396.BR tune2fs (8).
1397.TP
1398.BR grpid | bsdgroups " and " nogrpid | sysvgroups
1399These options define what group id a newly created file gets.
1400When
1401.BR grpid
1402is set, it takes the group id of the directory in which it is created;
1403otherwise (the default) it takes the fsgid of the current process, unless
1404the directory has the setgid bit set, in which case it takes the gid
1405from the parent directory, and also gets the setgid bit set
1406if it is a directory itself.
1407.TP
1408.BR grpquota | noquota | quota | usrquota
7860d8f5
BJ
1409The usrquota (same as quota) mount option enables user quota support on the
1410filesystem. grpquota enables group quotas support. You need the quota utilities
1411to actually enable and manage the quota system.
60a2a323
KZ
1412.TP
1413.BR nouid32
1414Disables 32-bit UIDs and GIDs. This is for interoperability with older
1415kernels which only store and expect 16-bit values.
1416.TP
1417.BR oldalloc " or " orlov
1418Use old allocator or Orlov allocator for new inodes. Orlov is default.
1419.TP
1420\fBresgid=\fP\fIn\fP and \fBresuid=\fP\fIn\fP
1421The ext2 filesystem reserves a certain percentage of the available
1422space (by default 5%, see
1423.BR mke2fs (8)
1424and
1425.BR tune2fs (8)).
1426These options determine who can use the reserved blocks.
1427(Roughly: whoever has the specified uid, or belongs to the specified group.)
1428.TP
1429.BI sb= n
1430Instead of block 1, use block
1431.I n
1432as superblock. This could be useful when the filesystem has been damaged.
1433(Earlier, copies of the superblock would be made every 8192 blocks: in
1434block 1, 8193, 16385, ... (and one got thousands of copies on
1435a big filesystem). Since version 1.08,
1436.B mke2fs
1437has a \-s (sparse superblock) option to reduce the number of backup
1438superblocks, and since version 1.15 this is the default. Note
1439that this may mean that ext2 filesystems created by a recent
1440.B mke2fs
1441cannot be mounted r/w under Linux 2.0.*.)
1442The block number here uses 1k units. Thus, if you want to use logical
1443block 32768 on a filesystem with 4k blocks, use "sb=131072".
1444.TP
1445.BR user_xattr | nouser_xattr
1446Support "user." extended attributes (or not).
1447.\" requires CONFIG_EXT2_FS_XATTR
1448
1449
1450.SH "Mount options for ext3"
1451The ext3 filesystem is a version of the ext2 filesystem which has been
f036b4c7 1452enhanced with journaling. It supports the same options as ext2 as
60a2a323
KZ
1453well as the following additions:
1454.\" .TP
1455.\" .BR abort
1456.\" Mount the filesystem in abort mode, as if a fatal error has occurred.
1457.TP
1458.BR journal=update
1459Update the ext3 filesystem's journal to the current format.
1460.TP
1461.BR journal=inum
1462When a journal already exists, this option is ignored. Otherwise, it
1463specifies the number of the inode which will represent the ext3 filesystem's
1464journal file; ext3 will create a new journal, overwriting the old contents
1465of the file whose inode number is
1466.IR inum .
1467.TP
79f84818 1468.BR journal_dev=devnum
60a2a323
KZ
1469When the external journal device's major/minor numbers
1470have changed, this option allows the user to specify
1471the new journal location. The journal device is
1472identified through its new major/minor numbers encoded
1473in devnum.
1474.TP
1475.BR norecovery / noload
1476Don't load the journal on mounting. Note that
1477if the filesystem was not unmounted cleanly,
1478skipping the journal replay will lead to the
1479filesystem containing inconsistencies that can
1480lead to any number of problems.
1481.TP
1482.BR data= { journal | ordered | writeback }
f036b4c7 1483Specifies the journaling mode for file data. Metadata is always journaled.
60a2a323
KZ
1484To use modes other than
1485.B ordered
1486on the root filesystem, pass the mode to the kernel as boot parameter, e.g.
1487.IR rootflags=data=journal .
1488.RS
1489.TP
1490.B journal
1491All data is committed into the journal prior to being written into the
1492main filesystem.
1493.TP
1494.B ordered
1495This is the default mode. All data is forced directly out to the main file
1496system prior to its metadata being committed to the journal.
1497.TP
1498.B writeback
1499Data ordering is not preserved - data may be written into the main
1500filesystem after its metadata has been committed to the journal.
1501This is rumoured to be the highest-throughput option. It guarantees
1502internal filesystem integrity, however it can allow old data to appear
1503in files after a crash and journal recovery.
1504.RE
1505.TP
1506.BR barrier=0 " / " barrier=1 "
1507This enables/disables barriers. barrier=0 disables it, barrier=1 enables it.
1508Write barriers enforce proper on-disk ordering of journal commits, making
1509volatile disk write caches safe to use, at some performance penalty. The ext3
1510filesystem does not enable write barriers by default. Be sure to enable
1511barriers unless your disks are battery-backed one way or another. Otherwise
1512you risk filesystem corruption in case of power failure.
1513.TP
1514.BI commit= nrsec
1515Sync all data and metadata every
1516.I nrsec
1517seconds. The default value is 5 seconds. Zero means default.
1518.TP
1519.BR user_xattr
1520Enable Extended User Attributes. See the
1521.BR attr (5)
1522manual page.
1523.TP
1524.BR acl
1525Enable POSIX Access Control Lists. See the
1526.BR acl (5)
1527manual page.
ea39af9a 1528.TP
309f26bb 1529.BR usrjquota=aquota.user | grpjquota=aquota.group | jqfmt=vfsv0
ea39af9a
BJ
1530Apart from the old quota system (as in ext2, jqfmt=vfsold aka version 1 quota)
1531ext3 also supports journaled quotas (version 2 quota). jqfmt=vfsv0
1532enables journaled quotas. For journaled quotas the mount options
309f26bb 1533usrjquota=aquota.user and grpjquota=aquota.group are required to tell the
ea39af9a
BJ
1534quota system which quota database files to use. Journaled quotas have the
1535advantage that even after a crash no quota check is required.
60a2a323
KZ
1536
1537.SH "Mount options for ext4"
1538The ext4 filesystem is an advanced level of the ext3 filesystem which
1539incorporates scalability and reliability enhancements for supporting large
1540filesystem.
1541
1542The options
1543.B journal_dev, noload, data, commit, orlov, oldalloc, [no]user_xattr
1544.B [no]acl, bsddf, minixdf, debug, errors, data_err, grpid, bsdgroups, nogrpid
ea39af9a 1545.B sysvgroups, resgid, resuid, sb, quota, noquota, grpquota, usrquota
309f26bb 1546.B usrjquota, grpjquota and jqfmt
60a2a323
KZ
1547are backwardly compatible with ext3 or ext2.
1548.TP
1549.BR journal_checksum
1550Enable checksumming of the journal transactions. This will allow the recovery
1551code in e2fsck and the kernel to detect corruption in the kernel. It is a
1552compatible change and will be ignored by older kernels.
1553.TP
1554.BR journal_async_commit
1555Commit block can be written to disk without waiting for descriptor blocks. If
1556enabled older kernels cannot mount the device.
1557This will enable 'journal_checksum' internally.
1558.TP
60a2a323
KZ
1559.BR barrier=0 " / " barrier=1 " / " barrier " / " nobarrier
1560This enables/disables the use of write barriers in the jbd code. barrier=0
1561disables, barrier=1 enables. This also requires an IO stack which can support
1562barriers, and if jbd gets an error on a barrier write, it will disable again
1563with a warning. Write barriers enforce proper on-disk ordering of journal
1564commits, making volatile disk write caches safe to use, at some performance
1565penalty. If your disks are battery-backed in one way or another, disabling
1566barriers may safely improve performance. The mount options "barrier" and
1567"nobarrier" can also be used to enable or disable barriers, for consistency
1568with other ext4 mount options.
1569
1570The ext4 filesystem enables write barriers by default.
1571.TP
6934547d 1572.BI inode_readahead_blks= n
60a2a323
KZ
1573This tuning parameter controls the maximum number of inode table blocks that
1574ext4's inode table readahead algorithm will pre-read into the buffer cache.
6934547d 1575The value must be a power of 2. The default value is 32 blocks.
60a2a323
KZ
1576.TP
1577.BI stripe= n
1578Number of filesystem blocks that mballoc will try to use for allocation size
1579and alignment. For RAID5/6 systems this should be the number of data disks *
1580RAID chunk size in filesystem blocks.
1581.TP
1582.BR delalloc
1583Deferring block allocation until write-out time.
1584.TP
1585.BR nodelalloc
1586Disable delayed allocation. Blocks are allocated when data is copied from user
1587to page cache.
1588.TP
1589.BI max_batch_time= usec
1590Maximum amount of time ext4 should wait for additional filesystem operations to
1591be batch together with a synchronous write operation. Since a synchronous
1592write operation is going to force a commit and then a wait for the I/O
1593complete, it doesn't cost much, and can be a huge throughput win, we wait for a
1594small amount of time to see if any other transactions can piggyback on the
1595synchronous write. The algorithm used is designed to automatically tune for
1596the speed of the disk, by measuring the amount of time (on average) that it
1597takes to finish committing a transaction. Call this time the "commit time".
1598If the time that the transaction has been running is less than the commit time,
1599ext4 will try sleeping for the commit time to see if other operations will join
1600the transaction. The commit time is capped by the max_batch_time, which
1601defaults to 15000us (15ms). This optimization can be turned off entirely by
1602setting max_batch_time to 0.
1603.TP
1604.BI min_batch_time= usec
1605This parameter sets the commit time (as described above) to be at least
1606min_batch_time. It defaults to zero microseconds. Increasing this parameter
1607may improve the throughput of multi-threaded, synchronous workloads on very
1608fast disks, at the cost of increasing latency.
1609.TP
1610.BI journal_ioprio= prio
f036b4c7 1611The I/O priority (from 0 to 7, where 0 is the highest priority) which should be
60a2a323
KZ
1612used for I/O operations submitted by kjournald2 during a commit operation.
1613This defaults to 3, which is a slightly higher priority than the default I/O
1614priority.
1615.TP
1616.BR abort
1617Simulate the effects of calling ext4_abort() for
1618debugging purposes. This is normally used while
1619remounting a filesystem which is already mounted.
1620.TP
1621.BR auto_da_alloc | noauto_da_alloc
1622Many broken applications don't use fsync() when
1623replacing existing files via patterns such as
1624
1625fd = open("foo.new")/write(fd,..)/close(fd)/ rename("foo.new", "foo")
1626
1627or worse yet
1628
1629fd = open("foo", O_TRUNC)/write(fd,..)/close(fd).
1630
1631If auto_da_alloc is enabled, ext4 will detect the replace-via-rename and
1632replace-via-truncate patterns and force that any delayed allocation blocks are
1633allocated such that at the next journal commit, in the default data=ordered
1634mode, the data blocks of the new file are forced to disk before the rename()
1635operation is committed. This provides roughly the same level of guarantees as
1636ext3, and avoids the "zero-length" problem that can happen when a system
1637crashes before the delayed allocation blocks are forced to disk.
1638.TP
1639.BR discard / nodiscard
1640Controls whether ext4 should issue discard/TRIM commands to the underlying
1641block device when blocks are freed. This is useful for SSD devices and
1642sparse/thinly-provisioned LUNs, but it is off by default until sufficient
1643testing has been done.
1644.TP
1645.BR nouid32
1646Disables 32-bit UIDs and GIDs. This is for
1647interoperability with older kernels which only
1648store and expect 16-bit values.
1649.TP
1650.BR resize
1651Allows to resize filesystem to the end of the last
1652existing block group, further resize has to be done
1653with resize2fs either online, or offline. It can be
1654used only with conjunction with remount.
1655.TP
1656.BR block_validity / noblock_validity
1657This options allows to enables/disables the in-kernel facility for tracking
1658filesystem metadata blocks within internal data structures. This allows multi-
1659block allocator and other routines to quickly locate extents which might
1660overlap with filesystem metadata blocks. This option is intended for debugging
1661purposes and since it negatively affects the performance, it is off by default.
1662.TP
1663.BR dioread_lock / dioread_nolock
1664Controls whether or not ext4 should use the DIO read locking. If the
1665dioread_nolock option is specified ext4 will allocate uninitialized extent
1666before buffer write and convert the extent to initialized after IO completes.
1667This approach allows ext4 code to avoid using inode mutex, which improves
1668scalability on high speed storages. However this does not work with data
1669journaling and dioread_nolock option will be ignored with kernel warning.
1670Note that dioread_nolock code path is only used for extent-based files.
1671Because of the restrictions this options comprises it is off by default
1672(e.g. dioread_lock).
1673.TP
1674.BR i_version
1675Enable 64-bit inode version support. This option is off by default.
1676
1677.SH "Mount options for fat"
1678(Note:
1679.I fat
1680is not a separate filesystem, but a common part of the
1681.IR msdos ,
1682.I umsdos
1683and
1684.I vfat
1685filesystems.)
1686.TP
1687.BR blocksize= { 512 | 1024 | 2048 }
1688Set blocksize (default 512). This option is obsolete.
1689.TP
1690\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
1691Set the owner and group of all files.
1692(Default: the uid and gid of the current process.)
1693.TP
1694.BI umask= value
1695Set the umask (the bitmask of the permissions that are
1696.B not
1697present). The default is the umask of the current process.
1698The value is given in octal.
1699.TP
1700.BI dmask= value
1701Set the umask applied to directories only.
1702The default is the umask of the current process.
1703The value is given in octal.
1704.\" Present since Linux 2.5.43.
1705.TP
1706.BI fmask= value
1707Set the umask applied to regular files only.
1708The default is the umask of the current process.
1709The value is given in octal.
1710.\" Present since Linux 2.5.43.
1711.TP
1712.BI allow_utime= value
1713This option controls the permission check of mtime/atime.
1714.RS
1715.TP
1716.B 20
1717If current process is in group of file's group ID, you can change timestamp.
1718.TP
1719.B 2
1720Other users can change timestamp.
1721.PP
1722The default is set from `dmask' option. (If the directory is writable,
8323d9fd 1723.BR utime (2)
60a2a323
KZ
1724is also allowed. I.e. ~dmask & 022)
1725
1726Normally
8323d9fd 1727.BR utime (2)
60a2a323
KZ
1728checks current process is owner of the file, or it has
1729CAP_FOWNER capability. But FAT filesystem doesn't have uid/gid on disk, so
f036b4c7 1730normal check is too inflexible. With this option you can relax it.
60a2a323
KZ
1731.RE
1732.TP
1733.BI check= value
1734Three different levels of pickyness can be chosen:
1735.RS
1736.TP
1737.BR r [ elaxed ]
1738Upper and lower case are accepted and equivalent, long name parts are
1739truncated (e.g.
1740.I verylongname.foobar
1741becomes
1742.IR verylong.foo ),
1743leading and embedded spaces are accepted in each name part (name and extension).
1744.TP
1745.BR n [ ormal ]
1746Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are
1747rejected. This is the default.
1748.TP
1749.BR s [ trict ]
1750Like "normal", but names may not contain long parts and special characters
1751that are sometimes used on Linux, but are not accepted by MS-DOS are
1752rejected. (+, =, spaces, etc.)
1753.RE
1754.TP
1755.BI codepage= value
1756Sets the codepage for converting to shortname characters on FAT
1757and VFAT filesystems. By default, codepage 437 is used.
1758.TP
1759.BR conv= {b [ inary ]| t [ ext ]| a [ uto ]}
1760The
1761.I fat
1762filesystem can perform CRLF<-->NL (MS-DOS text format to UNIX text
1763format) conversion in the kernel. The following conversion modes are
1764available:
1765.RS
1766.TP
1767.B binary
1768no translation is performed. This is the default.
1769.TP
1770.B text
1771CRLF<-->NL translation is performed on all files.
1772.TP
1773.B auto
1774CRLF<-->NL translation is performed on all files that don't have a
1775"well-known binary" extension. The list of known extensions can be found at
1776the beginning of
1777.I fs/fat/misc.c
1778(as of 2.0, the list is: exe, com, bin, app, sys, drv, ovl, ovr, obj,
1779lib, dll, pif, arc, zip, lha, lzh, zoo, tar, z, arj, tz, taz, tzp, tpz,
1780gz, tgz, deb, gif, bmp, tif, gl, jpg, pcx, tfm, vf, gf, pk, pxl, dvi).
1781.PP
1782Programs that do computed lseeks won't like in-kernel text conversion.
1783Several people have had their data ruined by this translation. Beware!
1784
1785For filesystems mounted in binary mode, a conversion tool
1786(fromdos/todos) is available. This option is obsolete.
1787.RE
1788.TP
1789.BI cvf_format= module
1790Forces the driver to use the CVF (Compressed Volume File) module
1791.RI cvf_ module
1792instead of auto-detection. If the kernel supports kmod, the
1793cvf_format=xxx option also controls on-demand CVF module loading.
1794This option is obsolete.
1795.TP
1796.BI cvf_option= option
1797Option passed to the CVF module. This option is obsolete.
1798.TP
1799.B debug
1800Turn on the
1801.I debug
1802flag. A version string and a list of filesystem parameters will be
1803printed (these data are also printed if the parameters appear to be
1804inconsistent).
1805.TP
ec34526a
SM
1806.B discard
1807If set, causes discard/TRIM commands to be issued to the block device
1808when blocks are freed. This is useful for SSD devices and
f036b4c7 1809sparse/thinly-provisioned LUNs.
ec34526a 1810.TP
60a2a323
KZ
1811.BR fat= {12 | 16 | 32 }
1812Specify a 12, 16 or 32 bit fat. This overrides
1813the automatic FAT type detection routine. Use with caution!
1814.TP
1815.BI iocharset= value
1816Character set to use for converting between 8 bit characters
1817and 16 bit Unicode characters. The default is iso8859-1.
1818Long filenames are stored on disk in Unicode format.
1819.TP
ec34526a
SM
1820.B nfs
1821If set, enables in-memory indexing of directory inodes to reduce the
1822frequency of ESTALE errors in NFS client operations. Useful only when
1823the filesystem is exported via NFS.
1824.TP
60a2a323
KZ
1825.BI tz=UTC
1826This option disables the conversion of timestamps
1827between local time (as used by Windows on FAT) and UTC
1828(which Linux uses internally). This is particularly
1829useful when mounting devices (like digital cameras)
1830that are set to UTC in order to avoid the pitfalls of
1831local time.
1832.TP
1833.B quiet
1834Turn on the
1835.I quiet
1836flag. Attempts to chown or chmod files do not return errors,
1837although they fail. Use with caution!
1838.TP
1839.B showexec
1840If set, the execute permission bits of the file will be allowed only if
1841the extension part of the name is .EXE, .COM, or .BAT. Not set by default.
1842.TP
1843.B sys_immutable
1844If set, ATTR_SYS attribute on FAT is handled as IMMUTABLE flag on Linux.
1845Not set by default.
1846.TP
1847.B flush
1848If set, the filesystem will try to flush to disk more early than normal.
1849Not set by default.
1850.TP
1851.B usefree
1852Use the "free clusters" value stored on FSINFO. It'll
1853be used to determine number of free clusters without
1854scanning disk. But it's not used by default, because
1855recent Windows don't update it correctly in some
1856case. If you are sure the "free clusters" on FSINFO is
1857correct, by this option you can avoid scanning disk.
1858.TP
1859.BR dots ", " nodots ", " dotsOK= [ yes | no ]
1860Various misguided attempts to force Unix or DOS conventions
1861onto a FAT filesystem.
1862
1863.SH "Mount options for hfs"
1864.TP
1865.BI creator= cccc ", type=" cccc
1866Set the creator/type values as shown by the MacOS finder
1867used for creating new files. Default values: '????'.
1868.TP
1869.BI uid= n ", gid=" n
1870Set the owner and group of all files.
1871(Default: the uid and gid of the current process.)
1872.TP
1873.BI dir_umask= n ", file_umask=" n ", umask=" n
1874Set the umask used for all directories, all regular files, or all
1875files and directories. Defaults to the umask of the current process.
1876.TP
1877.BI session= n
1878Select the CDROM session to mount.
1879Defaults to leaving that decision to the CDROM driver.
1880This option will fail with anything but a CDROM as underlying device.
1881.TP
1882.BI part= n
1883Select partition number n from the device.
1884Only makes sense for CDROMs.
1885Defaults to not parsing the partition table at all.
1886.TP
1887.B quiet
1888Don't complain about invalid mount options.
1889
1890.SH "Mount options for hpfs"
1891.TP
1892\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
1893Set the owner and group of all files. (Default: the uid and gid
1894of the current process.)
1895.TP
1896.BI umask= value
1897Set the umask (the bitmask of the permissions that are
1898.B not
1899present). The default is the umask of the current process.
1900The value is given in octal.
1901.TP
1902.BR case= { lower | asis }
1903Convert all files names to lower case, or leave them.
1904(Default:
1905.BR case=lower .)
1906.TP
1907.BR conv= { binary | text | auto }
1908For
1909.BR conv=text ,
1910delete some random CRs (in particular, all followed by NL)
1911when reading a file.
1912For
1913.BR conv=auto ,
1914choose more or less at random between
1915.BR conv=binary " and " conv=text .
1916For
1917.BR conv=binary ,
1918just read what is in the file. This is the default.
1919.TP
1920.B nocheck
1921Do not abort mounting when certain consistency checks fail.
1922
1923.SH "Mount options for iso9660"
1924ISO 9660 is a standard describing a filesystem structure to be used
1925on CD-ROMs. (This filesystem type is also seen on some DVDs. See also the
1926.I udf
1927filesystem.)
1928
1929Normal
1930.I iso9660
1931filenames appear in a 8.3 format (i.e., DOS-like restrictions on filename
1932length), and in addition all characters are in upper case. Also there is
1933no field for file ownership, protection, number of links, provision for
1934block/character devices, etc.
1935
1936Rock Ridge is an extension to iso9660 that provides all of these UNIX-like
1937features. Basically there are extensions to each directory record that
1938supply all of the additional information, and when Rock Ridge is in use,
1939the filesystem is indistinguishable from a normal UNIX filesystem (except
1940that it is read-only, of course).
1941.TP
1942.B norock
1943Disable the use of Rock Ridge extensions, even if available. Cf.\&
1944.BR map .
1945.TP
1946.B nojoliet
1947Disable the use of Microsoft Joliet extensions, even if available. Cf.\&
1948.BR map .
1949.TP
1950.BR check= { r [ elaxed ]| s [ trict ]}
1951With
1952.BR check=relaxed ,
1953a filename is first converted to lower case before doing the lookup.
1954This is probably only meaningful together with
1955.B norock
1956and
1957.BR map=normal .
1958(Default:
1959.BR check=strict .)
1960.TP
1961\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
1962Give all files in the filesystem the indicated user or group id,
1963possibly overriding the information found in the Rock Ridge extensions.
1964(Default:
1965.BR uid=0,gid=0 .)
1966.TP
1967.BR map= { n [ ormal ]| o [ ff ]| a [ corn ]}
1968For non-Rock Ridge volumes, normal name translation maps upper
1969to lower case ASCII, drops a trailing `;1', and converts `;' to `.'.
1970With
1971.B map=off
1972no name translation is done. See
1973.BR norock .
1974(Default:
1975.BR map=normal .)
1976.B map=acorn
1977is like
1978.BR map=normal
1979but also apply Acorn extensions if present.
1980.TP
1981.BI mode= value
1982For non-Rock Ridge volumes, give all files the indicated mode.
1983(Default: read permission for everybody.)
1984Since Linux 2.1.37 one no longer needs to specify the mode in
1985decimal. (Octal is indicated by a leading 0.)
1986.TP
1987.B unhide
1988Also show hidden and associated files.
1989(If the ordinary files and the associated or hidden files have
1990the same filenames, this may make the ordinary files inaccessible.)
1991.TP
1992.BR block= { 512 | 1024 | 2048 }
1993Set the block size to the indicated value.
1994(Default:
1995.BR block=1024 .)
1996.TP
1997.BR conv= { a [ uto ]| b [ inary ]| m [ text ]| t [ ext ]}
1998(Default:
1999.BR conv=binary .)
2000Since Linux 1.3.54 this option has no effect anymore.
2001(And non-binary settings used to be very dangerous,
2002possibly leading to silent data corruption.)
2003.TP
2004.B cruft
2005If the high byte of the file length contains other garbage,
2006set this mount option to ignore the high order bits of the file length.
2007This implies that a file cannot be larger than 16MB.
2008.TP
2009.BI session= x
2010Select number of session on multisession CD. (Since 2.3.4.)
2011.TP
2012.BI sbsector= xxx
2013Session begins from sector xxx. (Since 2.3.4.)
2014.LP
2015The following options are the same as for vfat and specifying them only makes
2016sense when using discs encoded using Microsoft's Joliet extensions.
2017.TP
2018.BI iocharset= value
2019Character set to use for converting 16 bit Unicode characters on CD
2020to 8 bit characters. The default is iso8859-1.
2021.TP
2022.B utf8
2023Convert 16 bit Unicode characters on CD to UTF-8.
2024
2025.SH "Mount options for jfs"
2026.TP
2027.BI iocharset= name
2028Character set to use for converting from Unicode to ASCII. The default is
2029to do no conversion. Use
2030.B iocharset=utf8
2031for UTF8 translations. This requires CONFIG_NLS_UTF8 to be set in
2032the kernel
2033.I ".config"
2034file.
2035.TP
2036.BI resize= value
2037Resize the volume to
2038.I value
2039blocks. JFS only supports growing a volume, not shrinking it. This option
2040is only valid during a remount, when the volume is mounted read-write. The
2041.B resize
2042keyword with no value will grow the volume to the full size of the partition.
2043.TP
2044.B nointegrity
2045Do not write to the journal. The primary use of this option is to allow
2046for higher performance when restoring a volume from backup media. The
f036b4c7 2047integrity of the volume is not guaranteed if the system abnormally ends.
60a2a323
KZ
2048.TP
2049.B integrity
2050Default. Commit metadata changes to the journal. Use this option to remount
2051a volume where the
2052.B nointegrity
2053option was previously specified in order to restore normal behavior.
2054.TP
2055.BR errors= { continue | remount-ro | panic }
2056Define the behaviour when an error is encountered.
2057(Either ignore errors and just mark the filesystem erroneous and continue,
2058or remount the filesystem read-only, or panic and halt the system.)
2059.TP
2060.BR noquota | quota | usrquota | grpquota
2061These options are accepted but ignored.
2062
2063.SH "Mount options for minix"
2064None.
2065
2066.SH "Mount options for msdos"
2067See mount options for fat.
2068If the
2069.I msdos
2070filesystem detects an inconsistency, it reports an error and sets the file
2071system read-only. The filesystem can be made writable again by remounting
2072it.
2073
2074.SH "Mount options for ncpfs"
2075Just like
2076.IR nfs ", the " ncpfs
2077implementation expects a binary argument (a
2078.IR "struct ncp_mount_data" )
2079to the mount system call. This argument is constructed by
2080.BR ncpmount (8)
2081and the current version of
2082.B mount
2083(2.12) does not know anything about ncpfs.
2084
2085.SH "Mount options for nfs and nfs4"
2086See the options section of the
2087.BR nfs (5)
2088man page (nfs-utils package must be installed).
2089
2090The
2091.IR nfs " and " nfs4
2092implementation expects a binary argument (a
2093.IR "struct nfs_mount_data" )
2094to the mount system call. This argument is constructed by
2095.BR mount.nfs (8)
2096and the current version of
2097.B mount
2098(2.13) does not know anything about nfs and nfs4.
2099
2100.SH "Mount options for ntfs"
2101.TP
2102.BI iocharset= name
2103Character set to use when returning file names.
2104Unlike VFAT, NTFS suppresses names that contain
2105nonconvertible characters. Deprecated.
2106.\" since 2.5.11
2107.TP
2108.BI nls= name
2109New name for the option earlier called
2110.IR iocharset .
2111.\" since 2.5.11
2112.TP
2113.BR utf8
2114Use UTF-8 for converting file names.
2115.TP
2116.BR uni_xlate= { 0 | 1 | 2 }
2117For 0 (or `no' or `false'), do not use escape sequences
2118for unknown Unicode characters.
2119For 1 (or `yes' or `true') or 2, use vfat-style 4-byte escape sequences
2120starting with ":". Here 2 give a little-endian encoding
2121and 1 a byteswapped bigendian encoding.
2122.TP
2123.B posix=[0|1]
2124If enabled (posix=1), the filesystem distinguishes between
2125upper and lower case. The 8.3 alias names are presented as
2126hard links instead of being suppressed. This option is obsolete.
2127.TP
2128\fBuid=\fP\fIvalue\fP, \fBgid=\fP\fIvalue\fP and \fBumask=\fP\fIvalue\fP
2129Set the file permission on the filesystem.
2130The umask value is given in octal.
2131By default, the files are owned by root and not readable by somebody else.
2132
2133.SH "Mount options for proc"
2134.TP
2135\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
2136These options are recognized, but have no effect as far as I can see.
2137
2138.SH "Mount options for ramfs"
2139Ramfs is a memory based filesystem. Mount it and you have it. Unmount it
2140and it is gone. Present since Linux 2.3.99pre4.
2141There are no mount options.
2142
2143.SH "Mount options for reiserfs"
2144Reiserfs is a journaling filesystem.
2145.TP
2146.BR conv
2147Instructs version 3.6 reiserfs software to mount a version 3.5 filesystem,
2148using the 3.6 format for newly created objects. This filesystem will no
2149longer be compatible with reiserfs 3.5 tools.
2150.TP
2151.BR hash= { rupasov | tea | r5 | detect }
2152Choose which hash function reiserfs will use to find files within directories.
2153.RS
2154.TP
2155.B rupasov
2156A hash invented by Yury Yu. Rupasov. It is fast and preserves locality,
2157mapping lexicographically close file names to close hash values.
2158This option should not be used, as it causes a high probability of hash
2159collisions.
2160.TP
2161.B tea
2162A Davis-Meyer function implemented by Jeremy Fitzhardinge.
2163It uses hash permuting bits in the name. It gets high randomness
2164and, therefore, low probability of hash collisions at some CPU cost.
2165This may be used if EHASHCOLLISION errors are experienced with the r5 hash.
2166.TP
2167.B r5
2168A modified version of the rupasov hash. It is used by default and is
2169the best choice unless the filesystem has huge directories and
2170unusual file-name patterns.
2171.TP
2172.B detect
2173Instructs
2174.IR mount
2175to detect which hash function is in use by examining
2176the filesystem being mounted, and to write this information into
2177the reiserfs superblock. This is only useful on the first mount of
2178an old format filesystem.
2179.RE
2180.TP
2181.BR hashed_relocation
2182Tunes the block allocator. This may provide performance improvements
2183in some situations.
2184.TP
2185.BR no_unhashed_relocation
2186Tunes the block allocator. This may provide performance improvements
2187in some situations.
2188.TP
2189.BR noborder
2190Disable the border allocator algorithm invented by Yury Yu. Rupasov.
2191This may provide performance improvements in some situations.
2192.TP
2193.BR nolog
f036b4c7 2194Disable journaling. This will provide slight performance improvements in
60a2a323 2195some situations at the cost of losing reiserfs's fast recovery from crashes.
f036b4c7
MF
2196Even with this option turned on, reiserfs still performs all journaling
2197operations, save for actual writes into its journaling area. Implementation
60a2a323
KZ
2198of
2199.IR nolog
2200is a work in progress.
2201.TP
2202.BR notail
2203By default, reiserfs stores small files and `file tails' directly into its
2204tree. This confuses some utilities such as
2205.BR LILO (8).
2206This option is used to disable packing of files into the tree.
2207.TP
2208.BR replayonly
2209Replay the transactions which are in the journal, but do not actually
2210mount the filesystem. Mainly used by
2211.IR reiserfsck .
2212.TP
2213.BI resize= number
2214A remount option which permits online expansion of reiserfs partitions.
2215Instructs reiserfs to assume that the device has
2216.I number
2217blocks.
2218This option is designed for use with devices which are under logical
2219volume management (LVM).
2220There is a special
2221.I resizer
2222utility which can be obtained from
2223.IR ftp://ftp.namesys.com/pub/reiserfsprogs .
2224.TP
2225.BR user_xattr
2226Enable Extended User Attributes. See the
2227.BR attr (5)
2228manual page.
2229.TP
2230.BR acl
2231Enable POSIX Access Control Lists. See the
2232.BR acl (5)
2233manual page.
2234.TP
2235.BR barrier=none " / " barrier=flush "
2236This enables/disables the use of write barriers in the journaling code.
2237barrier=none disables it, barrier=flush enables it. Write barriers enforce
2238proper on-disk ordering of journal commits, making volatile disk write caches
2239safe to use, at some performance penalty. The reiserfs filesystem does not
2240enable write barriers by default. Be sure to enable barriers unless your disks
2241are battery-backed one way or another. Otherwise you risk filesystem
2242corruption in case of power failure.
2243
2244.SH "Mount options for romfs"
2245None.
2246
2247.SH "Mount options for squashfs"
2248None.
2249
2250.SH "Mount options for smbfs"
2251Just like
2252.IR nfs ", the " smbfs
2253implementation expects a binary argument (a
2254.IR "struct smb_mount_data" )
2255to the mount system call. This argument is constructed by
2256.BR smbmount (8)
2257and the current version of
2258.B mount
2259(2.12) does not know anything about smbfs.
2260
2261.SH "Mount options for sysv"
2262None.
2263
2264.SH "Mount options for tmpfs"
2265.TP
2266.BI size= nbytes
2267Override default maximum size of the filesystem.
2268The size is given in bytes, and rounded up to entire pages.
2269The default is half of the memory. The size parameter also accepts a suffix %
2270to limit this tmpfs instance to that percentage of your physical RAM:
2271the default, when neither size nor nr_blocks is specified, is size=50%
2272.TP
2273.B nr_blocks=
2274The same as size, but in blocks of PAGE_CACHE_SIZE
2275.TP
2276.B nr_inodes=
2277The maximum number of inodes for this instance. The default
2278is half of the number of your physical RAM pages, or (on a
2279machine with highmem) the number of lowmem RAM pages,
2280whichever is the lower.
2281.PP
2282The tmpfs mount options for sizing (
2283.BR size ,
2284.BR nr_blocks ,
2285and
2286.BR nr_inodes )
2287accept a suffix
2288.BR k ,
2289.B m
2290or
2291.B g
2292for Ki, Mi, Gi (binary kilo, mega and giga) and can be changed on remount.
2293
2294.TP
2295.B mode=
2296Set initial permissions of the root directory.
2297.TP
2298.B uid=
2299The user id.
2300.TP
2301.B gid=
2302The group id.
2303.TP
2304.B mpol=[default|prefer:Node|bind:NodeList|interleave|interleave:NodeList]
2305Set the NUMA memory allocation policy for all files in that
2306instance (if the kernel CONFIG_NUMA is enabled) - which can be adjusted on the
2307fly via 'mount -o remount ...'
2308.RS
2309.TP
2310.B default
2311prefers to allocate memory from the local node
2312.TP
2313.B prefer:Node
2314prefers to allocate memory from the given Node
2315.TP
2316.B bind:NodeList
2317allocates memory only from nodes in NodeList
2318.TP
2319.B interleave
2320prefers to allocate from each node in turn
2321.TP
2322.B interleave:NodeList
2323allocates from each node of NodeList in turn.
2324.PP
2325The NodeList format is a comma-separated list of decimal numbers and ranges, a
2326range being two hyphen-separated decimal numbers, the smallest and largest node
2327numbers in the range. For example, mpol=bind:0-3,5,7,9-15
2328
2329Note that trying to mount a tmpfs with an mpol option will fail if the
2330running kernel does not support NUMA; and will fail if its nodelist
2331specifies a node which is not online. If your system relies on that
2332tmpfs being mounted, but from time to time runs a kernel built without
2333NUMA capability (perhaps a safe recovery kernel), or with fewer nodes
2334online, then it is advisable to omit the mpol option from automatic
2335mount options. It can be added later, when the tmpfs is already mounted
2336on MountPoint, by 'mount -o remount,mpol=Policy:NodeList MountPoint'.
2337
2338.SH "Mount options for ubifs"
2339UBIFS is a flash file system which works on top of UBI volumes. Note that
2340.B
2341atime
2342is not supported and is always turned off.
2343.TP
2344The device name may be specified as
2345.RS
2346.B ubiX_Y
2347UBI device number
2348.BR X ,
2349volume number
2350.B Y
2351.TP
2352.B ubiY
2353UBI device number
2354.BR 0 ,
2355volume number
2356.B Y
2357.TP
2358.B ubiX:NAME
2359UBI device number
2360.BR X ,
2361volume with name
2362.B NAME
2363.TP
2364.B ubi:NAME
2365UBI device number
2366.BR 0 ,
2367volume with name
2368.B NAME
2369.RE
2370Alternative
2371.B !
2372separator may be used instead of
2373.BR : .
2374.TP
2375The following mount options are available:
2376.TP
2377.BR bulk_read
2378Enable bulk-read. VFS read-ahead is disabled because it slows down the file
2379system. Bulk-Read is an internal optimization. Some flashes may read faster if
2380the data are read at one go, rather than at several read requests. For
2381example, OneNAND can do "read-while-load" if it reads more than one NAND page.
2382.TP
2383.BR no_bulk_read
2384Do not bulk-read. This is the default.
2385.TP
2386.BR chk_data_crc
2387Check data CRC-32 checksums. This is the default.
2388.TP
2389.BR no_chk_data_crc.
2390Do not check data CRC-32 checksums. With this option, the filesystem does not
2391check CRC-32 checksum for data, but it does check it for the internal indexing
2392information. This option only affects reading, not writing. CRC-32 is always
2393calculated when writing the data.
2394.TP
2395.BR compr= { none | lzo | zlib }
2396Select the default compressor which is used when new files are written. It is
2397still possible to read compressed files if mounted with the
2398.B none
2399option.
2400
2401.SH "Mount options for udf"
2402udf is the "Universal Disk Format" filesystem defined by the Optical
2403Storage Technology Association, and is often used for DVD-ROM.
2404See also
2405.IR iso9660 .
2406.TP
2407.B gid=
2408Set the default group.
2409.TP
2410.B umask=
2411Set the default umask.
2412The value is given in octal.
2413.TP
2414.B uid=
2415Set the default user.
2416.TP
2417.B unhide
2418Show otherwise hidden files.
2419.TP
2420.B undelete
2421Show deleted files in lists.
2422.TP
2423.B nostrict
2424Unset strict conformance.
2425.\" .TP
2426.\" .B utf8
2427.\" (unused).
2428.TP
2429.B iocharset
2430Set the NLS character set.
2431.TP
2432.B bs=
2433Set the block size. (May not work unless 2048.)
2434.TP
2435.B novrs
2436Skip volume sequence recognition.
2437.TP
2438.B session=
2439Set the CDROM session counting from 0. Default: last session.
2440.TP
2441.B anchor=
2442Override standard anchor location. Default: 256.
2443.TP
2444.B volume=
2445Override the VolumeDesc location. (unused)
2446.TP
2447.B partition=
2448Override the PartitionDesc location. (unused)
2449.TP
2450.B lastblock=
2451Set the last block of the filesystem.
2452.TP
2453.B fileset=
2454Override the fileset block location. (unused)
2455.TP
2456.B rootdir=
2457Override the root directory location. (unused)
2458
2459.SH "Mount options for ufs"
2460.TP
2461.BI ufstype= value
2462UFS is a filesystem widely used in different operating systems.
2463The problem are differences among implementations. Features of some
2464implementations are undocumented, so its hard to recognize the
2465type of ufs automatically.
2466That's why the user must specify the type of ufs by mount option.
2467Possible values are:
2468.RS
2469.TP
2470.B old
2471Old format of ufs, this is the default, read only.
2472(Don't forget to give the \-r option.)
2473.TP
2474.B 44bsd
2475For filesystems created by a BSD-like system (NetBSD,FreeBSD,OpenBSD).
2476.TP
2477.B ufs2
2478Used in FreeBSD 5.x supported as read-write.
2479.TP
2480.B 5xbsd
2481Synonym for ufs2.
2482.TP
2483.B sun
2484For filesystems created by SunOS or Solaris on Sparc.
2485.TP
2486.B sunx86
2487For filesystems created by Solaris on x86.
2488.TP
2489.B hp
2490For filesystems created by HP-UX, read-only.
2491.TP
2492.B nextstep
2493For filesystems created by NeXTStep (on NeXT station) (currently read only).
2494.TP
2495.B nextstep-cd
2496For NextStep CDROMs (block_size == 2048), read-only.
2497.TP
2498.B openstep
2499For filesystems created by OpenStep (currently read only).
2500The same filesystem type is also used by Mac OS X.
2501.RE
2502
2503.TP
2504.BI onerror= value
2505Set behaviour on error:
2506.RS
2507.TP
2508.B panic
2509If an error is encountered, cause a kernel panic.
2510.TP
2511.RB [ lock | umount | repair ]
2512These mount options don't do anything at present;
2513when an error is encountered only a console message is printed.
2514.RE
2515
2516.SH "Mount options for umsdos"
2517See mount options for msdos.
2518The
2519.B dotsOK
2520option is explicitly killed by
2521.IR umsdos .
2522
2523.SH "Mount options for vfat"
2524First of all, the mount options for
2525.I fat
2526are recognized.
2527The
2528.B dotsOK
2529option is explicitly killed by
2530.IR vfat .
2531Furthermore, there are
2532.TP
2533.B uni_xlate
2534Translate unhandled Unicode characters to special escaped sequences.
2535This lets you backup and restore filenames that are created with any
2536Unicode characters. Without this option, a '?' is used when no
2537translation is possible. The escape character is ':' because it is
2538otherwise illegal on the vfat filesystem. The escape sequence
2539that gets used, where u is the unicode character,
2540is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
2541.TP
2542.B posix
2543Allow two files with names that only differ in case.
2544This option is obsolete.
2545.TP
2546.B nonumtail
2547First try to make a short name without sequence number,
2548before trying
2549.IR name~num.ext .
2550.TP
2551.B utf8
2552UTF8 is the filesystem safe 8-bit encoding of Unicode that is used by the
2553console. It can be enabled for the filesystem with this option or disabled
2554with utf8=0, utf8=no or utf8=false. If `uni_xlate' gets set, UTF8 gets
2555disabled.
2556.TP
2557.BR shortname= { lower | win95 | winnt | mixed }
2558
2559Defines the behaviour for creation and display of filenames which fit into
25608.3 characters. If a long name for a file exists, it will always be
2561preferred display. There are four modes:
2562:
2563.RS
2564.TP
2565.I lower
2566Force the short name to lower case upon display; store a long name when
2567the short name is not all upper case.
2568.TP
2569.I win95
2570Force the short name to upper case upon display; store a long name when
2571the short name is not all upper case.
2572.TP
2573.I winnt
2574Display the shortname as is; store a long name when the short name is
2575not all lower case or all upper case.
2576.TP
2577.I mixed
2578Display the short name as is; store a long name when the short name is not
2579all upper case. This mode is the default since Linux 2.6.32.
2580.RE
2581
2582
2583.SH "Mount options for usbfs"
2584.TP
2585\fBdevuid=\fP\fIuid\fP and \fBdevgid=\fP\fIgid\fP and \fBdevmode=\fP\fImode\fP
2586Set the owner and group and mode of the device files in the usbfs filesystem
2587(default: uid=gid=0, mode=0644). The mode is given in octal.
2588.TP
2589\fBbusuid=\fP\fIuid\fP and \fBbusgid=\fP\fIgid\fP and \fBbusmode=\fP\fImode\fP
2590Set the owner and group and mode of the bus directories in the usbfs
2591filesystem (default: uid=gid=0, mode=0555). The mode is given in octal.
2592.TP
2593\fBlistuid=\fP\fIuid\fP and \fBlistgid=\fP\fIgid\fP and \fBlistmode=\fP\fImode\fP
2594Set the owner and group and mode of the file
2595.I devices
2596(default: uid=gid=0, mode=0444). The mode is given in octal.
2597
2598.SH "Mount options for xenix"
2599None.
2600
2601.SH "Mount options for xfs"
2602.TP
5d3da4a2 2603.BR allocsize=size
60a2a323
KZ
2604Sets the buffered I/O end-of-file preallocation size when
2605doing delayed allocation writeout (default size is 64KiB).
2606Valid values for this option are page size (typically 4KiB)
2607through to 1GiB, inclusive, in power-of-2 increments.
5d3da4a2
KZ
2608.sp
2609The default behaviour is for dynamic end-of-file
2610preallocation size, which uses a set of heuristics to
2611optimise the preallocation size based on the current
2612allocation patterns within the file and the access patterns
2613to the file. Specifying a fixed allocsize value turns off
2614the dynamic behaviour.
60a2a323
KZ
2615.TP
2616.BR attr2 | noattr2
5d3da4a2
KZ
2617The options enable/disable an "opportunistic" improvement to
2618be made in the way inline extended attributes are stored
2619on-disk. When the new form is used for the first time when
2620attr2 is selected (either when setting or removing extended
2621attributes) the on-disk superblock feature bit field will be
2622updated to reflect this format being in use.
2623.sp
2624The default behaviour is determined by the on-disk feature
2625bit indicating that attr2 behaviour is active. If either
2626mount option it set, then that becomes the new default used
2627by the filesystem.
2628.sp
2629CRC enabled filesystems always use the attr2 format, and so
2630will reject the noattr2 mount option if it is set.
2631.TP
2632.BR barrier | nobarrier
2633Enables/disables the use of block layer write barriers for
2634writes into the journal and for data integrity operations.
2635This allows for drive level write caching to be enabled, for
2636devices that support write barriers.
2637.TP
2638.BR discard | nodiscard
2639Enable/disable the issuing of commands to let the block
2640device reclaim space freed by the filesystem. This is
2641useful for SSD devices, thinly provisioned LUNs and virtual
2642machine images, but may have a performance impact.
2643.sp
2644Note: It is currently recommended that you use the fstrim
2645application to discard unused blocks rather than the discard
2646mount option because the performance impact of this option
2647is quite severe.
2648.TP
2649.BR grpid | bsdgroups | nogrpid | sysvgroups
2650These options define what group ID a newly created file
2651gets. When grpid is set, it takes the group ID of the
2652directory in which it is created; otherwise it takes the
2653fsgid of the current process, unless the directory has the
2654setgid bit set, in which case it takes the gid from the
2655parent directory, and also gets the setgid bit set if it is
2656a directory itself.
2657.TP
2658.BR filestreams
2659Make the data allocator use the filestreams allocation mode
2660across the entire filesystem rather than just on directories
2661configured to use it.
2662.TP
2663.BP ikeep | noikeep
2664When ikeep is specified, XFS does not delete empty inode
2665clusters and keeps them around on disk. When noikeep is
2666specified, empty inode clusters are returned to the free
2667space pool.
2668.TP
2669.BR inode32 | inode64
2670When inode32 is specified, it indicates that XFS limits
2671inode creation to locations which will not result in inode
2672numbers with more than 32 bits of significance.
2673.sp
2674When inode64 is specified, it indicates that XFS is allowed
2675to create inodes at any location in the filesystem,
2676including those which will result in inode numbers occupying
2677more than 32 bits of significance.
2678.sp
2679inode32 is provided for backwards compatibility with older
2680systems and applications, since 64 bits inode numbers might
2681cause problems for some applications that cannot handle
2682large inode numbers. If applications are in use which do
2683not handle inode numbers bigger than 32 bits, the inode32
2684option should be specified.
2685.TP
2686.BR largeio | nolargeio
2687If "nolargeio" is specified, the optimal I/O reported in
2688st_blksize by stat(2) will be as small as possible to allow
2689user applications to avoid inefficient read/modify/write
2690I/O. This is typically the page size of the machine, as
2691this is the granularity of the page cache.
2692.sp
2693If "largeio" specified, a filesystem that was created with a
2694"swidth" specified will return the "swidth" value (in bytes)
2695in st_blksize. If the filesystem does not have a "swidth"
2696specified but does specify an "allocsize" then "allocsize"
2697(in bytes) will be returned instead. Otherwise the behaviour
2698is the same as if "nolargeio" was specified.
2699.TP
2700.BR logbufs=value
2701Set the number of in-memory log buffers. Valid numbers
2702range from 2-8 inclusive.
2703.sp
2704The default value is 8 buffers.
2705.sp
2706If the memory cost of 8 log buffers is too high on small
2707systems, then it may be reduced at some cost to performance
2708on metadata intensive workloads. The logbsize option below
2709controls the size of each buffer and so is also relevent to
2710this case.
2711.TP
2712.BR logbsize=value
2713Set the size of each in-memory log buffer. The size may be
2714specified in bytes, or in kilobytes with a "k" suffix.
2715Valid sizes for version 1 and version 2 logs are 16384 (16k)
2716and 32768 (32k). Valid sizes for version 2 logs also
2717include 65536 (64k), 131072 (128k) and 262144 (256k). The
2718logbsize must be an integer multiple of the log
2719stripe unit configured at mkfs time.
2720.sp
64e6c3bb 2721The default value for version 1 logs is 32768, while the
5d3da4a2 2722default value for version 2 logs is MAX(32768, log_sunit).
60a2a323 2723.TP
5d3da4a2 2724.BR logdev=device and rtdev=device
60a2a323 2725Use an external log (metadata journal) and/or real-time device.
5d3da4a2
KZ
2726An XFS filesystem has up to three parts: a data section, a log
2727section, and a real-time section. The real-time section is
2728optional, and the log section can be separate from the data
2729section or contained within it.
2730.TP
2731.BR noalign
2732Data allocations will not be aligned at stripe unit
2733boundaries. This is only relevant to filesystems created
2734with non-zero data alignment parameters (sunit, swidth) by
2735mkfs.
2736.TP
2737.BR norecovery
60a2a323
KZ
2738The filesystem will be mounted without running log recovery.
2739If the filesystem was not cleanly unmounted, it is likely to
5d3da4a2 2740be inconsistent when mounted in "norecovery" mode.
60a2a323 2741Some files or directories may not be accessible because of this.
5d3da4a2
KZ
2742Filesystems mounted "norecovery" must be mounted read-only or
2743the mount will fail.
2744.TP
2745.BR nouuid
2746Don't check for double mounted file systems using the file
2747system uuid. This is useful to mount LVM snapshot volumes,
2748and often used in combination with "norecovery" for mounting
2749read-only snapshots.
2750.TP
2751.BR noquota
2752Forcibly turns off all quota accounting and enforcement
2753within the filesystem.
60a2a323 2754.TP
5d3da4a2 2755.BR uquota/usrquota/uqnoenforce/quota
60a2a323 2756User disk quota accounting enabled, and limits (optionally)
5d3da4a2 2757enforced. Refer to xfs_quota(8) for further details.
60a2a323 2758.TP
5d3da4a2 2759.BR gquota/grpquota/gqnoenforce
60a2a323 2760Group disk quota accounting enabled and limits (optionally)
5d3da4a2 2761enforced. Refer to xfs_quota(8) for further details.
60a2a323 2762.TP
5d3da4a2 2763.BR pquota/prjquota/pqnoenforce
60a2a323 2764Project disk quota accounting enabled and limits (optionally)
5d3da4a2 2765enforced. Refer to xfs_quota(8) for further details.
60a2a323 2766.TP
5d3da4a2
KZ
2767.BR sunit=value " and " swidth=value
2768Used to specify the stripe unit and width for a RAID device
2769or a stripe volume. "value" must be specified in 512-byte
2770block units. These options are only relevant to filesystems
2771that were created with non-zero data alignment parameters.
2772.sp
2773The sunit and swidth parameters specified must be compatible
2774with the existing filesystem alignment characteristics. In
2775general, that means the only valid changes to sunit are
2776increasing it by a power-of-2 multiple. Valid swidth values
2777are any integer multiple of a valid sunit value.
2778.sp
2779Typically the only time these mount options are necessary if
2780after an underlying RAID device has had it's geometry
2781modified, such as adding a new disk to a RAID5 lun and
2782reshaping it.
2783.TP
2784.BR swalloc
60a2a323
KZ
2785Data allocations will be rounded up to stripe width boundaries
2786when the current end of file is being extended and the file
2787size is larger than the stripe width size.
5d3da4a2
KZ
2788.TP
2789.BR wsync
2790When specified, all filesystem namespace operations are
2791executed synchronously. This ensures that when the namespace
2792operation (create, unlink, etc) completes, the change to the
2793namespace is on stable storage. This is useful in HA setups
2794where failover must not result in clients seeing
2795inconsistent namespace presentation during or after a
2796failover event.
60a2a323
KZ
2797
2798.SH "Mount options for xiafs"
2799None. Although nothing is wrong with xiafs, it is not used much,
2800and is not maintained. Probably one shouldn't use it.
2801Since Linux version 2.1.21 xiafs is no longer part of the kernel source.
2802
2803.SH "THE LOOP DEVICE"
2804One further possible type is a mount via the loop device. For example,
2805the command
2806.RS
2807.sp
2808.B "mount /tmp/disk.img /mnt -t vfat -o loop=/dev/loop"
2809.sp
2810.RE
2811will set up the loop device
2812.I /dev/loop3
2813to correspond to the file
2814.IR /tmp/disk.img ,
2815and then mount this device on
2816.IR /mnt .
2817
2818If no explicit loop device is mentioned
2819(but just an option `\fB\-o loop\fP' is given), then
2820.B mount
2821will try to find some unused loop device and use that, for example
2822.RS
2823.sp
2824.B "mount /tmp/disk.img /mnt -o loop"
2825.sp
2826.RE
2827The mount command
2828.B automatically
2829creates a loop device from a regular file if a filesystem type is
2830not specified or the filesystem is known for libblkid, for example:
2831.RS
2832.sp
2833.B "mount /tmp/disk.img /mnt"
2834.sp
2835.B "mount -t ext3 /tmp/disk.img /mnt"
2836.sp
2837.RE
2838This type of mount knows about four options, namely
5cf05c71 2839.BR loop ", " offset " and " sizelimit " ,
60a2a323
KZ
2840that are really options to
2841.BR \%losetup (8).
2842(These options can be used in addition to those specific
2843to the filesystem type.)
2844
2845Since Linux 2.6.25 is supported auto-destruction of loop devices and
2846then any loop device allocated by
2847.B mount
2848will be freed by
2849.B umount
2850independently on
2851.IR /etc/mtab .
2852
2853You can also free a loop device by hand, using `losetup -d' or `umount -d`.
2854
2855.SH RETURN CODES
2856.B mount
2857has the following return codes (the bits can be ORed):
2858.TP
2859.BR 0
2860success
2861.TP
2862.BR 1
2863incorrect invocation or permissions
2864.TP
2865.BR 2
2866system error (out of memory, cannot fork, no more loop devices)
2867.TP
2868.BR 4
2869internal
2870.B mount
2871bug
2872.TP
2873.BR 8
2874user interrupt
2875.TP
2876.BR 16
2877problems writing or locking /etc/mtab
2878.TP
2879.BR 32
2880mount failure
2881.TP
2882.BR 64
2883some mount succeeded
16b73aae
KZ
2884.RE
2885
2886The command mount -a returns 0 (all success), 32 (all failed) or 64 (some
2887failed, some success).
60a2a323 2888
00963eac 2889.SH "EXTERNAL HELPERS"
60a2a323
KZ
2890The syntax of external mount helpers is:
2891
2892.RS
2893.BI /sbin/mount. <suffix>
2894.I spec dir
2895.RB [ \-sfnv ]
2896.RB [ \-o
2897.IR options ]
2898.RB [ \-t
2899.IR type.subtype ]
2900.RE
2901
2902where the <type> is filesystem type and \-sfnvo options have same meaning like
2903standard mount options. The \-t option is used for filesystems with subtypes
2904support (for example /sbin/mount.fuse -t fuse.sshfs).
2905
00963eac
KZ
2906The command mount does not pass mount options
2907.BR unbindable ,
2908.BR runbindable ,
2909.BR private ,
2910.BR rprivate ,
2911.BR slave ,
2912.BR rslave ,
2913.BR shared ,
2914.BR rshared ,
2915.BR auto ,
2916.BR noauto ,
2917.BR comment ,
2918.BR x-*,
2919.BR loop ,
2920.BR offset
2921and
2922.BR sizelimit
2923to mount.<suffix> helpers. The all others options are
2924used in comma delimited list as argument for the option -o.
2925
60a2a323
KZ
2926.SH FILES
2927.TP 18n
2928.I /etc/fstab
2929filesystem table
2930.TP
60a2a323
KZ
2931.I /etc/mtab
2932table of mounted filesystems
2933.TP
2934.I /etc/mtab~
2935lock file
2936.TP
2937.I /etc/mtab.tmp
2938temporary file
2939.TP
2940.I /etc/filesystems
2941a list of filesystem types to try
2942.SH ENVIRONMENT
2943.IP LIBMOUNT_FSTAB=<path>
2944overrides the default location of the fstab file
2945.IP LIBMOUNT_MTAB=<path>
2946overrides the default location of the mtab file
2947.IP LIBMOUNT_DEBUG=0xffff
2948enables debug output
2949.SH "SEE ALSO"
2950.BR mount (2),
2951.BR umount (2),
2952.BR fstab (5),
2953.BR umount (8),
2954.BR swapon (8),
2955.BR findmnt (8),
2956.BR nfs (5),
2957.BR xfs (5),
2958.BR e2label (8),
2959.BR xfs_admin (8),
2960.BR mountd (8),
2961.BR nfsd (8),
2962.BR mke2fs (8),
2963.BR tune2fs (8),
2964.BR losetup (8)
2965.SH BUGS
2966It is possible for a corrupted filesystem to cause a crash.
2967.PP
2968Some Linux filesystems don't support
2969.B "\-o sync and \-o dirsync"
2970(the ext2, ext3, fat and vfat filesystems
2971.I do
2972support synchronous updates (a la BSD) when mounted with the
2973.B sync
2974option).
2975.PP
2976The
2977.B "\-o remount"
2978may not be able to change mount parameters (all
2979.IR ext2fs -specific
2980parameters, except
2981.BR sb ,
2982are changeable with a remount, for example, but you can't change
2983.B gid
2984or
2985.B umask
2986for the
2987.IR fatfs ).
2988.PP
2989It is possible that files
2990.IR /etc/mtab
2991and
2992.IR /proc/mounts
2993don't match. The first file is based only on the mount command options, but the
2994content of the second file also depends on the kernel and others settings (e.g.
2995remote NFS server. In particular case the mount command may reports unreliable
2996information about a NFS mount point and the /proc/mounts file usually contains
2997more reliable information.)
2998.PP
2999Checking files on NFS filesystem referenced by file descriptors (i.e. the
3000.BR fcntl
3001and
3002.BR ioctl
3003families of functions) may lead to inconsistent result due to the lack of
3004consistency check in kernel even if noac is used.
293714c0
JM
3005.PP
3006The
3007.B loop
3008option with the
3009.B offset
3010or
3011.B sizelimit
3012options used may fail when using older kernels if the
3013.B mount
3014command can't confirm that the size of the block device has been configured
3015as requested. This situation can be worked around by using
3016the
3017.B losetup
3018command manually before calling
3019.B mount
3020with the configured loop device.
60a2a323
KZ
3021.SH HISTORY
3022A
3023.B mount
3024command existed in Version 5 AT&T UNIX.
3025.SH AUTHORS
3026.nf
3027Karel Zak <kzak@redhat.com>
3028.fi
3029.SH AVAILABILITY
3030The mount command is part of the util-linux package and is available from
3031ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
3032