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