]> git.ipfire.org Git - thirdparty/util-linux.git/blame - mount/mount.8
Imported from util-linux-2.11t tarball.
[thirdparty/util-linux.git] / mount / mount.8
CommitLineData
fd6b7a7f 1.\" Copyright (c) 1996 Andries Brouwer
6dbe3af9 2.\"
fd6b7a7f
KZ
3.\" This page is somewhat derived from a page that was
4.\" (c) 1980, 1989, 1991 The Regents of the University of California
5.\" and had been heavily modified by Rik Faith and myself.
6.\" (Probably no BSD text remains.)
7.\" Fragments of text were written by Werner Almesberger, Remy Card,
8.\" Stephen Tweedie and Eric Youngdale.
6dbe3af9 9.\"
fd6b7a7f
KZ
10.\" This is free documentation; you can redistribute it and/or
11.\" modify it under the terms of the GNU General Public License as
12.\" published by the Free Software Foundation; either version 2 of
13.\" the License, or (at your option) any later version.
6dbe3af9 14.\"
fd6b7a7f
KZ
15.\" The GNU General Public License's references to "object code"
16.\" and "executables" are to be interpreted as the output of any
17.\" document formatting or typesetting system, including
18.\" intermediate and printed output.
6dbe3af9 19.\"
fd6b7a7f
KZ
20.\" This manual is distributed in the hope that it will be useful,
21.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
22.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23.\" GNU General Public License for more details.
6dbe3af9 24.\"
fd6b7a7f
KZ
25.\" You should have received a copy of the GNU General Public
26.\" License along with this manual; if not, write to the Free
27.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
28.\" USA.
6dbe3af9 29.\"
2b6fc908 30.\" 960705, aeb: version for mount-2.7g
fd6b7a7f
KZ
31.\" 970114, aeb: xiafs and ext are dead; romfs is new
32.\" 970623, aeb: -F option
2b6fc908 33.\" 970914, reg: -s option
5c36a0eb
KZ
34.\" 981111, K.Garloff: /etc/filesystems
35.\" 990111, aeb: documented /sbin/mount.smbfs
eb63b9b8
KZ
36.\" 990730, Yann Droneaud <lch@multimania.com>: updated page
37.\" 991214, Elrond <Elrond@Wunder-Nett.org>: added some docs on devpts
e8f26419 38.\" 010725, Nikita Danilov <NikitaDanilov@Yahoo.COM>: reiserfs options
612721db 39.\" 011124, Karl Eichwalder <ke@gnu.franken.de>: tmpfs options
fd6b7a7f 40.\"
2b6fc908 41.TH MOUNT 8 "14 September 1997" "Linux 2.0" "Linux Programmer's Manual"
6dbe3af9 42.SH NAME
fd6b7a7f 43mount \- mount a file system
6dbe3af9 44.SH SYNOPSIS
22853e4a 45.BI "mount [\-lhV]"
fd6b7a7f 46.LP
2b6fc908 47.BI "mount \-a [\-fFnrsvw] [\-t " vfstype ]
6dbe3af9 48.br
2b6fc908 49.BI "mount [\-fnrsvw] [\-o " options " [,...]] " "device " | " dir"
6dbe3af9 50.br
2b6fc908 51.BI "mount [\-fnrsvw] [\-t " vfstype "] [\-o " options "] " "device dir"
fd6b7a7f
KZ
52.SH DESCRIPTION
53All files accessible in a Unix system are arranged in one big
54tree, the file hierarchy, rooted at
55.BR / .
56These files can be spread out over several devices. The
57.B mount
58command serves to attach the file system found on some device
59to the big file tree. Conversely, the
60.BR umount (8)
61command will detach it again.
62
63The standard form of the
64.B mount
65command, is
66.RS
67.br
68.BI "mount \-t" " type device dir"
69.RE
70This tells the kernel to attach the file system found on
71.I device
72(which is of type
73.IR type )
74at the directory
75.IR dir .
76The previous contents (if any) and owner and mode of
77.I dir
78become invisible, and as long as this file system remains mounted,
79the pathname
80.I dir
81refers to the root of the file system on
82.IR device .
83
84Three forms of invocation do not actually mount anything:
85.RS
6dbe3af9 86.br
fd6b7a7f
KZ
87.B "mount \-h"
88.RE
89prints a help message;
90.RS
6dbe3af9 91.br
fd6b7a7f
KZ
92.B "mount \-V"
93.RE
94prints a version string; and just
95.RS
22853e4a 96.BI "mount [-l] [-t" " type" ]
fd6b7a7f
KZ
97.RE
98lists all mounted file systems (of type
22853e4a 99.IR type ).
e8f26419 100The option \-l adds the (ext2, ext3 and XFS) labels in this listing.
22853e4a 101See below.
fd6b7a7f 102
66ee8158
KZ
103.\" In fact since 2.3.99. At first the syntax was mount -t bind.
104Since Linux 2.4.0 it is possible to remount part of the
105file hierarchy somewhere else. The call is
106.RS
107.br
108.B "mount --bind olddir newdir"
109.RE
ffc43748
KZ
110After this call the same contents is accessible in two places.
111
112Since Linux 2.5.1 it is possible to atomically move a subtree
113to another place. The call is
114.RS
115.br
116.B "mount --move olddir newdir"
117.RE
66ee8158 118
6dbe3af9 119The
726f69e2
KZ
120.I proc
121file system is not associated with a special device, and when
122mounting it, an arbitrary keyword, such as
123.I proc
fd6b7a7f
KZ
124can be used instead of a device specification.
125(The customary choice
726f69e2 126.I none
fd6b7a7f
KZ
127is less fortunate: the error message `none busy' from
128.B umount
726f69e2 129can be confusing.)
6dbe3af9 130
fd6b7a7f
KZ
131Most devices are indicated by a file name (of a block special device), like
132.IR /dev/sda1 ,
133but there are other possibilities. For example, in the case of an NFS mount,
134.I device
135may look like
136.IR knuth.cwi.nl:/dir .
5c36a0eb
KZ
137It is possible to indicate a block special device using its
138volume label or UUID (see the \-L and \-U options below).
fd6b7a7f
KZ
139
140The file
141.I /etc/fstab
142(see
143.BR fstab (5)),
144may contain lines describing what devices are usually
145mounted where, using which options. This file is used in three ways:
146.LP
147(i) The command
148.RS
149.br
150.BI "mount \-a [-t" " type" ]
151.RE
152(usually given in a bootscript) causes all file systems mentioned in
153.I fstab
154(of the proper type) to be mounted as indicated, except for those
155whose line contains the
156.B noauto
157keyword. Adding the
158.B \-F
159option will make mount fork, so that the
160filesystems are mounted simultaneously.
161.LP
162(ii) When mounting a file system mentioned in
163.IR fstab ,
164it suffices to give only the device, or only the mount point.
165.LP
166(iii) Normally, only the superuser can mount file systems.
167However, when
168.I fstab
169contains the
170.B user
171option on a line, then anybody can mount the corresponding system.
172.LP
173Thus, given a line
174.RS
175.br
176.B "/dev/cdrom /cd iso9660 ro,user,noauto,unhide"
177.RE
178any user can mount the iso9660 file system found on his CDROM
179using the command
180.RS
181.br
182.B "mount /dev/cdrom"
183.RE
184or
185.RS
186.br
187.B "mount /cd"
188.RE
189For more details, see
190.BR fstab (5).
5c36a0eb
KZ
191Only the user that mounted a filesystem can unmount it again.
192If any user should be able to unmount, then use
193.B users
194instead of
195.B user
196in the
197.I fstab
198line.
eb63b9b8
KZ
199The
200.B owner
201option is similar to the
202.B user
203option, with the restriction that the user must be the owner
204of the special file. This may be useful e.g. for
205.I /dev/fd
206if a login script makes the console user owner of this device.
fd6b7a7f
KZ
207
208The programs
209.B mount
210and
211.B umount
212maintain a list of currently mounted file systems in the file
213.IR /etc/mtab .
214If no arguments are given to
6dbe3af9
KZ
215.BR mount ,
216this list is printed.
fd6b7a7f
KZ
217When the
218.I proc
219filesystem is mounted (say at
220.IR /proc ),
221the files
222.I /etc/mtab
223and
224.I /proc/mounts
225have very similar contents. The former has somewhat
226more information, such as the mount options used,
227but is not necessarily up-to-date (cf. the
228.B \-n
229option below). It is possible to replace
230.I /etc/mtab
231by a symbolic link to
232.IR /proc/mounts ,
233but some information is lost that way, and in particular
364cda48 234working with the loop device will be less convenient.
fd6b7a7f
KZ
235
236.SH OPTIONS
237The full set of options used by an invocation of
238.B mount
239is determined by first extracting the
240options for the file system from the
241.I fstab
242table, then applying any options specified by the
243.B \-o
244argument, and finally applying a
245.BR \-r " or " \-w
246option, when present.
6dbe3af9
KZ
247
248Options available for the
249.B mount
250command:
251.TP
fd6b7a7f
KZ
252.B \-V
253Output version.
254.TP
255.B \-h
256Print a help message.
257.TP
258.B \-v
259Verbose mode.
260.TP
261.B \-a
262Mount all filesystems (of the given types) mentioned in
263.IR fstab .
264.TP
265.B \-F
266(Used in conjunction with
267.BR \-a .)
268Fork off a new incarnation of mount for each device.
2b6fc908
KZ
269This will do the mounts on different devices or different NFS servers
270in parallel.
fd6b7a7f
KZ
271This has the advantage that it is faster; also NFS timeouts go in
272parallel. A disadvantage is that the mounts are done in undefined order.
273Thus, you cannot use this option if you want to mount both
274.I /usr
275and
276.IR /usr/spool .
277.TP
6dbe3af9
KZ
278.B \-f
279Causes everything to be done except for the actual system call; if it's not
280obvious, this ``fakes'' mounting the file system. This option is useful in
281conjunction with the
282.B \-v
283flag to determine what the
284.B mount
fd6b7a7f
KZ
285command is trying to do. It can also be used to add entries for devices
286that were mounted earlier with the -n option.
287.TP
22853e4a 288.B \-l
e8f26419
KZ
289Add the ext2, ext3 and XFS labels in the mount output. Mount must have
290permission to read the disk device (e.g. be suid root) for this to work.
291One can set such a label for ext2 or ext3 using the
22853e4a 292.BR e2label (8)
c07ebfa1
KZ
293utility, or for XFS using
294.BR xfs_admin (8).
22853e4a 295.TP
fd6b7a7f
KZ
296.B \-n
297Mount without writing in
298.IR /etc/mtab .
299This is necessary for example when
300.I /etc
301is on a read-only file system.
302.TP
2b6fc908
KZ
303.B \-s
304Tolerate sloppy mount options rather than failing. This will ignore
305mount options not supported by a filesystem type. Not all filesystems
306support this option. This option exists for support of the Linux
307autofs\-based automounter.
308.TP
fd6b7a7f
KZ
309.B \-r
310Mount the file system read-only. A synonym is
311.BR "\-o ro" .
312.TP
313.B \-w
314Mount the file system read/write. This is the default. A synonym is
315.BR "\-o rw" .
316.TP
5c36a0eb
KZ
317.BI \-L " label"
318Mount the partition that has the specified
319.IR label .
320.TP
321.BI \-U " uuid"
322Mount the partition that has the specified
323.IR uuid .
324These two options require the file
325.I /proc/partitions
326(present since Linux 2.1.116) to exist.
327.TP
fd6b7a7f
KZ
328.BI \-t " vfstype"
329The argument following the
330.B \-t
331is used to indicate the file system type. The file system types which are
c07ebfa1 332currently supported are:
5c36a0eb
KZ
333.IR adfs ,
334.IR affs ,
eb63b9b8 335.IR autofs ,
5c36a0eb 336.IR coda ,
eb63b9b8 337.IR coherent ,
c07ebfa1 338.IR cramfs ,
eb63b9b8
KZ
339.IR devpts ,
340.IR efs ,
341.IR ext ,
342.IR ext2 ,
e8f26419 343.IR ext3 ,
5c36a0eb
KZ
344.IR hfs ,
345.IR hpfs ,
eb63b9b8 346.IR iso9660 ,
e8f26419 347.IR jfs ,
eb63b9b8
KZ
348.IR minix ,
349.IR msdos ,
350.IR ncpfs ,
351.IR nfs ,
5c36a0eb 352.IR ntfs ,
eb63b9b8 353.IR proc ,
5c36a0eb 354.IR qnx4 ,
e8f26419 355.IR reiserfs ,
5c36a0eb 356.IR romfs ,
eb63b9b8
KZ
357.IR smbfs ,
358.IR sysv ,
612721db 359.IR tmpfs ,
eb63b9b8 360.IR udf ,
5c36a0eb 361.IR ufs ,
eb63b9b8
KZ
362.IR umsdos ,
363.IR vfat ,
364.IR xenix ,
c07ebfa1 365.IR xfs ,
eb63b9b8
KZ
366.IR xiafs .
367Note that coherent, sysv and xenix are equivalent and that
fd6b7a7f
KZ
368.I xenix
369and
370.I coherent
371will be removed at some point in the future \(em use
372.I sysv
373instead. Since kernel version 2.1.21 the types
374.I ext
375and
376.I xiafs
377do not exist anymore.
378
5c36a0eb
KZ
379For most types all the
380.B mount
381program has to do is issue a simple
382.IR mount (2)
383system call, and no detailed knowledge of the filesystem type is required.
384For a few types however (like nfs, smbfs, ncpfs) ad hoc code is
385necessary. The nfs ad hoc code is built in, but smbfs and ncpfs
386have a separate mount program. In order to make it possible to
387treat all types in a uniform way, mount will execute the program
388.I /sbin/mount.TYPE
66ee8158
KZ
389(if that exists) when called with type
390.IR TYPE .
5c36a0eb
KZ
391Since various versions of the
392.I smbmount
393program have different calling conventions,
394.I /sbin/mount.smb
395may have to be a shell script that sets up the desired call.
396
fd6b7a7f
KZ
397The type
398.I iso9660
399is the default. If no
400.B \-t
401option is given, or if the
402.B auto
403type is specified, the superblock is probed for the filesystem type
612721db
KZ
404.RI ( adfs ,
405.IR bfs ,
406.IR cramfs ,
407.IR ext ,
408.IR ext2 ,
409.IR ext3 ,
410.IR hfs ,
411.IR hpfs ,
412.IR iso9660 ,
413.IR jfs ,
414.IR minix ,
415.IR ntfs ,
416.IR qnx4 ,
417.IR reiserfs ,
418.IR romfs ,
ffc43748 419.IR udf ,
612721db
KZ
420.IR ufs ,
421.IR vxfs ,
422.IR xfs ,
423.IR xiafs
fd6b7a7f 424are supported).
5c36a0eb
KZ
425If this probe fails, mount will try to read the file
426.IR /etc/filesystems ,
427or, if that does not exist,
428.IR /proc/filesystems .
429All of the filesystem types listed there will be tried,
fd6b7a7f 430except for those that are labeled "nodev" (e.g.,
eb63b9b8 431.IR devpts ,
fd6b7a7f
KZ
432.I proc
433and
434.IR nfs ).
ffc43748
KZ
435If
436.I /etc/filesystems
437ends in a line with a single * only, mount will read
438.I /proc/filesystems
439afterwards.
fd6b7a7f 440
ffc43748 441The
fd6b7a7f
KZ
442.B auto
443type may be useful for user-mounted floppies.
5c36a0eb
KZ
444Creating a file
445.I /etc/filesystems
446can be useful to change the probe order (e.g., to try vfat before msdos)
447or if you use a kernel module autoloader.
fd6b7a7f 448Warning: the probing uses a heuristic (the presence of appropriate `magic'),
ffc43748
KZ
449and could recognize the wrong filesystem type, possibly with catastrophic
450consequences. If your data is valuable, don't ask
451.B mount
452to guess.
fd6b7a7f
KZ
453
454More than one type may be specified in a comma separated
455list. The list of file system types can be prefixed with
456.B no
457to specify the file system types on which no action should be taken.
458(This can be meaningful with the
459.B \-a
460option.)
461
462For example, the command:
463.RS
464.RS
465.B "mount \-a \-t nomsdos,ext"
466.RE
467mounts all file systems except those of type
468.I msdos
469and
470.IR ext .
471.RE
6dbe3af9
KZ
472.TP
473.B \-o
474Options are specified with a
475.B \-o
476flag followed by a comma separated string of options.
fd6b7a7f 477Some of these options are only useful when they appear in the
6dbe3af9
KZ
478.I /etc/fstab
479file. The following options apply to any file system that is being
364cda48
KZ
480mounted (but not every file system actually honors them - e.g., the
481.B sync
e8f26419 482option today has effect only for ext2, ext3 and ufs):
6dbe3af9
KZ
483.RS
484.TP
485.B async
486All I/O to the file system should be done asynchronously.
487.TP
fd6b7a7f
KZ
488.B atime
489Update inode access time for each access. This is the default.
490.TP
6dbe3af9
KZ
491.B auto
492Can be mounted with the
493.B \-a
494option.
495.TP
496.B defaults
497Use default options:
498.BR rw ", " suid ", " dev ", " exec ", " auto ", " nouser ", and " async.
499.TP
500.B dev
501Interpret character or block special devices on the file system.
502.TP
503.B exec
504Permit execution of binaries.
505.TP
fd6b7a7f
KZ
506.B noatime
507Do not update inode access times on this file system (e.g, for faster
508access on the news spool to speed up news servers).
509.TP
6dbe3af9
KZ
510.B noauto
511Can only be mounted explicitly (i.e., the
512.B \-a
513option will not cause the file system to be mounted).
514.TP
515.B nodev
516Do not interpret character or block special devices on the file
fd6b7a7f 517system.
6dbe3af9
KZ
518.TP
519.B noexec
520Do not allow execution of any binaries on the mounted file system.
fd6b7a7f 521This option might be useful for a server that has file systems containing
6dbe3af9
KZ
522binaries for architectures other than its own.
523.TP
524.B nosuid
525Do not allow set-user-identifier or set-group-identifier bits to take
5c36a0eb
KZ
526effect. (This seems safe, but is in fact rather unsafe if you have
527suidperl(1) installed.)
6dbe3af9
KZ
528.TP
529.B nouser
530Forbid an ordinary (i.e., non-root) user to mount the file system.
fd6b7a7f 531This is the default.
6dbe3af9
KZ
532.TP
533.B remount
534Attempt to remount an already-mounted file system. This is commonly
535used to change the mount flags for a file system, especially to make a
c07ebfa1 536readonly file system writeable. It does not change device or mount point.
6dbe3af9
KZ
537.TP
538.B ro
539Mount the file system read-only.
540.TP
541.B rw
542Mount the file system read-write.
543.TP
544.B suid
545Allow set-user-identifier or set-group-identifier bits to take
546effect.
547.TP
548.B sync
549All I/O to the file system should be done synchronously.
550.TP
63cccae4
KZ
551.B dirsync
552All directory updates within the file system should be done synchronously.
553This affects the following system calls: creat, link, unlink, symlink,
554mkdir, rmdir, mknod and rename.
555.TP
6dbe3af9 556.B user
e8f26419
KZ
557Allow an ordinary user to mount the file system.
558The name of the mounting user is written to mtab so that he can unmount
559the file system again.
560This option implies the options
6dbe3af9 561.BR noexec ", " nosuid ", and " nodev
fd6b7a7f
KZ
562(unless overridden by subsequent options, as in the option line
563.BR user,exec,dev,suid ).
e8f26419
KZ
564.TP
565.B users
566Allow every user to mount and unmount the file system.
567This option implies the options
568.BR noexec ", " nosuid ", and " nodev
569(unless overridden by subsequent options, as in the option line
570.BR users,exec,dev,suid ).
fd6b7a7f 571.RE
ffc43748
KZ
572.TP
573.B \-\-bind
574Remount a subtree somewhere else (so that its contents are available
575in both places). See above.
576.TP
577.B \-\-move
578Move a subtree to some other place. See above.
fd6b7a7f
KZ
579
580.SH "FILESYSTEM SPECIFIC MOUNT OPTIONS"
581The following options apply only to certain file systems.
582We sort them by file system. They all follow the
583.B \-o
584flag.
c07ebfa1
KZ
585.SH "Mount options for adfs"
586.TP
587\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
588Set the owner and group of the files in the file system (default: uid=gid=0).
589.TP
590\fBownmask=\fP\fIvalue\fP and \fBothmask=\fP\fIvalue\fP
591Set the permission mask for ADFS 'owner' permissions and 'other' permissions,
592respectively (default: 0700 and 0077, respectively).
593See also
594.IR /usr/src/linux/Documentation/filesystems/adfs.txt .
fd6b7a7f 595.SH "Mount options for affs"
6dbe3af9 596.TP
fd6b7a7f
KZ
597\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
598Set the owner and group of the root of the file system (default: uid=gid=0,
599but with option
600.B uid
6dbe3af9 601or
fd6b7a7f
KZ
602.B gid
603without specified value, the uid and gid of the current process are taken).
6dbe3af9 604.TP
fd6b7a7f
KZ
605\fBsetuid=\fP\fIvalue\fP and \fBsetgid=\fP\fIvalue\fP
606Set the owner and group of all files.
607.TP
608.BI mode= value
609Set the mode of all files to
610.IR value " & 0777"
611disregarding the original permissions.
612Add search permission to directories that have read permission.
613The value is given in octal.
614.TP
615.B protect
616Do not allow any changes to the protection bits on the file system.
617.TP
618.B usemp
619Set uid and gid of the root of the file system to the uid and gid
620of the mount point upon the first sync or umount, and then
621clear this option. Strange...
622.TP
623.B verbose
624Print an informational message for each successful mount.
625.TP
626.BI prefix= string
627Prefix used before volume name, when following a link.
628.TP
629.BI volume= string
630Prefix (of length at most 30) used before '/' when following a symbolic link.
631.TP
632.BI reserved= value
633(Default: 2.) Number of unused blocks at the start of the device.
634.TP
635.BI root= value
636Give explicitly the location of the root block.
6dbe3af9 637.TP
fd6b7a7f
KZ
638.BI bs= value
639Give blocksize. Allowed values are 512, 1024, 2048, 4096.
6dbe3af9 640.TP
fd6b7a7f
KZ
641.BR grpquota " / " noquota " / " quota " / " usrquota
642These options are accepted but ignored.
364cda48
KZ
643(However, quota utilities may react to such strings in
644.IR /etc/fstab .)
fd6b7a7f
KZ
645
646.SH "Mount options for coherent"
647None.
648
eb63b9b8
KZ
649.SH "Mount options for devpts"
650The devpts file system is a pseudo file system, traditionally mounted on
651.IR /dev/pts .
652In order to acquire a pseudo terminal, a process opens
653.IR /dev/ptmx ;
654the number of the pseudo terminal is then made available to the process
655and the pseudo terminal slave can be accessed as
656.IR /dev/pts/ <number>.
657.TP
658\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
659This sets the owner or the group of newly created PTYs to
660the specified values. When nothing is specified, they will
661be set to the UID and GID of the creating process.
662For example, if there is a tty group with GID 5, then
663.B gid=5
664will cause newly created PTYs to belong to the tty group.
665.TP
666.BI mode= value
667Set the mode of newly created PTYs to the specified value.
668The default is 0600.
669A value of
670.B mode=620
671and
672.B gid=5
673makes "mesg y" the default on newly created PTYs.
674
fd6b7a7f
KZ
675.SH "Mount options for ext"
676None.
677Note that the `ext' file system is obsolete. Don't use it.
678Since Linux version 2.1.21 extfs is no longer part of the kernel source.
679
680.SH "Mount options for ext2"
681The `ext2' file system is the standard Linux file system.
682Due to a kernel bug, it may be mounted with random mount options
683(fixed in Linux 2.0.4).
684.TP
685.BR bsddf " / " minixdf
686Set the behaviour for the
687.I statfs
688system call. The
689.B minixdf
690behaviour is to return in the
691.I f_blocks
692field the total number of blocks of the file system, while the
693.B bsddf
694behaviour (which is the default) is to subtract the overhead blocks
695used by the ext2 file system and not available for file storage. Thus
6dbe3af9 696.RE
fd6b7a7f
KZ
697.nf
698
699% mount /k -o minixdf; df /k; umount /k
700Filesystem 1024-blocks Used Available Capacity Mounted on
701/dev/sda6 2630655 86954 2412169 3% /k
702% mount /k -o bsddf; df /k; umount /k
703Filesystem 1024-blocks Used Available Capacity Mounted on
704/dev/sda6 2543714 13 2412169 0% /k
705
706.fi
707(Note that this example shows that one can add command line options
708to the options given in
709.IR /etc/fstab .)
710
6dbe3af9 711.TP
fd6b7a7f
KZ
712.BR check " / " check=normal " / " check=strict
713Set checking level. When at least one of these options is set (and
714.B check=normal
715is set by default) the inodes and blocks bitmaps are checked upon mount
22853e4a 716(which can take half a minute or so on a big disk, and is rather useless).
fd6b7a7f
KZ
717With strict checking, block deallocation checks that the block to free
718is in the data zone.
719.TP
720.BR check=none " / " nocheck
22853e4a
KZ
721No checking is done. This is fast. Recent kernels do not have a
722check option anymore - checking with
723.BR e2fsck (8)
724is more meaningful.
fd6b7a7f
KZ
725.TP
726.B debug
727Print debugging info upon each (re)mount.
728.TP
729.BR errors=continue " / " errors=remount-ro " / " errors=panic
730Define the behaviour when an error is encountered.
731(Either ignore errors and just mark the file system erroneous and continue,
732or remount the file system read-only, or panic and halt the system.)
733The default is set in the filesystem superblock, and can be
734changed using
735.BR tune2fs (8).
736.TP
737.BR grpid " or " bsdgroups " / " nogrpid " or " sysvgroups
738These options define what group id a newly created file gets.
739When
740.BR grpid
741is set, it takes the group id of the directory in which it is created;
742otherwise (the default) it takes the fsgid of the current process, unless
743the directory has the setgid bit set, in which case it takes the gid
744from the parent directory, and also gets the setgid bit set
745if it is a directory itself.
746.TP
747\fBresgid=\fP\fIn\fP and \fBresuid=\fP\fIn\fP
748The ext2 file system reserves a certain percentage of the available
749space (by default 5%, see
750.BR mke2fs (8)
751and
752.BR tune2fs (8)).
753These options determine who can use the reserved blocks.
754(Roughly: whoever has the specified uid, or belongs to the specified group.)
755.TP
756.BI sb= n
757Instead of block 1, use block
758.I n
759as superblock. This could be useful when the filesystem has been damaged.
eb63b9b8
KZ
760(Earlier, copies of the superblock would be made every 8192 blocks: in
761block 1, 8193, 16385, ... (and one got hundreds or even thousands
762of copies on a big filesystem). Since version 1.08,
763.B mke2fs
764has a \-s (sparse superblock) option to reduce the number of backup
765superblocks, and since version 1.15 this is the default. Note
766that this may mean that ext2 filesystems created by a recent
767.B mke2fs
768cannot be mounted r/w under Linux 2.0.*.)
e8f26419
KZ
769The block number here uses 1k units. Thus, if you want to use logical
770block 32768 on a filesystem with 4k blocks, use "sb=131072".
fd6b7a7f
KZ
771.TP
772.BR grpquota " / " noquota " / " quota " / " usrquota
773These options are accepted but ignored.
774
e8f26419
KZ
775.TP
776.BR nouid32
777Disables 32-bit UIDs and GIDs. This is for interoperability with older
778kernels which only store and expect 16-bit values.
779
780
781.SH "Mount options for ext3"
782The `ext3' file system is version of the ext2 file system which has been
783enhanced with journalling. It supports the same options as ext2 as
784well as the following additions:
785.\" .TP
786.\" .BR abort
787.\" Mount the file system in abort mode, as if a fatal error has occurred.
788.TP
789.BR journal=update
790Update the ext3 file system's journal to the current format.
791.TP
792.BR journal=inum
793When a journal already exists, this option is ignored. Otherwise, it
794specifies the number of the inode which will represent the ext3 file system's
795journal file; ext3 will create a new journal, overwriting the old contents
796of the file whose inode number is
797.IR inum .
798.TP
799.BR noload
800Do not load the ext3 file system's journal on mounting.
801.TP
802.BR data=journal " / " data=ordered " / " data=writeback
803Specifies the journalling mode for file data. Metadata is always journaled.
804.RS
805.TP
806.B journal
807All data is committed into the journal prior to being written into the
808main file system.
809.TP
810.B ordered
811This is the default mode. All data is forced directly out to the main file
812system prior to its metadata being committed to the journal.
813.TP
814.B writeback
815Data ordering is not preserved - data may be written into the main
816file system after its metadata has been committed to the journal.
817This is rumoured to be the highest-throughput option. It guarantees
818internal file system integrity, however it can allow old data to appear
819in files after a crash and journal recovery.
820
fd6b7a7f
KZ
821.SH "Mount options for fat"
822(Note:
823.I fat
824is not a separate filesystem, but a common part of the
825.IR msdos ,
826.I umsdos
827and
828.I vfat
829filesystems.)
830.TP
eb63b9b8 831.BR blocksize=512 " / " blocksize=1024 " / " blocksize=2048
fd6b7a7f
KZ
832Set blocksize (default 512).
833.TP
834\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
835Set the owner and group of all files. (Default: the uid and gid
836of the current process.)
837.TP
838.BI umask= value
839Set the umask (the bitmask of the permissions that are
840.B not
841present). The default is the umask of the current process.
842The value is given in octal.
843.TP
844.BI check= value
845Three different levels of pickyness can be chosen:
6dbe3af9
KZ
846.RS
847.TP
fd6b7a7f 848.B r[elaxed]
6dbe3af9 849Upper and lower case are accepted and equivalent, long name parts are
fd6b7a7f
KZ
850truncated (e.g.
851.I verylongname.foobar
852becomes
853.IR verylong.foo ),
854leading and embedded spaces are accepted in each name part (name and extension).
6dbe3af9 855.TP
fd6b7a7f 856.B n[ormal]
6dbe3af9
KZ
857Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are
858rejected. This is the default.
859.TP
fd6b7a7f 860.B s[trict]
6dbe3af9
KZ
861Like "normal", but names may not contain long parts and special characters
862that are sometimes used on Linux, but are not accepted by MS-DOS are
863rejected. (+, =, spaces, etc.)
864.RE
865.TP
eb63b9b8
KZ
866.BI codepage= value
867Sets the codepage for converting to shortname characters on FAT
868and VFAT filesystems. By default, codepage 437 is used.
869.TP
fd6b7a7f 870.BR conv=b[inary] " / " conv=t[ext] " / " conv=a[uto]
6dbe3af9 871The
fd6b7a7f 872.I fat
6dbe3af9
KZ
873file system can perform CRLF<-->NL (MS-DOS text format to UNIX text
874format) conversion in the kernel. The following conversion modes are
875available:
876.RS
877.TP
fd6b7a7f 878.B binary
6dbe3af9
KZ
879no translation is performed. This is the default.
880.TP
fd6b7a7f 881.B text
6dbe3af9
KZ
882CRLF<-->NL translation is performed on all files.
883.TP
fd6b7a7f 884.B auto
6dbe3af9
KZ
885CRLF<-->NL translation is performed on all files that don't have a
886"well-known binary" extension. The list of known extensions can be found at
887the beginning of
fd6b7a7f
KZ
888.I fs/fat/misc.c
889(as of 2.0, the list is: exe, com, bin, app, sys, drv, ovl, ovr, obj,
6dbe3af9 890lib, dll, pif, arc, zip, lha, lzh, zoo, tar, z, arj, tz, taz, tzp, tpz,
726f69e2 891gz, tgz, deb, gif, bmp, tif, gl, jpg, pcx, tfm, vf, gf, pk, pxl, dvi).
6dbe3af9
KZ
892.PP
893Programs that do computed lseeks won't like in-kernel text conversion.
726f69e2 894Several people have had their data ruined by this translation. Beware!
6dbe3af9 895
fd6b7a7f
KZ
896For file systems mounted in binary mode, a conversion tool
897(fromdos/todos) is available.
6dbe3af9
KZ
898.RE
899.TP
eb63b9b8
KZ
900.BI cvf_format= module
901Forces the driver to use the CVF (Compressed Volume File) module
902.RI cvf_ module
903instead of auto-detection. If the kernel supports kmod, the
904cvf_format=xxx option also controls on-demand CVF module loading.
905.TP
906.BI cvf_option= option
907Option passed to the CVF module.
908.TP
6dbe3af9 909.B debug
fd6b7a7f 910Turn on the
6dbe3af9
KZ
911.I debug
912flag. A version string and a list of file system parameters will be
913printed (these data are also printed if the parameters appear to be
914inconsistent).
915.TP
eb63b9b8
KZ
916.BR fat=12 " / " fat=16 " / " fat=32
917Specify a 12, 16 or 32 bit fat. This overrides
fd6b7a7f 918the automatic FAT type detection routine. Use with caution!
6dbe3af9 919.TP
eb63b9b8
KZ
920.BI iocharset= value
921Character set to use for converting between 8 bit characters
922and 16 bit Unicode characters. The default is iso8859-1.
923Long filenames are stored on disk in Unicode format.
924.TP
fd6b7a7f
KZ
925.B quiet
926Turn on the
927.I quiet
928flag. Attempts to chown or chmod files do not return errors,
929although they fail. Use with caution!
6dbe3af9 930.TP
fd6b7a7f
KZ
931.B "sys_immutable, showexec, dots, nodots, dotsOK=[yes|no]"
932Various misguided attempts to force Unix or DOS conventions
933onto a FAT file system.
934
935.SH "Mount options for hpfs"
6dbe3af9 936.TP
fd6b7a7f
KZ
937\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
938Set the owner and group of all files. (Default: the uid and gid
939of the current process.)
6dbe3af9 940.TP
fd6b7a7f
KZ
941.BI umask= value
942Set the umask (the bitmask of the permissions that are
943.B not
944present). The default is the umask of the current process.
945The value is given in octal.
946.TP
947.BR case=lower " / " case=asis
948Convert all files names to lower case, or leave them.
949(Default:
950.BR case=lower .)
951.TP
952.BR conv=binary " / " conv=text " / " conv=auto
953For
954.BR conv=text ,
955delete some random CRs (in particular, all followed by NL)
956when reading a file.
957For
958.BR conv=auto ,
959choose more or less at random between
960.BR conv=binary " and " conv=text .
961For
962.BR conv=binary ,
963just read what is in the file. This is the default.
6dbe3af9
KZ
964.TP
965.B nocheck
fd6b7a7f
KZ
966Do not abort mounting when certain consistency checks fail.
967
968.SH "Mount options for iso9660"
ffc43748
KZ
969ISO 9660 is a standard describing a filesystem structure to be used
970on CD-ROMs. (This filesystem type is also seen on some DVDs. See also the
971.I udf
972filesystem.)
973
6dbe3af9 974Normal
fd6b7a7f 975.I iso9660
6dbe3af9
KZ
976filenames appear in a 8.3 format (i.e., DOS-like restrictions on filename
977length), and in addition all characters are in upper case. Also there is
978no field for file ownership, protection, number of links, provision for
979block/character devices, etc.
980
981Rock Ridge is an extension to iso9660 that provides all of these unix like
982features. Basically there are extensions to each directory record that
983supply all of the additional information, and when Rock Ridge is in use,
984the filesystem is indistinguishable from a normal UNIX file system (except
985that it is read-only, of course).
fd6b7a7f 986.TP
6dbe3af9 987.B norock
fd6b7a7f 988Disable the use of Rock Ridge extensions, even if available. Cf.\&
6dbe3af9 989.BR map .
c07ebfa1 990.TP
eb63b9b8
KZ
991.B nojoliet
992Disable the use of Microsoft Joliet extensions, even if available. Cf.\&
993.BR map .
6dbe3af9 994.TP
fd6b7a7f
KZ
995.BR check=r[elaxed] " / " check=s[trict]
996With
997.BR check=relaxed ,
998a filename is first converted to lower case before doing the lookup.
999This is probably only meaningful together with
1000.B norock
6dbe3af9 1001and
fd6b7a7f
KZ
1002.BR map=normal .
1003(Default:
1004.BR check=strict .)
1005.TP
1006\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
1007Give all files in the file system the indicated user or group id,
1008possibly overriding the information found in the Rock Ridge extensions.
1009(Default:
1010.BR uid=0,gid=0 .)
1011.TP
eb63b9b8 1012.BR map=n[ormal] " / " map=o[ff] " / " map=a[corn]
fd6b7a7f
KZ
1013For non-Rock Ridge volumes, normal name translation maps upper
1014to lower case ASCII, drops a trailing `;1', and converts `;' to `.'.
1015With
1016.B map=off
1017no name translation is done. See
1018.BR norock .
1019(Default:
1020.BR map=normal .)
eb63b9b8
KZ
1021.B map=acorn
1022is like
1023.BR map=normal
1024but also apply Acorn extensions if present.
fd6b7a7f
KZ
1025.TP
1026.BI mode= value
1027For non-Rock Ridge volumes, give all files the indicated mode.
1028(Default: read permission for everybody.)
1029Since Linux 2.1.37 one no longer needs to specify the mode in
1030decimal. (Octal is indicated by a leading 0.)
1031.TP
1032.B unhide
1033Also show hidden and associated files.
1034.TP
1035.B block=[512|1024|2048]
1036Set the block size to the indicated value.
1037(Default:
1038.BR block=1024 .)
1039.TP
1040.BR conv=a[uto] " / " conv=b[inary] " / " conv=m[text] " / " conv=t[ext]
1041(Default:
1042.BR conv=binary .)
1043Since Linux 1.3.54 this option has no effect anymore.
1044(And non-binary settings used to be very dangerous,
eb63b9b8 1045possibly leading to silent data corruption.)
6dbe3af9 1046.TP
fd6b7a7f
KZ
1047.B cruft
1048If the high byte of the file length contains other garbage,
1049set this mount option to ignore the high order bits of the file length.
1050This implies that a file cannot be larger than 16MB.
1051The `cruft' option is set automatically if the entire CDROM
1052has a weird size (negative, or more than 800MB). It is also
1053set when volume sequence numbers other than 0 or 1 are seen.
eb63b9b8
KZ
1054.TP
1055.B session=x
1056Select number of session on multisession CD. (Since 2.3.4.)
1057.TP
1058.B sbsector=xxx
1059Session begins from sector xxx. (Since 2.3.4.)
fd6b7a7f
KZ
1060
1061.SH "Mount options for minix"
1062None.
6dbe3af9 1063
fd6b7a7f
KZ
1064.SH "Mount options for msdos"
1065See mount options for fat.
6dbe3af9
KZ
1066If the
1067.I msdos
1068file system detects an inconsistency, it reports an error and sets the file
1069system read-only. The file system can be made writeable again by remounting
1070it.
6dbe3af9 1071
fd6b7a7f
KZ
1072.SH "Mount options for ncp"
1073Just like
1074.IR nfs ", the " ncp
1075implementation expects a binary argument (a
1076.IR "struct ncp_mount_data" )
1077to the mount system call. This argument is constructed by
1078.BR ncpmount (8)
1079and the current version of
6dbe3af9 1080.B mount
fd6b7a7f 1081(2.6h) does not know anything about ncp.
6dbe3af9 1082
fd6b7a7f
KZ
1083.SH "Mount options for nfs"
1084Instead of a textual option string, parsed by the kernel, the
1085.I nfs
1086file system expects a binary argument of type
1087.IR "struct nfs_mount_data" .
1088The program
1089.B mount
1090itself parses the following options of the form `tag=value',
1091and puts them in the structure mentioned:
1092.BI rsize= n,
1093.BI wsize= n,
1094.BI timeo= n,
1095.BI retrans= n,
1096.BI acregmin= n,
1097.BI acregmax= n,
1098.BI acdirmin= n,
1099.BI acdirmax= n,
1100.BI actimeo= n,
1101.BI retry= n,
1102.BI port= n,
1103.BI mountport= n,
1104.BI mounthost= name,
1105.BI mountprog= n,
1106.BI mountvers= n,
1107.BI nfsprog= n,
1108.BI nfsvers= n,
1109.BI namlen= n.
1110The option
1111.BI addr= n
1112is accepted but ignored.
1113Also the following Boolean options, possibly preceded by
1114.B no
1115are recognized:
1116.BR bg ,
1117.BR fg ,
1118.BR soft ,
1119.BR hard ,
1120.BR intr ,
1121.BR posix ,
1122.BR cto ,
1123.BR ac ,
1124.BR tcp ,
1125.BR udp ,
1126.BR lock .
1127For details, see
1128.BR nfs (5).
6dbe3af9 1129
fd6b7a7f 1130Especially useful options include
6dbe3af9 1131.TP
fd6b7a7f 1132.B rsize=8192,wsize=8192
63cccae4
KZ
1133This will make your nfs connection faster than with the default
1134buffer size of 4096. (NFSv2 does not work with larger values of
22853e4a
KZ
1135.B rsize
1136and
1137.BR wsize .)
6dbe3af9 1138.TP
fd6b7a7f
KZ
1139.B hard
1140The program accessing a file on a NFS mounted file system will hang
1141when the server crashes. The process cannot be interrupted or
1142killed unless you also specify
1143.BR intr .
1144When the NFS server is back online the program will continue undisturbed
1145from where it was. This is probably what you want.
6dbe3af9 1146.TP
fd6b7a7f
KZ
1147.B soft
1148This option allows the kernel to time out if the nfs server is not
1149responding for some time. The time can be
1150specified with
1151.BR timeo=time .
1152This option might be useful if your nfs server sometimes doesn't respond
1153or will be rebooted while some process tries to get a file from the server.
1154Usually it just causes lots of trouble.
6dbe3af9 1155.TP
fd6b7a7f
KZ
1156.B nolock
1157Do not use locking. Do not start lockd.
1158
eb63b9b8
KZ
1159.SH "Mount options for ntfs"
1160.TP
1161.BI iocharset= name
1162Character set to use when returning file names.
1163Unlike VFAT, NTFS suppresses names that contain
1164unconvertible characters.
1165.TP
1166.BR utf8
1167Use UTF-8 for converting file names.
1168.TP
1169.B uni_xlate=[0|1|2]
e8f26419
KZ
1170For 0 (or `no' or `false'), do not use escape sequences
1171for unknown Unicode characters.
1172For 1 (or `yes' or `true') or 2, use vfat-style 4-byte escape sequences
1173starting with ":". Here 2 give a little-endian encoding
1174and 1 a byteswapped bigendian encoding.
eb63b9b8
KZ
1175.TP
1176.B posix=[0|1]
1177If enabled (posix=1), the file system distinguishes between
1178upper and lower case. The 8.3 alias names are presented as
1179hard links instead of being suppressed.
1180.TP
1181\fBuid=\fP\fIvalue\fP, \fBgid=\fP\fIvalue\fP and \fBumask=\fP\fIvalue\fP
1182Set the file permission on the filesystem.
63cccae4 1183The umask value is given in octal.
eb63b9b8
KZ
1184By default, the files are owned by root and not readable by somebody else.
1185
fd6b7a7f 1186.SH "Mount options for proc"
6dbe3af9 1187.TP
fd6b7a7f
KZ
1188\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
1189These options are recognized, but have no effect as far as I can see.
1190
e8f26419 1191.SH "Mount options for reiserfs"
ffc43748 1192Reiserfs is a journaling filesystem.
e8f26419
KZ
1193The reiserfs mount options are more fully described at
1194.IR http://www.namesys.com/mount-options.html .
1195.TP
1196.BR conv
1197Instructs version 3.6 reiserfs software to mount a version 3.5 file system,
1198using the 3.6 format for newly created objects. This file system will no
1199longer be compatible with reiserfs 3.5 tools.
1200.TP
1201.BR hash=rupasov " / " hash=tea " / " hash=r5 " / " hash=detect
1202Choose which hash function reiserfs will use to find files within directories.
1203.RS
1204.TP
1205.B rupasov
1206A hash invented by Yury Yu. Rupasov. It is fast and preserves locality,
1207mapping lexicographically close file names to close hash values.
1208This option should not be used, as it causes a high probability of hash
1209collisions.
1210.TP
1211.B tea
1212A Davis-Meyer function implemented by Jeremy Fitzhardinge.
1213It uses hash permuting bits in the name. It gets high randomness
1214and, therefore, low probability of hash collisions at come CPU cost.
1215This may be used if EHASHCOLLISION errors are experienced with the r5 hash.
1216.TP
1217.B r5
1218A modified version of the rupasov hash. It is used by default and is
1219the best choice unless the file system has huge directories and
1220unusual file-name patterns.
1221.TP
1222.B detect
1223Instructs
1224.IR mount
1225to detect which hash function is in use by examining
1226the file system being mounted, and to write this information into
1227the reiserfs superblock. This is only useful on the first mount of
1228an old format file system.
1229.RE
1230.TP
1231.BR hashed_relocation
1232Tunes the block allocator. This may provide performance improvements
1233in some situations.
1234.TP
1235.BR no_unhashed_relocation
1236Tunes the block allocator. This may provide performance improvements
1237in some situations.
1238.TP
1239.BR noborder
1240Disable the border allocator algorithm invented by Yury Yu. Rupasov.
1241This may provide performance improvements in some situations.
1242.TP
1243.BR nolog
1244Disable journalling. This will provide slight performance improvements in
1245some situations at the cost of losing reiserfs's fast recovery from crashes.
1246Even with this option turned on, reiserfs still performs all journalling
1247operations, save for actual writes into its journalling area. Implementation
1248of
1249.IR nolog
1250is a work in progress.
1251.TP
1252.BR notail
1253By default, reiserfs stores small files and `file tails' directly into its
1254tree. This confuses some utilities such as
1255.BR LILO (8) .
1256This option is used to disable packing of files into the tree.
1257.TP
1258.BR replayonly
1259Replay the transactions which are in the journal, but do not actually
1260mount the file system. Mainly used by
1261.IR reiserfsck .
1262.TP
1263.BI resize= number
1264A remount option which permits online expansion of reiserfs partitions.
1265Instructs reiserfs to assume that the device has
1266.I number
1267blocks.
1268This option is designed for use with devices which are under logical
1269volume management (LVM).
1270There is a special
1271.I resizer
1272utility which can be obtained from
1273.IR ftp://ftp.namesys.com/pub/reiserfsprogs .
1274
fd6b7a7f
KZ
1275.SH "Mount options for romfs"
1276None.
1277
1278.SH "Mount options for smbfs"
1279Just like
1280.IR nfs ", the " smb
1281implementation expects a binary argument (a
1282.IR "struct smb_mount_data" )
1283to the mount system call. This argument is constructed by
1284.BR smbmount (8)
1285and the current version of
6dbe3af9 1286.B mount
eb63b9b8 1287(2.9w) does not know anything about smb.
fd6b7a7f
KZ
1288
1289.SH "Mount options for sysv"
1290None.
1291
612721db
KZ
1292.SH "Mount options for tmpfs"
1293The following parameters accept a suffix
1294.BR k ,
1295.B m
1296or
1297.B g
1298for Ki, Mi, Gi (binary kilo, mega and giga) and can be changed on remount.
1299.TP
1300.BI size= nbytes
1301Override default size of the filesystem.
1302The size is given in bytes, and rounded down to entire pages.
1303The default is half of the memory.
1304.TP
1305.B nr_blocks=
1306Set number of blocks.
1307.TP
1308.B nr_inodes=
1309Set number of inodes.
1310.TP
1311.B mode=
1312Set initial permissions of the root directory.
1313
eb63b9b8 1314.SH "Mount options for udf"
ffc43748
KZ
1315udf is the "Universal Disk Format" filesystem defined by the Optical
1316Storage Technology Association, and is often used for DVD-ROM.
1317See also
1318.IR iso9660 .
eb63b9b8
KZ
1319.TP
1320.B gid=
1321Set the default group.
1322.TP
1323.B umask=
1324Set the default umask.
63cccae4 1325The value is given in octal.
eb63b9b8
KZ
1326.TP
1327.B uid=
1328Set the default user.
1329.TP
1330.B unhide
1331Show otherwise hidden files.
1332.TP
1333.B undelete
1334Show deleted files in lists.
1335.TP
1336.B strict
1337Set strict conformance (unused).
1338.TP
1339.B utf8
1340(unused).
1341.TP
1342.B iocharset
1343(unused).
1344.TP
1345.B bs=
1346Set the block size. (May not work unless 2048.)
1347.TP
1348.B novrs
1349Skip volume sequence recognition.
1350.TP
1351.B session=
1352Set the CDROM session counting from 0. Default: last session.
1353.TP
1354.B anchor=
1355Override standard anchor location. Default: 256.
1356.TP
1357.B volume=
1358Override the VolumeDesc location. (unused)
1359.TP
1360.B partition=
1361Override the PartitionDesc location. (unused)
1362.TP
1363.B lastblock=
1364Set the last block of the filesystem.
1365.TP
1366.B fileset=
1367Override the fileset block location. (unused)
1368.TP
1369.B rootdir=
1370Override the root directory location. (unused)
1371
fd6b7a7f 1372.SH "Mount options for ufs"
eb63b9b8
KZ
1373.TP
1374.BI ufstype= value
1375UFS is a file system widely used in different operating systems.
1376The problem are differences among implementations. Features of some
1377implementations are undocumented, so its hard to recognize the
1378type of ufs automatically.
364cda48 1379That's why the user must specify the type of ufs by mount option.
eb63b9b8
KZ
1380Possible values are:
1381.RS
1382.TP
1383.B old
1384Old format of ufs, this is the default, read only.
1d4ad1de 1385(Don't forget to give the \-r option.)
eb63b9b8
KZ
1386.TP
1387.B 44bsd
1388For filesystems created by a BSD-like system (NetBSD,FreeBSD,OpenBSD).
1389.TP
1390.B sun
1391For filesystems created by SunOS or Solaris on Sparc.
1392.TP
1393.B sunx86
1394For filesystems created by Solaris on x86.
1395.TP
1396.B nextstep
1397For filesystems created by NeXTStep (on NeXT station) (currently read only).
1398.TP
1399.B nextstep-cd
1400For NextStep CDROMs (block_size == 2048), read-only.
1401.TP
1402.B openstep
1403For filesystems created by OpenStep (currently read only).
ffc43748 1404The same filesystem type is also used by Mac OS X.
eb63b9b8
KZ
1405.RE
1406
1407.TP
1408.BI onerror= value
1409Set behaviour on error:
1410.RS
1411.TP
1412.B panic
1413If an error is encountered, cause a kernel panic.
1414.TP
1415.B [lock|umount|repair]
1416These mount options don't do anything at present;
1417when an error is encountered only a console message is printed.
1418.RE
fd6b7a7f
KZ
1419
1420.SH "Mount options for umsdos"
1421See mount options for msdos.
1422The
1423.B dotsOK
1424option is explicitly killed by
1425.IR umsdos .
1426
1427.SH "Mount options for vfat"
1428First of all, the mount options for
1429.I fat
1430are recognized.
1431The
1432.B dotsOK
1433option is explicitly killed by
1434.IR vfat .
1435Furthermore, there are
1436.TP
1437.B uni_xlate
1438Translate unhandled Unicode characters to special escaped sequences.
1439This lets you backup and restore filenames that are created with any
1440Unicode characters. Without this option, a '?' is used when no
1441translation is possible. The escape character is ':' because it is
1442otherwise illegal on the vfat filesystem. The escape sequence
1443that gets used, where u is the unicode character,
1444is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
1445.TP
1446.B posix
1447Allow two files with names that only differ in case.
1448.TP
1449.B nonumtail
1450First try to make a short name without sequence number,
1451before trying
1452.IR name~num.ext .
eb63b9b8
KZ
1453.TP
1454.B utf8
1455UTF8 is the filesystem safe 8-bit encoding of Unicode that is used
1456by the console. It can be be enabled for the filesystem with this option.
1457If `uni_xlate' gets set, UTF8 gets disabled.
ffc43748
KZ
1458.TP
1459.B shortname=[lower|win95|winnt|mixed]
1460Option (available since 2.4.13) that sets how short filenames are to be
1461created and displayed.
1462.nf
1463 lower = display lower, create win95 filenames
1464 win95 = display win95, create win95 filenames
1465 winnt = display winnt, create winnt filenames
1466 mixed = display winnt, create win95 filenames
1467.fi
1468Default is "lower".
fd6b7a7f
KZ
1469
1470.SH "Mount options for xenix"
1471None.
1472
c07ebfa1
KZ
1473.SH "Mount options for xfs"
1474.TP
1475.BI biosize= size
1476Sets the preferred buffered I/O size (default size is 64K).
1477.I size
1478must be expressed as the logarithm (base2) of the desired I/O size.
1479Valid values for this option are 14 through 16, inclusive
1480(i.e. 16K, 32K, and 64K bytes).
1481On machines with a 4K pagesize, 13 (8K bytes) is also a valid
1482.IR size .
1483The preferred buffered I/O size can also be altered on an individual
1484file basis using the
1485.BR ioctl (2)
1486system call.
1487.TP
1488.B dmapi " / " xdsm
1489Enable the DMAPI (Data Management API) event callouts.
1490.TP
1491.BI logbufs= value
1492Set the number of in-memory log buffers.
1493Valid numbers range from 2-8 inclusive.
1494The default value is 8 buffers for filesystems with a blocksize of 64K,
14954 buffers for filesystems with a blocksize of 32K,
14963 buffers for filesystems with a blocksize of 16K,
1497and 2 buffers for all other configurations.
1498Increasing the number of buffers may increase performance on
1499some workloads at the cost of the memory used for the
1500additional log buffers and their associated control structures.
1501.TP
1502.BI logbsize= value
1503Set the size of each in-memory log buffer.
1504Valid sizes are 16384 (16K) and 32768 (32K).
1505The default value for machines with more than 32MB of memory is 32768,
1506machines with less memory use 16384 by default.
1507.TP
1508\fBlogdev=\fP\fIdevice\fP and \fBrtdev=\fP\fIdevice\fP
1509Use an external log (metadata journal) and/or real-time device.
1510An XFS filesystem has up to three parts: a data section, a log section,
1511and a real-time section.
1512The real-time section is optional, and the log section can be separate
1513from the data section or contained within it.
1514Refer to
1515.BR xfs (5).
1516.TP
1517.B noalign
1518Data allocations will not be aligned at stripe unit boundaries.
1519.TP
1520.B noatime
1521Access timestamps are not updated when a file is read.
1522.TP
1523.B norecovery
1524The filesystem will be mounted without running log recovery.
1525If the filesystem was not cleanly unmounted, it is likely to
1526be inconsistent when mounted in
1527.B norecovery
1528mode.
1529Some files or directories may not be accessible because of this.
1530Filesystems mounted
1531.B norecovery
1532must be mounted read-only or the mount will fail.
1533.TP
1534.B osyncisdsync
1535Make writes to files opened with the O_SYNC flag set behave
1536as if the O_DSYNC flag had been used instead.
1537This can result in better performance without compromising
1538data safety.
1539However if this option is in effect, timestamp updates from
1540O_SYNC writes can be lost if the system crashes.
1541.TP
1542.BR quota " / " usrquota " / " uqnoenforce
1543User disk quota accounting enabled, and limits (optionally) enforced.
1544.TP
1545.BR grpquota " / " gqnoenforce
1546Group disk quota accounting enabled and limits (optionally) enforced.
1547.TP
1548\fBsunit=\fP\fIvalue\fP and \fBswidth=\fP\fIvalue\fP
1549Used to specify the stripe unit and width for a RAID device or a stripe
1550volume.
1551.I value
1552must be specified in 512-byte block units.
1553If this option is not specified and the filesystem was made on a stripe
1554volume or the stripe width or unit were specified for the RAID device at
1555mkfs time, then the mount system call will restore the value from the
1556superblock.
1557For filesystems that are made directly on RAID devices, these options can be
1558used to override the information in the superblock if the underlying disk
1559layout changes after the filesystem has been created.
1560The
1561.B swidth
1562option is required if the
1563.B sunit
1564option has been specified,
1565and must be a multiple of the
1566.B sunit
1567value.
1568
fd6b7a7f
KZ
1569.SH "Mount options for xiafs"
1570None. Although nothing is wrong with xiafs, it is not used much,
1571and is not maintained. Probably one shouldn't use it.
1572Since Linux version 2.1.21 xiafs is no longer part of the kernel source.
1573
1574.SH "THE LOOP DEVICE"
1575One further possible type is a mount via the loop device. For example,
1576the command
1577
1578.nf
1579.B " mount /tmp/fdimage /mnt -t msdos -o loop=/dev/loop3,blocksize=1024"
1580.fi
1581
1582will set up the loop device
1583.I /dev/loop3
1584to correspond to the file
1585.IR /tmp/fdimage ,
1586and then mount this device on
1587.IR /mnt .
1588This type of mount knows about three options, namely
1589.BR loop ", " offset " and " encryption ,
1590that are really options to
1591.BR losetup (8).
1592If no explicit loop device is mentioned
1593(but just an option `\fB\-o loop\fP' is given), then
1594.B mount
1595will try to find some unused loop device and use that.
7eda085c
KZ
1596If you are not so unwise as to make
1597.I /etc/mtab
1598a symbolic link to
1599.I /proc/mounts
1600then any loop device allocated by
1601.B mount
1602will be freed by
1603.BR umount .
1604You can also free a loop device by hand, using `losetup -d', see
1605.BR losetup (8).
6dbe3af9 1606
ffc43748
KZ
1607.SH RETURN CODES
1608.B mount
1609has the following return codes (the bits can be ORed):
1610.TP
1611.BR 0
1612success
1613.TP
1614.BR 1
1615incorrect invocation or permissions
1616.TP
1617.BR 2
1618system error (out of memory, cannot fork, no more loop devices)
1619.TP
1620.BR 4
1621internal
1622.B mount
1623bug or missing
1624.BR nfs
1625support in
1626.B mount
1627.TP
1628.BR 8
1629user interrupt
1630.TP
1631.BR 16
1632problems writing or locking /etc/mtab
1633.TP
1634.BR 32
1635mount failure
1636.TP
1637.BR 64
1638some mount succeeded
1639
6dbe3af9
KZ
1640.SH FILES
1641.I /etc/fstab
1642file system table
1643.br
fd6b7a7f
KZ
1644.I /etc/mtab
1645table of mounted file systems
1646.br
6dbe3af9
KZ
1647.I /etc/mtab~
1648lock file
1649.br
1650.I /etc/mtab.tmp
1651temporary file
1652.SH "SEE ALSO"
fd6b7a7f
KZ
1653.BR mount (2),
1654.BR umount (2),
1655.BR fstab (5),
1656.BR umount (8),
1657.BR swapon (8),
1658.BR nfs (5),
c07ebfa1 1659.BR xfs (5),
22853e4a 1660.BR e2label (8),
c07ebfa1 1661.BR xfs_admin (8),
fd6b7a7f
KZ
1662.BR mountd (8),
1663.BR nfsd (8),
1664.BR mke2fs (8),
1665.BR tune2fs (8),
1666.BR losetup (8)
6dbe3af9
KZ
1667.SH BUGS
1668It is possible for a corrupted file system to cause a crash.
1669.PP
1670Some Linux file systems don't support
63cccae4 1671.B "\-o sync and \-o dirsync"
e8f26419
KZ
1672(the ext2 and ext3 file systems
1673.I do
6dbe3af9
KZ
1674support synchronous updates (a la BSD) when mounted with the
1675.B sync
1676option).
1677.PP
1678The
fd6b7a7f 1679.B "\-o remount"
6dbe3af9 1680may not be able to change mount parameters (all
fd6b7a7f 1681.IR ext2fs -specific
6dbe3af9
KZ
1682parameters, except
1683.BR sb ,
1684are changeable with a remount, for example, but you can't change
1685.B gid
1686or
1687.B umask
1688for the
fd6b7a7f 1689.IR fatfs ).
6dbe3af9
KZ
1690.SH HISTORY
1691A
1692.B mount
5c36a0eb 1693command existed in Version 5 AT&T UNIX.