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