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