]> git.ipfire.org Git - thirdparty/util-linux.git/blame - mount/mount.8
Imported from util-linux-2.11o 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
551.B user
e8f26419
KZ
552Allow an ordinary user to mount the file system.
553The name of the mounting user is written to mtab so that he can unmount
554the file system again.
555This option implies the options
6dbe3af9 556.BR noexec ", " nosuid ", and " nodev
fd6b7a7f
KZ
557(unless overridden by subsequent options, as in the option line
558.BR user,exec,dev,suid ).
e8f26419
KZ
559.TP
560.B users
561Allow every user to mount and unmount the file system.
562This option implies the options
563.BR noexec ", " nosuid ", and " nodev
564(unless overridden by subsequent options, as in the option line
565.BR users,exec,dev,suid ).
fd6b7a7f 566.RE
ffc43748
KZ
567.TP
568.B \-\-bind
569Remount a subtree somewhere else (so that its contents are available
570in both places). See above.
571.TP
572.B \-\-move
573Move a subtree to some other place. See above.
fd6b7a7f
KZ
574
575.SH "FILESYSTEM SPECIFIC MOUNT OPTIONS"
576The following options apply only to certain file systems.
577We sort them by file system. They all follow the
578.B \-o
579flag.
c07ebfa1
KZ
580.SH "Mount options for adfs"
581.TP
582\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
583Set the owner and group of the files in the file system (default: uid=gid=0).
584.TP
585\fBownmask=\fP\fIvalue\fP and \fBothmask=\fP\fIvalue\fP
586Set the permission mask for ADFS 'owner' permissions and 'other' permissions,
587respectively (default: 0700 and 0077, respectively).
588See also
589.IR /usr/src/linux/Documentation/filesystems/adfs.txt .
fd6b7a7f 590.SH "Mount options for affs"
6dbe3af9 591.TP
fd6b7a7f
KZ
592\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
593Set the owner and group of the root of the file system (default: uid=gid=0,
594but with option
595.B uid
6dbe3af9 596or
fd6b7a7f
KZ
597.B gid
598without specified value, the uid and gid of the current process are taken).
6dbe3af9 599.TP
fd6b7a7f
KZ
600\fBsetuid=\fP\fIvalue\fP and \fBsetgid=\fP\fIvalue\fP
601Set the owner and group of all files.
602.TP
603.BI mode= value
604Set the mode of all files to
605.IR value " & 0777"
606disregarding the original permissions.
607Add search permission to directories that have read permission.
608The value is given in octal.
609.TP
610.B protect
611Do not allow any changes to the protection bits on the file system.
612.TP
613.B usemp
614Set uid and gid of the root of the file system to the uid and gid
615of the mount point upon the first sync or umount, and then
616clear this option. Strange...
617.TP
618.B verbose
619Print an informational message for each successful mount.
620.TP
621.BI prefix= string
622Prefix used before volume name, when following a link.
623.TP
624.BI volume= string
625Prefix (of length at most 30) used before '/' when following a symbolic link.
626.TP
627.BI reserved= value
628(Default: 2.) Number of unused blocks at the start of the device.
629.TP
630.BI root= value
631Give explicitly the location of the root block.
6dbe3af9 632.TP
fd6b7a7f
KZ
633.BI bs= value
634Give blocksize. Allowed values are 512, 1024, 2048, 4096.
6dbe3af9 635.TP
fd6b7a7f
KZ
636.BR grpquota " / " noquota " / " quota " / " usrquota
637These options are accepted but ignored.
364cda48
KZ
638(However, quota utilities may react to such strings in
639.IR /etc/fstab .)
fd6b7a7f
KZ
640
641.SH "Mount options for coherent"
642None.
643
eb63b9b8
KZ
644.SH "Mount options for devpts"
645The devpts file system is a pseudo file system, traditionally mounted on
646.IR /dev/pts .
647In order to acquire a pseudo terminal, a process opens
648.IR /dev/ptmx ;
649the number of the pseudo terminal is then made available to the process
650and the pseudo terminal slave can be accessed as
651.IR /dev/pts/ <number>.
652.TP
653\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
654This sets the owner or the group of newly created PTYs to
655the specified values. When nothing is specified, they will
656be set to the UID and GID of the creating process.
657For example, if there is a tty group with GID 5, then
658.B gid=5
659will cause newly created PTYs to belong to the tty group.
660.TP
661.BI mode= value
662Set the mode of newly created PTYs to the specified value.
663The default is 0600.
664A value of
665.B mode=620
666and
667.B gid=5
668makes "mesg y" the default on newly created PTYs.
669
fd6b7a7f
KZ
670.SH "Mount options for ext"
671None.
672Note that the `ext' file system is obsolete. Don't use it.
673Since Linux version 2.1.21 extfs is no longer part of the kernel source.
674
675.SH "Mount options for ext2"
676The `ext2' file system is the standard Linux file system.
677Due to a kernel bug, it may be mounted with random mount options
678(fixed in Linux 2.0.4).
679.TP
680.BR bsddf " / " minixdf
681Set the behaviour for the
682.I statfs
683system call. The
684.B minixdf
685behaviour is to return in the
686.I f_blocks
687field the total number of blocks of the file system, while the
688.B bsddf
689behaviour (which is the default) is to subtract the overhead blocks
690used by the ext2 file system and not available for file storage. Thus
6dbe3af9 691.RE
fd6b7a7f
KZ
692.nf
693
694% mount /k -o minixdf; df /k; umount /k
695Filesystem 1024-blocks Used Available Capacity Mounted on
696/dev/sda6 2630655 86954 2412169 3% /k
697% mount /k -o bsddf; df /k; umount /k
698Filesystem 1024-blocks Used Available Capacity Mounted on
699/dev/sda6 2543714 13 2412169 0% /k
700
701.fi
702(Note that this example shows that one can add command line options
703to the options given in
704.IR /etc/fstab .)
705
6dbe3af9 706.TP
fd6b7a7f
KZ
707.BR check " / " check=normal " / " check=strict
708Set checking level. When at least one of these options is set (and
709.B check=normal
710is set by default) the inodes and blocks bitmaps are checked upon mount
22853e4a 711(which can take half a minute or so on a big disk, and is rather useless).
fd6b7a7f
KZ
712With strict checking, block deallocation checks that the block to free
713is in the data zone.
714.TP
715.BR check=none " / " nocheck
22853e4a
KZ
716No checking is done. This is fast. Recent kernels do not have a
717check option anymore - checking with
718.BR e2fsck (8)
719is more meaningful.
fd6b7a7f
KZ
720.TP
721.B debug
722Print debugging info upon each (re)mount.
723.TP
724.BR errors=continue " / " errors=remount-ro " / " errors=panic
725Define the behaviour when an error is encountered.
726(Either ignore errors and just mark the file system erroneous and continue,
727or remount the file system read-only, or panic and halt the system.)
728The default is set in the filesystem superblock, and can be
729changed using
730.BR tune2fs (8).
731.TP
732.BR grpid " or " bsdgroups " / " nogrpid " or " sysvgroups
733These options define what group id a newly created file gets.
734When
735.BR grpid
736is set, it takes the group id of the directory in which it is created;
737otherwise (the default) it takes the fsgid of the current process, unless
738the directory has the setgid bit set, in which case it takes the gid
739from the parent directory, and also gets the setgid bit set
740if it is a directory itself.
741.TP
742\fBresgid=\fP\fIn\fP and \fBresuid=\fP\fIn\fP
743The ext2 file system reserves a certain percentage of the available
744space (by default 5%, see
745.BR mke2fs (8)
746and
747.BR tune2fs (8)).
748These options determine who can use the reserved blocks.
749(Roughly: whoever has the specified uid, or belongs to the specified group.)
750.TP
751.BI sb= n
752Instead of block 1, use block
753.I n
754as superblock. This could be useful when the filesystem has been damaged.
eb63b9b8
KZ
755(Earlier, copies of the superblock would be made every 8192 blocks: in
756block 1, 8193, 16385, ... (and one got hundreds or even thousands
757of copies on a big filesystem). Since version 1.08,
758.B mke2fs
759has a \-s (sparse superblock) option to reduce the number of backup
760superblocks, and since version 1.15 this is the default. Note
761that this may mean that ext2 filesystems created by a recent
762.B mke2fs
763cannot be mounted r/w under Linux 2.0.*.)
e8f26419
KZ
764The block number here uses 1k units. Thus, if you want to use logical
765block 32768 on a filesystem with 4k blocks, use "sb=131072".
fd6b7a7f
KZ
766.TP
767.BR grpquota " / " noquota " / " quota " / " usrquota
768These options are accepted but ignored.
769
e8f26419
KZ
770.TP
771.BR nouid32
772Disables 32-bit UIDs and GIDs. This is for interoperability with older
773kernels which only store and expect 16-bit values.
774
775
776.SH "Mount options for ext3"
777The `ext3' file system is version of the ext2 file system which has been
778enhanced with journalling. It supports the same options as ext2 as
779well as the following additions:
780.\" .TP
781.\" .BR abort
782.\" Mount the file system in abort mode, as if a fatal error has occurred.
783.TP
784.BR journal=update
785Update the ext3 file system's journal to the current format.
786.TP
787.BR journal=inum
788When a journal already exists, this option is ignored. Otherwise, it
789specifies the number of the inode which will represent the ext3 file system's
790journal file; ext3 will create a new journal, overwriting the old contents
791of the file whose inode number is
792.IR inum .
793.TP
794.BR noload
795Do not load the ext3 file system's journal on mounting.
796.TP
797.BR data=journal " / " data=ordered " / " data=writeback
798Specifies the journalling mode for file data. Metadata is always journaled.
799.RS
800.TP
801.B journal
802All data is committed into the journal prior to being written into the
803main file system.
804.TP
805.B ordered
806This is the default mode. All data is forced directly out to the main file
807system prior to its metadata being committed to the journal.
808.TP
809.B writeback
810Data ordering is not preserved - data may be written into the main
811file system after its metadata has been committed to the journal.
812This is rumoured to be the highest-throughput option. It guarantees
813internal file system integrity, however it can allow old data to appear
814in files after a crash and journal recovery.
815
fd6b7a7f
KZ
816.SH "Mount options for fat"
817(Note:
818.I fat
819is not a separate filesystem, but a common part of the
820.IR msdos ,
821.I umsdos
822and
823.I vfat
824filesystems.)
825.TP
eb63b9b8 826.BR blocksize=512 " / " blocksize=1024 " / " blocksize=2048
fd6b7a7f
KZ
827Set blocksize (default 512).
828.TP
829\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
830Set the owner and group of all files. (Default: the uid and gid
831of the current process.)
832.TP
833.BI umask= value
834Set the umask (the bitmask of the permissions that are
835.B not
836present). The default is the umask of the current process.
837The value is given in octal.
838.TP
839.BI check= value
840Three different levels of pickyness can be chosen:
6dbe3af9
KZ
841.RS
842.TP
fd6b7a7f 843.B r[elaxed]
6dbe3af9 844Upper and lower case are accepted and equivalent, long name parts are
fd6b7a7f
KZ
845truncated (e.g.
846.I verylongname.foobar
847becomes
848.IR verylong.foo ),
849leading and embedded spaces are accepted in each name part (name and extension).
6dbe3af9 850.TP
fd6b7a7f 851.B n[ormal]
6dbe3af9
KZ
852Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are
853rejected. This is the default.
854.TP
fd6b7a7f 855.B s[trict]
6dbe3af9
KZ
856Like "normal", but names may not contain long parts and special characters
857that are sometimes used on Linux, but are not accepted by MS-DOS are
858rejected. (+, =, spaces, etc.)
859.RE
860.TP
eb63b9b8
KZ
861.BI codepage= value
862Sets the codepage for converting to shortname characters on FAT
863and VFAT filesystems. By default, codepage 437 is used.
864.TP
fd6b7a7f 865.BR conv=b[inary] " / " conv=t[ext] " / " conv=a[uto]
6dbe3af9 866The
fd6b7a7f 867.I fat
6dbe3af9
KZ
868file system can perform CRLF<-->NL (MS-DOS text format to UNIX text
869format) conversion in the kernel. The following conversion modes are
870available:
871.RS
872.TP
fd6b7a7f 873.B binary
6dbe3af9
KZ
874no translation is performed. This is the default.
875.TP
fd6b7a7f 876.B text
6dbe3af9
KZ
877CRLF<-->NL translation is performed on all files.
878.TP
fd6b7a7f 879.B auto
6dbe3af9
KZ
880CRLF<-->NL translation is performed on all files that don't have a
881"well-known binary" extension. The list of known extensions can be found at
882the beginning of
fd6b7a7f
KZ
883.I fs/fat/misc.c
884(as of 2.0, the list is: exe, com, bin, app, sys, drv, ovl, ovr, obj,
6dbe3af9 885lib, dll, pif, arc, zip, lha, lzh, zoo, tar, z, arj, tz, taz, tzp, tpz,
726f69e2 886gz, tgz, deb, gif, bmp, tif, gl, jpg, pcx, tfm, vf, gf, pk, pxl, dvi).
6dbe3af9
KZ
887.PP
888Programs that do computed lseeks won't like in-kernel text conversion.
726f69e2 889Several people have had their data ruined by this translation. Beware!
6dbe3af9 890
fd6b7a7f
KZ
891For file systems mounted in binary mode, a conversion tool
892(fromdos/todos) is available.
6dbe3af9
KZ
893.RE
894.TP
eb63b9b8
KZ
895.BI cvf_format= module
896Forces the driver to use the CVF (Compressed Volume File) module
897.RI cvf_ module
898instead of auto-detection. If the kernel supports kmod, the
899cvf_format=xxx option also controls on-demand CVF module loading.
900.TP
901.BI cvf_option= option
902Option passed to the CVF module.
903.TP
6dbe3af9 904.B debug
fd6b7a7f 905Turn on the
6dbe3af9
KZ
906.I debug
907flag. A version string and a list of file system parameters will be
908printed (these data are also printed if the parameters appear to be
909inconsistent).
910.TP
eb63b9b8
KZ
911.BR fat=12 " / " fat=16 " / " fat=32
912Specify a 12, 16 or 32 bit fat. This overrides
fd6b7a7f 913the automatic FAT type detection routine. Use with caution!
6dbe3af9 914.TP
eb63b9b8
KZ
915.BI iocharset= value
916Character set to use for converting between 8 bit characters
917and 16 bit Unicode characters. The default is iso8859-1.
918Long filenames are stored on disk in Unicode format.
919.TP
fd6b7a7f
KZ
920.B quiet
921Turn on the
922.I quiet
923flag. Attempts to chown or chmod files do not return errors,
924although they fail. Use with caution!
6dbe3af9 925.TP
fd6b7a7f
KZ
926.B "sys_immutable, showexec, dots, nodots, dotsOK=[yes|no]"
927Various misguided attempts to force Unix or DOS conventions
928onto a FAT file system.
929
930.SH "Mount options for hpfs"
6dbe3af9 931.TP
fd6b7a7f
KZ
932\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
933Set the owner and group of all files. (Default: the uid and gid
934of the current process.)
6dbe3af9 935.TP
fd6b7a7f
KZ
936.BI umask= value
937Set the umask (the bitmask of the permissions that are
938.B not
939present). The default is the umask of the current process.
940The value is given in octal.
941.TP
942.BR case=lower " / " case=asis
943Convert all files names to lower case, or leave them.
944(Default:
945.BR case=lower .)
946.TP
947.BR conv=binary " / " conv=text " / " conv=auto
948For
949.BR conv=text ,
950delete some random CRs (in particular, all followed by NL)
951when reading a file.
952For
953.BR conv=auto ,
954choose more or less at random between
955.BR conv=binary " and " conv=text .
956For
957.BR conv=binary ,
958just read what is in the file. This is the default.
6dbe3af9
KZ
959.TP
960.B nocheck
fd6b7a7f
KZ
961Do not abort mounting when certain consistency checks fail.
962
963.SH "Mount options for iso9660"
ffc43748
KZ
964ISO 9660 is a standard describing a filesystem structure to be used
965on CD-ROMs. (This filesystem type is also seen on some DVDs. See also the
966.I udf
967filesystem.)
968
6dbe3af9 969Normal
fd6b7a7f 970.I iso9660
6dbe3af9
KZ
971filenames appear in a 8.3 format (i.e., DOS-like restrictions on filename
972length), and in addition all characters are in upper case. Also there is
973no field for file ownership, protection, number of links, provision for
974block/character devices, etc.
975
976Rock Ridge is an extension to iso9660 that provides all of these unix like
977features. Basically there are extensions to each directory record that
978supply all of the additional information, and when Rock Ridge is in use,
979the filesystem is indistinguishable from a normal UNIX file system (except
980that it is read-only, of course).
fd6b7a7f 981.TP
6dbe3af9 982.B norock
fd6b7a7f 983Disable the use of Rock Ridge extensions, even if available. Cf.\&
6dbe3af9 984.BR map .
c07ebfa1 985.TP
eb63b9b8
KZ
986.B nojoliet
987Disable the use of Microsoft Joliet extensions, even if available. Cf.\&
988.BR map .
6dbe3af9 989.TP
fd6b7a7f
KZ
990.BR check=r[elaxed] " / " check=s[trict]
991With
992.BR check=relaxed ,
993a filename is first converted to lower case before doing the lookup.
994This is probably only meaningful together with
995.B norock
6dbe3af9 996and
fd6b7a7f
KZ
997.BR map=normal .
998(Default:
999.BR check=strict .)
1000.TP
1001\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
1002Give all files in the file system the indicated user or group id,
1003possibly overriding the information found in the Rock Ridge extensions.
1004(Default:
1005.BR uid=0,gid=0 .)
1006.TP
eb63b9b8 1007.BR map=n[ormal] " / " map=o[ff] " / " map=a[corn]
fd6b7a7f
KZ
1008For non-Rock Ridge volumes, normal name translation maps upper
1009to lower case ASCII, drops a trailing `;1', and converts `;' to `.'.
1010With
1011.B map=off
1012no name translation is done. See
1013.BR norock .
1014(Default:
1015.BR map=normal .)
eb63b9b8
KZ
1016.B map=acorn
1017is like
1018.BR map=normal
1019but also apply Acorn extensions if present.
fd6b7a7f
KZ
1020.TP
1021.BI mode= value
1022For non-Rock Ridge volumes, give all files the indicated mode.
1023(Default: read permission for everybody.)
1024Since Linux 2.1.37 one no longer needs to specify the mode in
1025decimal. (Octal is indicated by a leading 0.)
1026.TP
1027.B unhide
1028Also show hidden and associated files.
1029.TP
1030.B block=[512|1024|2048]
1031Set the block size to the indicated value.
1032(Default:
1033.BR block=1024 .)
1034.TP
1035.BR conv=a[uto] " / " conv=b[inary] " / " conv=m[text] " / " conv=t[ext]
1036(Default:
1037.BR conv=binary .)
1038Since Linux 1.3.54 this option has no effect anymore.
1039(And non-binary settings used to be very dangerous,
eb63b9b8 1040possibly leading to silent data corruption.)
6dbe3af9 1041.TP
fd6b7a7f
KZ
1042.B cruft
1043If the high byte of the file length contains other garbage,
1044set this mount option to ignore the high order bits of the file length.
1045This implies that a file cannot be larger than 16MB.
1046The `cruft' option is set automatically if the entire CDROM
1047has a weird size (negative, or more than 800MB). It is also
1048set when volume sequence numbers other than 0 or 1 are seen.
eb63b9b8
KZ
1049.TP
1050.B session=x
1051Select number of session on multisession CD. (Since 2.3.4.)
1052.TP
1053.B sbsector=xxx
1054Session begins from sector xxx. (Since 2.3.4.)
fd6b7a7f
KZ
1055
1056.SH "Mount options for minix"
1057None.
6dbe3af9 1058
fd6b7a7f
KZ
1059.SH "Mount options for msdos"
1060See mount options for fat.
6dbe3af9
KZ
1061If the
1062.I msdos
1063file system detects an inconsistency, it reports an error and sets the file
1064system read-only. The file system can be made writeable again by remounting
1065it.
6dbe3af9 1066
fd6b7a7f
KZ
1067.SH "Mount options for ncp"
1068Just like
1069.IR nfs ", the " ncp
1070implementation expects a binary argument (a
1071.IR "struct ncp_mount_data" )
1072to the mount system call. This argument is constructed by
1073.BR ncpmount (8)
1074and the current version of
6dbe3af9 1075.B mount
fd6b7a7f 1076(2.6h) does not know anything about ncp.
6dbe3af9 1077
fd6b7a7f
KZ
1078.SH "Mount options for nfs"
1079Instead of a textual option string, parsed by the kernel, the
1080.I nfs
1081file system expects a binary argument of type
1082.IR "struct nfs_mount_data" .
1083The program
1084.B mount
1085itself parses the following options of the form `tag=value',
1086and puts them in the structure mentioned:
1087.BI rsize= n,
1088.BI wsize= n,
1089.BI timeo= n,
1090.BI retrans= n,
1091.BI acregmin= n,
1092.BI acregmax= n,
1093.BI acdirmin= n,
1094.BI acdirmax= n,
1095.BI actimeo= n,
1096.BI retry= n,
1097.BI port= n,
1098.BI mountport= n,
1099.BI mounthost= name,
1100.BI mountprog= n,
1101.BI mountvers= n,
1102.BI nfsprog= n,
1103.BI nfsvers= n,
1104.BI namlen= n.
1105The option
1106.BI addr= n
1107is accepted but ignored.
1108Also the following Boolean options, possibly preceded by
1109.B no
1110are recognized:
1111.BR bg ,
1112.BR fg ,
1113.BR soft ,
1114.BR hard ,
1115.BR intr ,
1116.BR posix ,
1117.BR cto ,
1118.BR ac ,
1119.BR tcp ,
1120.BR udp ,
1121.BR lock .
1122For details, see
1123.BR nfs (5).
6dbe3af9 1124
fd6b7a7f 1125Especially useful options include
6dbe3af9 1126.TP
fd6b7a7f
KZ
1127.B rsize=8192,wsize=8192
1128This will make your nfs connection much faster than with the default
22853e4a
KZ
1129buffer size of 1024. (NFSv2 does not work with larger values of
1130.B rsize
1131and
1132.BR wsize .)
6dbe3af9 1133.TP
fd6b7a7f
KZ
1134.B hard
1135The program accessing a file on a NFS mounted file system will hang
1136when the server crashes. The process cannot be interrupted or
1137killed unless you also specify
1138.BR intr .
1139When the NFS server is back online the program will continue undisturbed
1140from where it was. This is probably what you want.
6dbe3af9 1141.TP
fd6b7a7f
KZ
1142.B soft
1143This option allows the kernel to time out if the nfs server is not
1144responding for some time. The time can be
1145specified with
1146.BR timeo=time .
1147This option might be useful if your nfs server sometimes doesn't respond
1148or will be rebooted while some process tries to get a file from the server.
1149Usually it just causes lots of trouble.
6dbe3af9 1150.TP
fd6b7a7f
KZ
1151.B nolock
1152Do not use locking. Do not start lockd.
1153
eb63b9b8
KZ
1154.SH "Mount options for ntfs"
1155.TP
1156.BI iocharset= name
1157Character set to use when returning file names.
1158Unlike VFAT, NTFS suppresses names that contain
1159unconvertible characters.
1160.TP
1161.BR utf8
1162Use UTF-8 for converting file names.
1163.TP
1164.B uni_xlate=[0|1|2]
e8f26419
KZ
1165For 0 (or `no' or `false'), do not use escape sequences
1166for unknown Unicode characters.
1167For 1 (or `yes' or `true') or 2, use vfat-style 4-byte escape sequences
1168starting with ":". Here 2 give a little-endian encoding
1169and 1 a byteswapped bigendian encoding.
eb63b9b8
KZ
1170.TP
1171.B posix=[0|1]
1172If enabled (posix=1), the file system distinguishes between
1173upper and lower case. The 8.3 alias names are presented as
1174hard links instead of being suppressed.
1175.TP
1176\fBuid=\fP\fIvalue\fP, \fBgid=\fP\fIvalue\fP and \fBumask=\fP\fIvalue\fP
1177Set the file permission on the filesystem.
1178By default, the files are owned by root and not readable by somebody else.
1179
fd6b7a7f 1180.SH "Mount options for proc"
6dbe3af9 1181.TP
fd6b7a7f
KZ
1182\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
1183These options are recognized, but have no effect as far as I can see.
1184
e8f26419 1185.SH "Mount options for reiserfs"
ffc43748 1186Reiserfs is a journaling filesystem.
e8f26419
KZ
1187The reiserfs mount options are more fully described at
1188.IR http://www.namesys.com/mount-options.html .
1189.TP
1190.BR conv
1191Instructs version 3.6 reiserfs software to mount a version 3.5 file system,
1192using the 3.6 format for newly created objects. This file system will no
1193longer be compatible with reiserfs 3.5 tools.
1194.TP
1195.BR hash=rupasov " / " hash=tea " / " hash=r5 " / " hash=detect
1196Choose which hash function reiserfs will use to find files within directories.
1197.RS
1198.TP
1199.B rupasov
1200A hash invented by Yury Yu. Rupasov. It is fast and preserves locality,
1201mapping lexicographically close file names to close hash values.
1202This option should not be used, as it causes a high probability of hash
1203collisions.
1204.TP
1205.B tea
1206A Davis-Meyer function implemented by Jeremy Fitzhardinge.
1207It uses hash permuting bits in the name. It gets high randomness
1208and, therefore, low probability of hash collisions at come CPU cost.
1209This may be used if EHASHCOLLISION errors are experienced with the r5 hash.
1210.TP
1211.B r5
1212A modified version of the rupasov hash. It is used by default and is
1213the best choice unless the file system has huge directories and
1214unusual file-name patterns.
1215.TP
1216.B detect
1217Instructs
1218.IR mount
1219to detect which hash function is in use by examining
1220the file system being mounted, and to write this information into
1221the reiserfs superblock. This is only useful on the first mount of
1222an old format file system.
1223.RE
1224.TP
1225.BR hashed_relocation
1226Tunes the block allocator. This may provide performance improvements
1227in some situations.
1228.TP
1229.BR no_unhashed_relocation
1230Tunes the block allocator. This may provide performance improvements
1231in some situations.
1232.TP
1233.BR noborder
1234Disable the border allocator algorithm invented by Yury Yu. Rupasov.
1235This may provide performance improvements in some situations.
1236.TP
1237.BR nolog
1238Disable journalling. This will provide slight performance improvements in
1239some situations at the cost of losing reiserfs's fast recovery from crashes.
1240Even with this option turned on, reiserfs still performs all journalling
1241operations, save for actual writes into its journalling area. Implementation
1242of
1243.IR nolog
1244is a work in progress.
1245.TP
1246.BR notail
1247By default, reiserfs stores small files and `file tails' directly into its
1248tree. This confuses some utilities such as
1249.BR LILO (8) .
1250This option is used to disable packing of files into the tree.
1251.TP
1252.BR replayonly
1253Replay the transactions which are in the journal, but do not actually
1254mount the file system. Mainly used by
1255.IR reiserfsck .
1256.TP
1257.BI resize= number
1258A remount option which permits online expansion of reiserfs partitions.
1259Instructs reiserfs to assume that the device has
1260.I number
1261blocks.
1262This option is designed for use with devices which are under logical
1263volume management (LVM).
1264There is a special
1265.I resizer
1266utility which can be obtained from
1267.IR ftp://ftp.namesys.com/pub/reiserfsprogs .
1268
fd6b7a7f
KZ
1269.SH "Mount options for romfs"
1270None.
1271
1272.SH "Mount options for smbfs"
1273Just like
1274.IR nfs ", the " smb
1275implementation expects a binary argument (a
1276.IR "struct smb_mount_data" )
1277to the mount system call. This argument is constructed by
1278.BR smbmount (8)
1279and the current version of
6dbe3af9 1280.B mount
eb63b9b8 1281(2.9w) does not know anything about smb.
fd6b7a7f
KZ
1282
1283.SH "Mount options for sysv"
1284None.
1285
612721db
KZ
1286.SH "Mount options for tmpfs"
1287The following parameters accept a suffix
1288.BR k ,
1289.B m
1290or
1291.B g
1292for Ki, Mi, Gi (binary kilo, mega and giga) and can be changed on remount.
1293.TP
1294.BI size= nbytes
1295Override default size of the filesystem.
1296The size is given in bytes, and rounded down to entire pages.
1297The default is half of the memory.
1298.TP
1299.B nr_blocks=
1300Set number of blocks.
1301.TP
1302.B nr_inodes=
1303Set number of inodes.
1304.TP
1305.B mode=
1306Set initial permissions of the root directory.
1307
eb63b9b8 1308.SH "Mount options for udf"
ffc43748
KZ
1309udf is the "Universal Disk Format" filesystem defined by the Optical
1310Storage Technology Association, and is often used for DVD-ROM.
1311See also
1312.IR iso9660 .
eb63b9b8
KZ
1313.TP
1314.B gid=
1315Set the default group.
1316.TP
1317.B umask=
1318Set the default umask.
1319.TP
1320.B uid=
1321Set the default user.
1322.TP
1323.B unhide
1324Show otherwise hidden files.
1325.TP
1326.B undelete
1327Show deleted files in lists.
1328.TP
1329.B strict
1330Set strict conformance (unused).
1331.TP
1332.B utf8
1333(unused).
1334.TP
1335.B iocharset
1336(unused).
1337.TP
1338.B bs=
1339Set the block size. (May not work unless 2048.)
1340.TP
1341.B novrs
1342Skip volume sequence recognition.
1343.TP
1344.B session=
1345Set the CDROM session counting from 0. Default: last session.
1346.TP
1347.B anchor=
1348Override standard anchor location. Default: 256.
1349.TP
1350.B volume=
1351Override the VolumeDesc location. (unused)
1352.TP
1353.B partition=
1354Override the PartitionDesc location. (unused)
1355.TP
1356.B lastblock=
1357Set the last block of the filesystem.
1358.TP
1359.B fileset=
1360Override the fileset block location. (unused)
1361.TP
1362.B rootdir=
1363Override the root directory location. (unused)
1364
fd6b7a7f 1365.SH "Mount options for ufs"
eb63b9b8
KZ
1366.TP
1367.BI ufstype= value
1368UFS is a file system widely used in different operating systems.
1369The problem are differences among implementations. Features of some
1370implementations are undocumented, so its hard to recognize the
1371type of ufs automatically.
364cda48 1372That's why the user must specify the type of ufs by mount option.
eb63b9b8
KZ
1373Possible values are:
1374.RS
1375.TP
1376.B old
1377Old format of ufs, this is the default, read only.
1378.TP
1379.B 44bsd
1380For filesystems created by a BSD-like system (NetBSD,FreeBSD,OpenBSD).
1381.TP
1382.B sun
1383For filesystems created by SunOS or Solaris on Sparc.
1384.TP
1385.B sunx86
1386For filesystems created by Solaris on x86.
1387.TP
1388.B nextstep
1389For filesystems created by NeXTStep (on NeXT station) (currently read only).
1390.TP
1391.B nextstep-cd
1392For NextStep CDROMs (block_size == 2048), read-only.
1393.TP
1394.B openstep
1395For filesystems created by OpenStep (currently read only).
ffc43748 1396The same filesystem type is also used by Mac OS X.
eb63b9b8
KZ
1397.RE
1398
1399.TP
1400.BI onerror= value
1401Set behaviour on error:
1402.RS
1403.TP
1404.B panic
1405If an error is encountered, cause a kernel panic.
1406.TP
1407.B [lock|umount|repair]
1408These mount options don't do anything at present;
1409when an error is encountered only a console message is printed.
1410.RE
fd6b7a7f
KZ
1411
1412.SH "Mount options for umsdos"
1413See mount options for msdos.
1414The
1415.B dotsOK
1416option is explicitly killed by
1417.IR umsdos .
1418
1419.SH "Mount options for vfat"
1420First of all, the mount options for
1421.I fat
1422are recognized.
1423The
1424.B dotsOK
1425option is explicitly killed by
1426.IR vfat .
1427Furthermore, there are
1428.TP
1429.B uni_xlate
1430Translate unhandled Unicode characters to special escaped sequences.
1431This lets you backup and restore filenames that are created with any
1432Unicode characters. Without this option, a '?' is used when no
1433translation is possible. The escape character is ':' because it is
1434otherwise illegal on the vfat filesystem. The escape sequence
1435that gets used, where u is the unicode character,
1436is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
1437.TP
1438.B posix
1439Allow two files with names that only differ in case.
1440.TP
1441.B nonumtail
1442First try to make a short name without sequence number,
1443before trying
1444.IR name~num.ext .
eb63b9b8
KZ
1445.TP
1446.B utf8
1447UTF8 is the filesystem safe 8-bit encoding of Unicode that is used
1448by the console. It can be be enabled for the filesystem with this option.
1449If `uni_xlate' gets set, UTF8 gets disabled.
ffc43748
KZ
1450.TP
1451.B shortname=[lower|win95|winnt|mixed]
1452Option (available since 2.4.13) that sets how short filenames are to be
1453created and displayed.
1454.nf
1455 lower = display lower, create win95 filenames
1456 win95 = display win95, create win95 filenames
1457 winnt = display winnt, create winnt filenames
1458 mixed = display winnt, create win95 filenames
1459.fi
1460Default is "lower".
fd6b7a7f
KZ
1461
1462.SH "Mount options for xenix"
1463None.
1464
c07ebfa1
KZ
1465.SH "Mount options for xfs"
1466.TP
1467.BI biosize= size
1468Sets the preferred buffered I/O size (default size is 64K).
1469.I size
1470must be expressed as the logarithm (base2) of the desired I/O size.
1471Valid values for this option are 14 through 16, inclusive
1472(i.e. 16K, 32K, and 64K bytes).
1473On machines with a 4K pagesize, 13 (8K bytes) is also a valid
1474.IR size .
1475The preferred buffered I/O size can also be altered on an individual
1476file basis using the
1477.BR ioctl (2)
1478system call.
1479.TP
1480.B dmapi " / " xdsm
1481Enable the DMAPI (Data Management API) event callouts.
1482.TP
1483.BI logbufs= value
1484Set the number of in-memory log buffers.
1485Valid numbers range from 2-8 inclusive.
1486The default value is 8 buffers for filesystems with a blocksize of 64K,
14874 buffers for filesystems with a blocksize of 32K,
14883 buffers for filesystems with a blocksize of 16K,
1489and 2 buffers for all other configurations.
1490Increasing the number of buffers may increase performance on
1491some workloads at the cost of the memory used for the
1492additional log buffers and their associated control structures.
1493.TP
1494.BI logbsize= value
1495Set the size of each in-memory log buffer.
1496Valid sizes are 16384 (16K) and 32768 (32K).
1497The default value for machines with more than 32MB of memory is 32768,
1498machines with less memory use 16384 by default.
1499.TP
1500\fBlogdev=\fP\fIdevice\fP and \fBrtdev=\fP\fIdevice\fP
1501Use an external log (metadata journal) and/or real-time device.
1502An XFS filesystem has up to three parts: a data section, a log section,
1503and a real-time section.
1504The real-time section is optional, and the log section can be separate
1505from the data section or contained within it.
1506Refer to
1507.BR xfs (5).
1508.TP
1509.B noalign
1510Data allocations will not be aligned at stripe unit boundaries.
1511.TP
1512.B noatime
1513Access timestamps are not updated when a file is read.
1514.TP
1515.B norecovery
1516The filesystem will be mounted without running log recovery.
1517If the filesystem was not cleanly unmounted, it is likely to
1518be inconsistent when mounted in
1519.B norecovery
1520mode.
1521Some files or directories may not be accessible because of this.
1522Filesystems mounted
1523.B norecovery
1524must be mounted read-only or the mount will fail.
1525.TP
1526.B osyncisdsync
1527Make writes to files opened with the O_SYNC flag set behave
1528as if the O_DSYNC flag had been used instead.
1529This can result in better performance without compromising
1530data safety.
1531However if this option is in effect, timestamp updates from
1532O_SYNC writes can be lost if the system crashes.
1533.TP
1534.BR quota " / " usrquota " / " uqnoenforce
1535User disk quota accounting enabled, and limits (optionally) enforced.
1536.TP
1537.BR grpquota " / " gqnoenforce
1538Group disk quota accounting enabled and limits (optionally) enforced.
1539.TP
1540\fBsunit=\fP\fIvalue\fP and \fBswidth=\fP\fIvalue\fP
1541Used to specify the stripe unit and width for a RAID device or a stripe
1542volume.
1543.I value
1544must be specified in 512-byte block units.
1545If this option is not specified and the filesystem was made on a stripe
1546volume or the stripe width or unit were specified for the RAID device at
1547mkfs time, then the mount system call will restore the value from the
1548superblock.
1549For filesystems that are made directly on RAID devices, these options can be
1550used to override the information in the superblock if the underlying disk
1551layout changes after the filesystem has been created.
1552The
1553.B swidth
1554option is required if the
1555.B sunit
1556option has been specified,
1557and must be a multiple of the
1558.B sunit
1559value.
1560
fd6b7a7f
KZ
1561.SH "Mount options for xiafs"
1562None. Although nothing is wrong with xiafs, it is not used much,
1563and is not maintained. Probably one shouldn't use it.
1564Since Linux version 2.1.21 xiafs is no longer part of the kernel source.
1565
1566.SH "THE LOOP DEVICE"
1567One further possible type is a mount via the loop device. For example,
1568the command
1569
1570.nf
1571.B " mount /tmp/fdimage /mnt -t msdos -o loop=/dev/loop3,blocksize=1024"
1572.fi
1573
1574will set up the loop device
1575.I /dev/loop3
1576to correspond to the file
1577.IR /tmp/fdimage ,
1578and then mount this device on
1579.IR /mnt .
1580This type of mount knows about three options, namely
1581.BR loop ", " offset " and " encryption ,
1582that are really options to
1583.BR losetup (8).
1584If no explicit loop device is mentioned
1585(but just an option `\fB\-o loop\fP' is given), then
1586.B mount
1587will try to find some unused loop device and use that.
7eda085c
KZ
1588If you are not so unwise as to make
1589.I /etc/mtab
1590a symbolic link to
1591.I /proc/mounts
1592then any loop device allocated by
1593.B mount
1594will be freed by
1595.BR umount .
1596You can also free a loop device by hand, using `losetup -d', see
1597.BR losetup (8).
6dbe3af9 1598
ffc43748
KZ
1599.SH RETURN CODES
1600.B mount
1601has the following return codes (the bits can be ORed):
1602.TP
1603.BR 0
1604success
1605.TP
1606.BR 1
1607incorrect invocation or permissions
1608.TP
1609.BR 2
1610system error (out of memory, cannot fork, no more loop devices)
1611.TP
1612.BR 4
1613internal
1614.B mount
1615bug or missing
1616.BR nfs
1617support in
1618.B mount
1619.TP
1620.BR 8
1621user interrupt
1622.TP
1623.BR 16
1624problems writing or locking /etc/mtab
1625.TP
1626.BR 32
1627mount failure
1628.TP
1629.BR 64
1630some mount succeeded
1631
6dbe3af9
KZ
1632.SH FILES
1633.I /etc/fstab
1634file system table
1635.br
fd6b7a7f
KZ
1636.I /etc/mtab
1637table of mounted file systems
1638.br
6dbe3af9
KZ
1639.I /etc/mtab~
1640lock file
1641.br
1642.I /etc/mtab.tmp
1643temporary file
1644.SH "SEE ALSO"
fd6b7a7f
KZ
1645.BR mount (2),
1646.BR umount (2),
1647.BR fstab (5),
1648.BR umount (8),
1649.BR swapon (8),
1650.BR nfs (5),
c07ebfa1 1651.BR xfs (5),
22853e4a 1652.BR e2label (8),
c07ebfa1 1653.BR xfs_admin (8),
fd6b7a7f
KZ
1654.BR mountd (8),
1655.BR nfsd (8),
1656.BR mke2fs (8),
1657.BR tune2fs (8),
1658.BR losetup (8)
6dbe3af9
KZ
1659.SH BUGS
1660It is possible for a corrupted file system to cause a crash.
1661.PP
1662Some Linux file systems don't support
fd6b7a7f 1663.B "\-o sync"
e8f26419
KZ
1664(the ext2 and ext3 file systems
1665.I do
6dbe3af9
KZ
1666support synchronous updates (a la BSD) when mounted with the
1667.B sync
1668option).
1669.PP
1670The
fd6b7a7f 1671.B "\-o remount"
6dbe3af9 1672may not be able to change mount parameters (all
fd6b7a7f 1673.IR ext2fs -specific
6dbe3af9
KZ
1674parameters, except
1675.BR sb ,
1676are changeable with a remount, for example, but you can't change
1677.B gid
1678or
1679.B umask
1680for the
fd6b7a7f 1681.IR fatfs ).
6dbe3af9
KZ
1682.SH HISTORY
1683A
1684.B mount
5c36a0eb 1685command existed in Version 5 AT&T UNIX.