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