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