]> git.ipfire.org Git - thirdparty/util-linux.git/blob - sys-utils/mount.8
Merge branch 'maybe-for-v2.32' of https://github.com/rudimeier/util-linux
[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. The filesystem is used to control how data is
67 stored on the device or provided in a virtual way by network or another services.
68
69 The standard form of the
70 .B mount
71 command is:
72 .RS
73
74 .br
75 .BI "mount \-t" " type device dir"
76 .br
77
78 .RE
79 This tells the kernel to attach the filesystem found on
80 .I device
81 (which is of type
82 .IR type )
83 at the directory
84 .IR dir .
85 The option \fB\-t \fItype\fR is optional. The
86 .B mount
87 command is usually able to detect a filesystem. The root permissions are necessary
88 to mount a filesystem by default. See section "Non-superuser mounts" below for more details.
89 The previous contents (if any) and owner and mode of
90 .I dir
91 become invisible, and as long as this filesystem remains mounted,
92 the pathname
93 .I dir
94 refers to the root of the filesystem on
95 .IR device .
96
97 If only the directory or the device is given, for example:
98 .RS
99 .sp
100 .BI "mount /dir"
101 .sp
102 .RE
103 then \fBmount\fR looks for a mountpoint (and if not found then for a device) in the
104 .IR /etc/fstab
105 file. It's possible to use the
106 .B \-\-target
107 or
108 .B \-\-source
109 options to avoid ambivalent interpretation of the given argument. For example:
110 .RS
111 .sp
112 .BI "mount \-\-target /mountpoint"
113 .sp
114 .RE
115
116 The same filesystem may be mounted more than once, and in some cases (e.g.
117 network filesystems) the same filesystem maybe be mounted on the same
118 mountpoint more times. The mount command does not implement any policy to
119 control this behavior. All behavior is controlled by kernel and it is usually
120 specific to filesystem driver. The exception is \fB\-\-all\fR, in this case
121 already mounted filesystems are ignored.
122
123 .SS Listing the mounts
124 The listing mode is maintained for backward compatibility only.
125
126 For more robust and customizable output use
127 .BR findmnt (8),
128 \fBespecially in your scripts\fP. Note that control characters in the
129 mountpoint name are replaced with '?'.
130
131 The following command lists all mounted filesystems (of type
132 .IR type ):
133 .RS
134 .sp
135 .BR "mount " [ \-l "] [" "\-t \fItype\/\fP" ]
136 .sp
137 .RE
138 The option \fB\-l\fR adds labels to this listing. See below.
139
140 .SS Indicating the device and filesystem
141 Most devices are indicated by a filename (of a block special device), like
142 .IR /dev/sda1 ,
143 but there are other possibilities. For example, in the case of an NFS mount,
144 .I device
145 may look like
146 .IR knuth.cwi.nl:/dir .
147 It is also possible to indicate a block special device using its filesystem label
148 or UUID (see the \fB\-L\fR and \fB\-U\fR options below), or its partition label
149 or UUID. Partition identifiers are supported for example for GUID Partition
150 Tables (GPT).
151
152 The device name of disk partitions are unstable; hardware reconfiguration,
153 adding or removing a device can cause change in names. This is reason why it's
154 strongly recommended to use filesystem or partition identificators like UUID or
155 LABEL.
156
157 The command \fBlsblk --fs\fR provides overview of filesystems, LABELs and UUIDs
158 on available block devices. The command \fBblkid -p <device>\fR provides details about
159 a filesystem on the specified device.
160
161 Don't forget that there is no guarantee that UUIDs and labels are really
162 unique, especially if you move, share or copy the device. Use
163 .B "lsblk \-o +UUID,PARTUUID"
164 to verify that the UUIDs are really unique in your system.
165
166 The recommended setup is to use tags (e.g.\& \fBUUID=\fIuuid\fR) rather than
167 .I /dev/disk/by-{label,uuid,partuuid,partlabel}
168 udev symlinks in the
169 .I /etc/fstab
170 file. Tags are
171 more readable, robust and portable. The
172 .BR mount (8)
173 command internally uses udev
174 symlinks, so the use of symlinks in /etc/fstab has no advantage over tags.
175 For more details see
176 .BR libblkid (3).
177
178 Note that
179 .BR mount (8)
180 uses UUIDs as strings. The UUIDs from the command line or from
181 .BR fstab (5)
182 are not converted to internal binary representation. The string representation
183 of the UUID should be based on lower case characters.
184
185 The
186 .I proc
187 filesystem is not associated with a special device, and when
188 mounting it, an arbitrary keyword, such as
189 .I proc
190 can be used instead of a device specification.
191 (The customary choice
192 .I none
193 is less fortunate: the error message `none already mounted' from
194 .B mount
195 can be confusing.)
196
197 .SS The files /etc/fstab, /etc/mtab and /proc/mounts
198 The file
199 .I /etc/fstab
200 (see
201 .BR fstab (5)),
202 may contain lines describing what devices are usually
203 mounted where, using which options. The default location of the
204 .BR fstab (5)
205 file can be overridden with the
206 .BI \-\-fstab " path"
207 command-line option (see below for more details).
208 .LP
209 The command
210 .RS
211 .sp
212 .B mount \-a
213 .RB [ \-t
214 .IR type ]
215 .RB [ \-O
216 .IR optlist ]
217 .sp
218 .RE
219 (usually given in a bootscript) causes all filesystems mentioned in
220 .I fstab
221 (of the proper type and/or having or not having the proper options)
222 to be mounted as indicated, except for those whose line contains the
223 .B noauto
224 keyword. Adding the
225 .B \-F
226 option will make \fBmount\fR fork, so that the
227 filesystems are mounted simultaneously.
228 .LP
229 When mounting a filesystem mentioned in
230 .I fstab
231 or
232 .IR mtab ,
233 it suffices to specify on the command line only the device, or only the mount point.
234 .sp
235 The programs
236 .B mount
237 and
238 .B umount
239 traditionally maintained a list of currently mounted filesystems in the file
240 .IR /etc/mtab .
241 This real mtab file is still supported, but on current Linux systems it is
242 better to make it a symlink to
243 .I /proc/mounts
244 instead, because a regular mtab file maintained in userspace cannot reliably
245 work with namespaces, containers and other advanced Linux features.
246 .sp
247 If no arguments are given to
248 .BR mount ,
249 the list of mounted filesystems is printed.
250 .sp
251 If you want to override mount options from
252 .I /etc/fstab
253 you have to use the \fB\-o\fR option:
254 .RS
255 .sp
256 .BI mount " device" \fR| "dir " \-o " options"
257 .sp
258 .RE
259 and then the mount options from the command line will be appended to
260 the list of options from
261 .IR /etc/fstab .
262 The usual behavior is that the last option wins if there are conflicting
263 ones.
264 .sp
265 The
266 .B mount
267 program does not read the
268 .I /etc/fstab
269 file if both
270 .I device
271 (or LABEL, UUID, PARTUUID or PARTLABEL) and
272 .I dir
273 are specified. For example, to mount device
274 .BR foo " at " /dir :
275 .RS
276 .sp
277 .B "mount /dev/foo /dir"
278 .sp
279 .RE
280
281 .SS Non-superuser mounts
282 Normally, only the superuser can mount filesystems.
283 However, when
284 .I fstab
285 contains the
286 .B user
287 option on a line, anybody can mount the corresponding filesystem.
288 .LP
289 Thus, given a line
290 .RS
291 .sp
292 .B "/dev/cdrom /cd iso9660 ro,user,noauto,unhide"
293 .sp
294 .RE
295 any user can mount the iso9660 filesystem found on an inserted CDROM
296 using the command:
297 .RS
298 .B "mount /cd"
299 .sp
300 .RE
301 Note that \fBmount\fR is very strict about non-root users and all paths
302 specified on command line are verified before fstab is parsed or a helper
303 program is executed. It's strongly recommended to use a valid mountpoint to
304 specify filesystem, otherwise \fBmount\fR may fail. For example it's bad idea
305 to use NFS or CIFS source on command line.
306 .PP
307 For more details, see
308 .BR fstab (5).
309 Only the user that mounted a filesystem can unmount it again.
310 If any user should be able to unmount it, then use
311 .B users
312 instead of
313 .B user
314 in the
315 .I fstab
316 line.
317 The
318 .B owner
319 option is similar to the
320 .B user
321 option, with the restriction that the user must be the owner
322 of the special file. This may be useful e.g.\& for
323 .I /dev/fd
324 if a login script makes the console user owner of this device.
325 The
326 .B group
327 option is similar, with the restriction that the user must be
328 member of the group of the special file.
329
330 .SS Bind mounts
331 Remount part of the file hierarchy somewhere else. The call is:
332
333 .RS
334 .br
335 .B mount \-\-bind
336 .I olddir newdir
337 .RE
338
339 or by using this fstab entry:
340
341 .RS
342 .br
343 .BI / olddir
344 .BI / newdir
345 .B none bind
346 .RE
347
348 After this call the same contents are accessible in two places.
349 One can also remount a single file (on a single file). It's also
350 possible to use the bind mount to create a mountpoint from a regular
351 directory, for example:
352
353 .RS
354 .br
355 .B mount \-\-bind foo foo
356 .RE
357
358 The bind mount call attaches only (part of) a single filesystem, not possible
359 submounts. The entire file hierarchy including submounts is attached
360 a second place by using:
361
362 .RS
363 .br
364 .B mount \-\-rbind
365 .I olddir newdir
366 .RE
367
368 Note that the filesystem mount options will remain the same as those
369 on the original mount point.
370
371 .BR mount (8)
372 since v2.27 allows to change the mount options by passing the
373 relevant options along with
374 .BR \-\-bind .
375 For example:
376
377 .RS
378 .br
379 .B mount -o bind,ro foo foo
380 .RE
381
382 This feature is not supported by the Linux kernel; it is implemented in userspace
383 by an additional \fBmount\fR(2) remounting system call.
384 This solution is not atomic.
385
386 The alternative (classic) way to create a read-only bind mount is to use the remount
387 operation, for example:
388
389 .RS
390 .br
391 .B mount \-\-bind
392 .I olddir newdir
393 .br
394 .B mount \-o remount,bind,ro
395 .I olddir newdir
396 .RE
397
398 Note that a read-only bind will create a read-only mountpoint (VFS entry),
399 but the original filesystem superblock will still be writable, meaning that the
400 .I olddir
401 will be writable, but the
402 .I newdir
403 will be read-only.
404
405 It's also possible to change nosuid, nodev, noexec, noatime, nodiratime and
406 relatime VFS entry flags by "remount,bind" operation. It's impossible to change
407 mount options recursively (for example with \fB-o rbind,ro\fR).
408
409 .BR mount (8)
410 since v2.31 ignores the \fBbind\fR flag from
411 .I /etc/fstab
412 on
413 .B remount operation
414 (if "-o remount" specified on command line). This is necessary to fully control
415 mount options on remount by command line. In the previous versions the bind
416 flag has been always applied and it was impossible to re-define mount options
417 without interaction with the bind semantic. This
418 .BR mount (8)
419 behavior does not affect situations when "remount,bind" is specified in the
420 .I /etc/fstab
421 file.
422 .RE
423
424 .SS The move operation
425 Move a
426 .B mounted tree
427 to another place (atomically). The call is:
428
429 .RS
430 .br
431 .B mount \-\-move
432 .I olddir newdir
433 .RE
434
435 This will cause the contents which previously appeared under
436 .I olddir
437 to now be accessible under
438 .IR newdir .
439 The physical location of the files is not changed.
440 Note that
441 .I olddir
442 has to be a mountpoint.
443
444 Note also that moving a mount residing under a shared mount is invalid and
445 unsupported. Use
446 .B findmnt \-o TARGET,PROPAGATION
447 to see the current propagation flags.
448
449 .SS Shared subtree operations
450 Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared,
451 private, slave or unbindable. A shared mount provides the ability to create mirrors
452 of that mount such that mounts and unmounts within any of the mirrors propagate
453 to the other mirror. A slave mount receives propagation from its master, but
454 not vice versa. A private mount carries no propagation abilities. An
455 unbindable mount is a private mount which cannot be cloned through a bind
456 operation. The detailed semantics are documented in
457 .I Documentation/filesystems/sharedsubtree.txt
458 file in the kernel source tree.
459
460 Supported operations are:
461
462 .RS
463 .nf
464 .BI "mount \-\-make\-shared " mountpoint
465 .BI "mount \-\-make\-slave " mountpoint
466 .BI "mount \-\-make\-private " mountpoint
467 .BI "mount \-\-make\-unbindable " mountpoint
468 .fi
469 .RE
470
471 The following commands allow one to recursively change the type of all the
472 mounts under a given mountpoint.
473
474 .RS
475 .nf
476 .BI "mount \-\-make\-rshared " mountpoint
477 .BI "mount \-\-make\-rslave " mountpoint
478 .BI "mount \-\-make\-rprivate " mountpoint
479 .BI "mount \-\-make\-runbindable " mountpoint
480 .fi
481 .RE
482
483 .BR mount (8)
484 .B does not read
485 .BR fstab (5)
486 when a \fB\-\-make-\fR* operation is requested. All necessary information has to be
487 specified on the command line.
488
489 Note that the Linux kernel does not allow to change multiple propagation flags
490 with a single
491 .BR mount (2)
492 system call, and the flags cannot be mixed with other mount options and operations.
493
494 Since util-linux 2.23 the \fBmount\fR command allows to do more propagation
495 (topology) changes by one mount(8) call and do it also together with other
496 mount operations. This feature is EXPERIMENTAL. The propagation flags are applied
497 by additional \fBmount\fR(2) system calls when the preceding mount operations
498 were successful. Note that this use case is not atomic. It is possible to
499 specify the propagation flags in
500 .BR fstab (5)
501 as mount options
502 .RB ( private ,
503 .BR slave ,
504 .BR shared ,
505 .BR unbindable ,
506 .BR rprivate ,
507 .BR rslave ,
508 .BR rshared ,
509 .BR runbindable ).
510
511 For example:
512
513 .RS
514 .nf
515 .BI "mount \-\-make\-private \-\-make\-unbindable /dev/sda1 /foo"
516 .fi
517 .RE
518
519 is the same as:
520
521 .RS
522 .nf
523 .BI "mount /dev/sda1 /foo"
524 .BI "mount \-\-make\-private /foo"
525 .BI "mount \-\-make\-unbindable /foo"
526 .fi
527 .RE
528
529 .SH COMMAND-LINE OPTIONS
530 The full set of mount options used by an invocation of
531 .B mount
532 is determined by first extracting the
533 mount options for the filesystem from the
534 .I fstab
535 table, then applying any options specified by the
536 .B \-o
537 argument, and finally applying a
538 .BR \-r " or " \-w
539 option, when present.
540
541 The command \fBmount\fR does not pass all command-line options to the
542 \fB/sbin/mount.\fIsuffix\fR mount helpers. The interface between \fBmount\fR
543 and the mount helpers is described below in the section \fBEXTERNAL HELPERS\fR.
544 .sp
545 Command-line options available for the
546 .B mount
547 command are:
548 .TP
549 .BR \-a , " \-\-all"
550 Mount all filesystems (of the given types) mentioned in
551 .I fstab
552 (except for those whose line contains the
553 .B noauto
554 keyword). The filesystems are mounted following their order in
555 .IR fstab .
556 .sp
557 Note that it is a bad practice to use \fBmount \-a\fR for
558 .IR fstab
559 checking. The recommended solution is \fBfindmnt \-\-verify\fR.
560 .TP
561 .BR \-B , " \-\-bind"
562 Remount a subtree somewhere else (so that its contents are available
563 in both places). See above, under \fBBind mounts\fR.
564 .TP
565 .BR \-c , " \-\-no\-canonicalize"
566 Don't canonicalize paths. The mount command canonicalizes all paths
567 (from command line or fstab) by default. This option can be used
568 together with the
569 .B \-f
570 flag for already canonicalized absolute paths. The option is designed for mount
571 helpers which call \fBmount -i\fR. It is strongly recommended to not use this
572 command-line option for normal mount operations.
573 .sp
574 Note that \fBmount\fR(8) does not pass this option to the
575 \fB/sbin/mount.\fItype\fR helpers.
576 .TP
577 .BR \-F , " \-\-fork"
578 (Used in conjunction with
579 .BR \-a .)
580 Fork off a new incarnation of \fBmount\fR for each device.
581 This will do the mounts on different devices or different NFS servers
582 in parallel.
583 This has the advantage that it is faster; also NFS timeouts go in
584 parallel. A disadvantage is that the mounts are done in undefined order.
585 Thus, you cannot use this option if you want to mount both
586 .I /usr
587 and
588 .IR /usr/spool .
589 .IP "\fB\-f, \-\-fake\fP"
590 Causes everything to be done except for the actual system call; if it's not
591 obvious, this ``fakes'' mounting the filesystem. This option is useful in
592 conjunction with the
593 .B \-v
594 flag to determine what the
595 .B mount
596 command is trying to do. It can also be used to add entries for devices
597 that were mounted earlier with the \fB\-n\fR option. The \fB\-f\fR option
598 checks for an existing record in /etc/mtab and fails when the record already
599 exists (with a regular non-fake mount, this check is done by the kernel).
600 .IP "\fB\-i, \-\-internal\-only\fP"
601 Don't call the \fB/sbin/mount.\fIfilesystem\fR helper even if it exists.
602 .TP
603 .BR \-L , " \-\-label " \fIlabel
604 Mount the partition that has the specified
605 .IR label .
606 .TP
607 .BR \-l , " \-\-show\-labels"
608 Add the labels in the mount output. \fBmount\fR must have
609 permission to read the disk device (e.g.\& be set-user-ID root) for this to work.
610 One can set such a label for ext2, ext3 or ext4 using the
611 .BR e2label (8)
612 utility, or for XFS using
613 .BR xfs_admin (8),
614 or for reiserfs using
615 .BR reiserfstune (8).
616 .TP
617 .BR \-M , " \-\-move"
618 Move a subtree to some other place. See above, the subsection
619 \fBThe move operation\fR.
620 .TP
621 .BR \-n , " \-\-no\-mtab"
622 Mount without writing in
623 .IR /etc/mtab .
624 This is necessary for example when
625 .I /etc
626 is on a read-only filesystem.
627 .TP
628 .BR \-O , " \-\-test\-opts " \fIopts
629 Limit the set of filesystems to which the
630 .B \-a
631 option applies. In this regard it is like the
632 .B \-t
633 option except that
634 .B \-O
635 is useless without
636 .BR \-a .
637 For example, the command:
638 .RS
639 .RS
640 .sp
641 .B "mount \-a \-O no_netdev"
642 .sp
643 .RE
644 mounts all filesystems except those which have the option
645 .I _netdev
646 specified in the options field in the
647 .I /etc/fstab
648 file.
649
650 It is different from
651 .B \-t
652 in that each option is matched exactly; a leading
653 .B no
654 at the beginning of one option does not negate the rest.
655
656 The
657 .B \-t
658 and
659 .B \-O
660 options are cumulative in effect; that is, the command
661 .RS
662 .sp
663 .B "mount \-a \-t ext2 \-O _netdev"
664 .sp
665 .RE
666 mounts all ext2 filesystems with the _netdev option, not all filesystems
667 that are either ext2 or have the _netdev option specified.
668 .RE
669 .TP
670 .BR \-o , " \-\-options " \fIopts
671 Use the specified mount options. The \fIopts\fR argument is
672 a comma-separated list. For example:
673 .RS
674 .RS
675 .sp
676 .B "mount LABEL=mydisk \-o noatime,nodev,nosuid"
677 .sp
678 .RE
679
680 For more details, see the
681 .B FILESYSTEM-INDEPENDENT MOUNT OPTIONS
682 and
683 .B FILESYSTEM-SPECIFIC MOUNT OPTIONS
684 sections.
685 .RE
686
687 .TP
688 .BR \-R , " \-\-rbind"
689 Remount a subtree and all possible submounts somewhere else (so that its
690 contents are available in both places). See above, the subsection
691 \fBBind mounts\fR.
692 .TP
693 .BR \-r , " \-\-read\-only"
694 Mount the filesystem read-only. A synonym is
695 .BR "\-o ro" .
696 .sp
697 Note that, depending on the filesystem type, state and kernel behavior, the
698 system may still write to the device. For example, ext3 and ext4 will replay the
699 journal if the filesystem is dirty. To prevent this kind of write access, you
700 may want to mount an ext3 or ext4 filesystem with the \fBro,noload\fR mount
701 options or set the block device itself to read-only mode, see the
702 .BR blockdev (8)
703 command.
704 .TP
705 .B \-s
706 Tolerate sloppy mount options rather than failing. This will ignore mount
707 options not supported by a filesystem type. Not all filesystems support this
708 option. Currently it's supported by the \fBmount.nfs\fR mount helper only.
709 .TP
710 .BI \-\-source " device"
711 If only one argument for the mount command is given then the argument might be
712 interpreted as target (mountpoint) or source (device). This option allows to
713 explicitly define that the argument is the mount source.
714 .TP
715 .BI \-\-target " directory"
716 If only one argument for the mount command is given then the argument might be
717 interpreted as target (mountpoint) or source (device). This option allows to
718 explicitly define that the argument is the mount target.
719 .TP
720 .BR \-T , " \-\-fstab " \fIpath
721 Specifies an alternative fstab file. If \fIpath\fP is a directory then the files
722 in the directory are sorted by
723 .BR strverscmp (3);
724 files that start with "."\& or without an \&.fstab extension are ignored. The option
725 can be specified more than once. This option is mostly designed for initramfs
726 or chroot scripts where additional configuration is specified beyond standard
727 system configuration.
728 .sp
729 Note that \fBmount\fR(8) does not pass the option \fB\-\-fstab\fP to the
730 \fB/sbin/mount.\fItype\fR helpers, meaning that the alternative fstab files will be
731 invisible for the helpers. This is no problem for normal mounts, but user
732 (non-root) mounts always require fstab to verify the user's rights.
733 .TP
734 .BR \-t , " \-\-types " \fIfstype
735 The argument following the
736 .B \-t
737 is used to indicate the filesystem type. The filesystem types which are
738 currently supported depend on the running kernel. See
739 .I /proc/filesystems
740 and
741 .I /lib/modules/$(uname -r)/kernel/fs
742 for a complete list of the filesystems. The most common are ext2, ext3, ext4,
743 xfs, btrfs, vfat, sysfs, proc, nfs and cifs.
744 .sp
745 The programs
746 .B mount
747 and
748 .B umount
749 support filesystem subtypes. The subtype is defined by a '.subtype' suffix. For
750 example 'fuse.sshfs'. It's recommended to use subtype notation rather than add
751 any prefix to the mount source (for example 'sshfs#example.com' is
752 deprecated).
753
754 If no
755 .B \-t
756 option is given, or if the
757 .B auto
758 type is specified, mount will try to guess the desired type.
759 Mount uses the blkid library for guessing the filesystem
760 type; if that does not turn up anything that looks familiar,
761 mount will try to read the file
762 .IR /etc/filesystems ,
763 or, if that does not exist,
764 .IR /proc/filesystems .
765 All of the filesystem types listed there will be tried,
766 except for those that are labeled "nodev" (e.g.\&
767 .IR devpts ,
768 .I proc
769 and
770 .IR nfs ).
771 If
772 .I /etc/filesystems
773 ends in a line with a single *, mount will read
774 .I /proc/filesystems
775 afterwards. While trying, all filesystem types will be
776 mounted with the mount option \fBsilent\fR.
777 .sp
778 The
779 .B auto
780 type may be useful for user-mounted floppies.
781 Creating a file
782 .I /etc/filesystems
783 can be useful to change the probe order (e.g., to try vfat before msdos
784 or ext3 before ext2) or if you use a kernel module autoloader.
785 .sp
786 More than one type may be specified in a comma-separated
787 list, for option
788 .B \-t
789 as well as in an
790 .I /etc/fstab
791 entry. The list of filesystem types for option
792 .B \-t
793 can be prefixed with
794 .B no
795 to specify the filesystem types on which no action should be taken.
796 The prefix
797 .B no
798 has no effect when specified in an
799 .I /etc/fstab
800 entry.
801 .sp
802 The prefix
803 .B no
804 can be meaningful with the
805 .B \-a
806 option. For example, the command
807 .RS
808 .RS
809 .sp
810 .B "mount \-a \-t nomsdos,smbfs"
811 .sp
812 .RE
813 mounts all filesystems except those of type
814 .I msdos
815 and
816 .IR smbfs .
817 .sp
818 For most types all the
819 .B mount
820 program has to do is issue a simple
821 .BR mount (2)
822 system call, and no detailed knowledge of the filesystem type is required.
823 For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) an ad hoc code is
824 necessary. The nfs, nfs4, cifs, smbfs, and ncpfs filesystems
825 have a separate mount program. In order to make it possible to
826 treat all types in a uniform way, \fBmount\fR will execute the program
827 .BI /sbin/mount. type
828 (if that exists) when called with type
829 .IR type .
830 Since different versions of the
831 .B smbmount
832 program have different calling conventions,
833 .B /sbin/mount.smbfs
834 may have to be a shell script that sets up the desired call.
835 .RE
836 .TP
837 .BR \-U , " \-\-uuid " \fIuuid
838 Mount the partition that has the specified
839 .IR uuid .
840 .TP
841 .BR \-v , " \-\-verbose"
842 Verbose mode.
843 .TP
844 .BR \-w , " \-\-rw" , " \-\-read\-write"
845 Mount the filesystem read/write. The read-write is kernel default. A synonym is
846 .BR "\-o rw" .
847
848 Note that specify \fB\-w\fR on command line forces \fBmount\fR command
849 to never try read-only mount on write-protected devices. The default is
850 try read-only if the previous mount syscall with read-write flags failed.
851 .TP
852 .BR \-V , " \-\-version"
853 Display version information and exit.
854 .TP
855 .BR \-h , " \-\-help"
856 Display help text and exit.
857
858 .SH FILESYSTEM-INDEPENDENT MOUNT OPTIONS
859 Some of these options are only useful when they appear in the
860 .I /etc/fstab
861 file.
862
863 Some of these options could be enabled or disabled by default
864 in the system kernel. To check the current setting see the options
865 in /proc/mounts. Note that filesystems also have per-filesystem
866 specific default mount options (see for example \fBtune2fs \-l\fP
867 output for extN filesystems).
868
869 The following options apply to any filesystem that is being
870 mounted (but not every filesystem actually honors them \(en e.g.\&, the
871 .B sync
872 option today has an effect only for ext2, ext3, fat, vfat and ufs):
873
874 .TP
875 .B async
876 All I/O to the filesystem should be done asynchronously. (See also the
877 .B sync
878 option.)
879 .TP
880 .B atime
881 Do not use the \fBnoatime\fR feature, so the inode access time is controlled
882 by kernel defaults. See also the descriptions of the \fB\%relatime\fR and
883 .B strictatime
884 mount options.
885 .TP
886 .B noatime
887 Do not update inode access times on this filesystem (e.g.\& for faster
888 access on the news spool to speed up news servers). This works for all
889 inode types (directories too), so it implies \fB\%nodiratime\fR.
890 .TP
891 .B auto
892 Can be mounted with the
893 .B \-a
894 option.
895 .TP
896 .B noauto
897 Can only be mounted explicitly (i.e., the
898 .B \-a
899 option will not cause the filesystem to be mounted).
900 .TP
901 .na
902 .BR context=\fIcontext ", " fscontext=\fIcontext ", " defcontext=\fIcontext ", and " \%rootcontext=\fIcontext
903 .ad
904 The
905 .B context=
906 option is useful when mounting filesystems that do not support
907 extended attributes, such as a floppy or hard disk formatted with VFAT, or
908 systems that are not normally running under SELinux, such as an ext3 formatted
909 disk from a non-SELinux workstation. You can also use
910 .B context=
911 on filesystems you do not trust, such as a floppy. It also helps in compatibility with
912 xattr-supporting filesystems on earlier 2.4.<x> kernel versions. Even where
913 xattrs are supported, you can save time not having to label every file by
914 assigning the entire disk one security context.
915
916 A commonly used option for removable media is
917 .BR \%context="system_u:object_r:removable_t" .
918
919 Two other options are
920 .B fscontext=
921 and
922 .BR defcontext= ,
923 both of which are mutually exclusive of the context option. This means you
924 can use fscontext and defcontext with each other, but neither can be used with
925 context.
926
927 The
928 .B fscontext=
929 option works for all filesystems, regardless of their xattr
930 support. The fscontext option sets the overarching filesystem label to a
931 specific security context. This filesystem label is separate from the
932 individual labels on the files. It represents the entire filesystem for
933 certain kinds of permission checks, such as during mount or file creation.
934 Individual file labels are still obtained from the xattrs on the files
935 themselves. The context option actually sets the aggregate context that
936 fscontext provides, in addition to supplying the same label for individual
937 files.
938
939 You can set the default security context for unlabeled files using
940 .B defcontext=
941 option. This overrides the value set for unlabeled files in the policy and requires a
942 filesystem that supports xattr labeling.
943
944 The
945 .B rootcontext=
946 option allows you to explicitly label the root inode of a FS being mounted
947 before that FS or inode becomes visible to userspace. This was found to be
948 useful for things like stateless linux.
949
950 Note that the kernel rejects any remount request that includes the context
951 option, \fBeven\fP when unchanged from the current context.
952
953 .BR "Warning: the \fIcontext\fP value might contain commas" ,
954 in which case the value has to be properly quoted, otherwise
955 .BR mount (8)
956 will interpret the comma as a separator between mount options. Don't forget that
957 the shell strips off quotes and thus
958 .BR "double quoting is required" .
959 For example:
960 .RS
961 .RS
962 .sp
963 .nf
964 .B mount \-t tmpfs none /mnt \-o \e
965 .B \ \ 'context="system_u:object_r:tmp_t:s0:c127,c456",noexec'
966 .fi
967 .sp
968 .RE
969 For more details, see
970 .BR selinux (8).
971 .RE
972
973 .TP
974 .B defaults
975 Use the default options:
976 .BR rw ", " suid ", " dev ", " exec ", " auto ", " nouser ", and " async .
977
978 Note that the real set of all default mount options depends on kernel
979 and filesystem type. See the beginning of this section for more details.
980 .TP
981 .B dev
982 Interpret character or block special devices on the filesystem.
983 .TP
984 .B nodev
985 Do not interpret character or block special devices on the file
986 system.
987 .TP
988 .B diratime
989 Update directory inode access times on this filesystem. This is the default.
990 (This option is ignored when \fBnoatime\fR is set.)
991 .TP
992 .B nodiratime
993 Do not update directory inode access times on this filesystem.
994 (This option is implied when \fBnoatime\fR is set.)
995 .TP
996 .B dirsync
997 All directory updates within the filesystem should be done synchronously.
998 This affects the following system calls: creat, link, unlink, symlink,
999 mkdir, rmdir, mknod and rename.
1000 .TP
1001 .B exec
1002 Permit execution of binaries.
1003 .TP
1004 .B noexec
1005 Do not permit direct execution of any binaries on the mounted filesystem.
1006 .TP
1007 .B group
1008 Allow an ordinary user to mount the filesystem if one
1009 of that user's groups matches the group of the device.
1010 This option implies the options
1011 .BR nosuid " and " nodev
1012 (unless overridden by subsequent options, as in the option line
1013 .BR group,dev,suid ).
1014 .TP
1015 .B iversion
1016 Every time the inode is modified, the i_version field will be incremented.
1017 .TP
1018 .B noiversion
1019 Do not increment the i_version inode field.
1020 .TP
1021 .B mand
1022 Allow mandatory locks on this filesystem. See
1023 .BR fcntl (2).
1024 .TP
1025 .B nomand
1026 Do not allow mandatory locks on this filesystem.
1027 .TP
1028 .B _netdev
1029 The filesystem resides on a device that requires network access
1030 (used to prevent the system from attempting to mount these filesystems
1031 until the network has been enabled on the system).
1032 .TP
1033 .B nofail
1034 Do not report errors for this device if it does not exist.
1035 .TP
1036 .B relatime
1037 Update inode access times relative to modify or change time. Access
1038 time is only updated if the previous access time was earlier than the
1039 current modify or change time. (Similar to \fB\%noatime\fR, but it doesn't
1040 break \fBmutt\fR or other applications that need to know if a file has been
1041 read since the last time it was modified.)
1042
1043 Since Linux 2.6.30, the kernel defaults to the behavior provided by this
1044 option (unless
1045 .B \%noatime
1046 was specified), and the
1047 .B \%strictatime
1048 option is required to obtain traditional semantics. In addition, since Linux
1049 2.6.30, the file's last access time is always updated if it is more than 1
1050 day old.
1051 .TP
1052 .B norelatime
1053 Do not use the
1054 .B relatime
1055 feature. See also the
1056 .B strictatime
1057 mount option.
1058 .TP
1059 .B strictatime
1060 Allows to explicitly request full atime updates. This makes it
1061 possible for the kernel to default to
1062 .B \%relatime
1063 or
1064 .B \%noatime
1065 but still allow userspace to override it. For more details about the default
1066 system mount options see /proc/mounts.
1067 .TP
1068 .B nostrictatime
1069 Use the kernel's default behavior for inode access time updates.
1070 .TP
1071 .B lazytime
1072 Only update times (atime, mtime, ctime) on the in-memory version of the file inode.
1073
1074 This mount option significantly reduces writes to the inode table for
1075 workloads that perform frequent random writes to preallocated files.
1076
1077 The on-disk timestamps are updated only when:
1078 .sp
1079 .RS
1080 - the inode needs to be updated for some change unrelated to file timestamps
1081 .sp
1082 - the application employs
1083 .BR fsync (2),
1084 .BR syncfs (2),
1085 or
1086 .BR sync (2)
1087 .sp
1088 - an undeleted inode is evicted from memory
1089 .sp
1090 - more than 24 hours have passed since the i-node was written to disk.
1091 .RE
1092 .sp
1093 .TP
1094 .B nolazytime
1095 Do not use the lazytime feature.
1096 .TP
1097 .B suid
1098 Allow set-user-ID or set-group-ID bits to take
1099 effect.
1100 .TP
1101 .B nosuid
1102 Do not allow set-user-ID or set-group-ID bits to take
1103 effect.
1104 .TP
1105 .B silent
1106 Turn on the silent flag.
1107 .TP
1108 .B loud
1109 Turn off the silent flag.
1110 .TP
1111 .B owner
1112 Allow an ordinary user to mount the filesystem if that
1113 user is the owner of the device.
1114 This option implies the options
1115 .BR nosuid " and " nodev
1116 (unless overridden by subsequent options, as in the option line
1117 .BR owner,dev,suid ).
1118 .TP
1119 .B remount
1120 Attempt to remount an already-mounted filesystem. This is commonly
1121 used to change the mount flags for a filesystem, especially to make a
1122 readonly filesystem writable. It does not change device or mount point.
1123
1124 The remount operation together with the
1125 .B bind
1126 flag has special semantic. See above, the subsection \fBBind mounts\fR.
1127
1128 The remount functionality follows the standard way the mount command works
1129 with options from fstab. This means that \fBmount\fR does not
1130 read fstab (or mtab) only when both
1131 .I device
1132 and
1133 .I dir
1134 are specified.
1135 .sp
1136 .in +4
1137 .B "mount \-o remount,rw /dev/foo /dir"
1138 .in
1139 .sp
1140 After this call all old mount options are replaced and arbitrary stuff from
1141 fstab (or mtab) is ignored, except the loop= option which is internally
1142 generated and maintained by the mount command.
1143 .sp
1144 .in +4
1145 .B "mount \-o remount,rw /dir"
1146 .in
1147 .sp
1148 After this call, mount reads fstab and merges these options with
1149 the options from the command line (\fB\-o\fR).
1150 If no mountpoint is found in fstab, then a remount with unspecified source is
1151 allowed.
1152 .TP
1153 .B ro
1154 Mount the filesystem read-only.
1155 .TP
1156 .B rw
1157 Mount the filesystem read-write.
1158 .TP
1159 .B sync
1160 All I/O to the filesystem should be done synchronously. In the case of
1161 media with a limited number of write cycles
1162 (e.g.\& some flash drives), \fBsync\fR may cause life-cycle shortening.
1163 .TP
1164 .B user
1165 Allow an ordinary user to mount the filesystem.
1166 The name of the mounting user is written to the mtab file (or to the private
1167 libmount file in /run/mount on systems without a regular mtab) so that this
1168 same user can unmount the filesystem again.
1169 This option implies the options
1170 .BR noexec ", " nosuid ", and " nodev
1171 (unless overridden by subsequent options, as in the option line
1172 .BR user,exec,dev,suid ).
1173 .TP
1174 .B nouser
1175 Forbid an ordinary user to mount the filesystem.
1176 This is the default; it does not imply any other options.
1177 .TP
1178 .B users
1179 Allow any user to mount and to unmount the filesystem, even
1180 when some other ordinary user mounted it.
1181 This option implies the options
1182 .BR noexec ", " nosuid ", and " nodev
1183 (unless overridden by subsequent options, as in the option line
1184 .BR users,exec,dev,suid ).
1185 .TP
1186 .B X-*
1187 All options prefixed with "X-" are interpreted as comments or as userspace
1188 application-specific options. These options are not stored in the user space (e.g. mtab file),
1189 nor sent to the mount.\fItype\fR helpers nor to the
1190 .BR mount (2)
1191 system call. The suggested format is \fBX-\fIappname\fR.\fIoption\fR.
1192 .TP
1193 .B x-*
1194 The same as \fBX-*\fR options, but stored permanently in the user space. It
1195 means the options are also available for umount or another operations. Note
1196 that maintain mount options in user space is tricky, because it's necessary use
1197 libmount based tools and there is no guarantee that the options will be always
1198 available (for example after a move mount operation or in unshared namespace).
1199
1200 Note that before util-linux v2.30 the x-* options have not been maintained by
1201 libmount and stored in user space (functionality was the same as have X-* now),
1202 but due to growing number of use-cases (in initrd, systemd etc.) the
1203 functionality have been extended to keep existing fstab configurations usable
1204 without a change.
1205 .TP
1206 .BR X-mount.mkdir [ = \fImode\fR ]
1207 Allow to make a target directory (mountpoint). The optional argument
1208 .I mode
1209 specifies the filesystem access mode used for
1210 .BR mkdir (2)
1211 in octal notation. The default mode is 0755. This functionality is supported
1212 only for root users. The option is also supported as x-mount.mkdir, this notation
1213 is deprecated for mount.mkdir since v2.30.
1214
1215 .SH "FILESYSTEM-SPECIFIC MOUNT OPTIONS"
1216 You should consult the respective man page for the filesystem first.
1217 If you want to know what options the ext4 filesystem supports, then check the
1218 .BR ext4 (5)
1219 man page.
1220 If that doesn't exist, you can also check the corresponding mount page like
1221 .BR mount.cifs (8).
1222 Note that you might have to install the respective userland tools.
1223 .sp
1224 The following options apply only to certain filesystems.
1225 We sort them by filesystem. They all follow the
1226 .B \-o
1227 flag.
1228 .sp
1229 What options are supported depends a bit on the running kernel.
1230 More info may be found in the kernel source subdirectory
1231 .IR Documentation/filesystems .
1232
1233 .SS "Mount options for adfs"
1234 .TP
1235 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1236 Set the owner and group of the files in the filesystem (default: uid=gid=0).
1237 .TP
1238 \fBownmask=\fP\,\fIvalue\fP and \fBothmask=\fP\,\fIvalue\fP
1239 Set the permission mask for ADFS 'owner' permissions and 'other' permissions,
1240 respectively (default: 0700 and 0077, respectively).
1241 See also
1242 .IR /usr/src/linux/Documentation/filesystems/adfs.txt .
1243
1244 .SS "Mount options for affs"
1245 .TP
1246 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1247 Set the owner and group of the root of the filesystem (default: uid=gid=0,
1248 but with option
1249 .B uid
1250 or
1251 .B gid
1252 without specified value, the UID and GID of the current process are taken).
1253 .TP
1254 \fBsetuid=\fP\,\fIvalue\fP and \fBsetgid=\fP\,\fIvalue\fP
1255 Set the owner and group of all files.
1256 .TP
1257 .BI mode= value
1258 Set the mode of all files to
1259 .IR value " & 0777"
1260 disregarding the original permissions.
1261 Add search permission to directories that have read permission.
1262 The value is given in octal.
1263 .TP
1264 .B protect
1265 Do not allow any changes to the protection bits on the filesystem.
1266 .TP
1267 .B usemp
1268 Set UID and GID of the root of the filesystem to the UID and GID
1269 of the mount point upon the first sync or umount, and then
1270 clear this option. Strange...
1271 .TP
1272 .B verbose
1273 Print an informational message for each successful mount.
1274 .TP
1275 .BI prefix= string
1276 Prefix used before volume name, when following a link.
1277 .TP
1278 .BI volume= string
1279 Prefix (of length at most 30) used before '/' when following a symbolic link.
1280 .TP
1281 .BI reserved= value
1282 (Default: 2.) Number of unused blocks at the start of the device.
1283 .TP
1284 .BI root= value
1285 Give explicitly the location of the root block.
1286 .TP
1287 .BI bs= value
1288 Give blocksize. Allowed values are 512, 1024, 2048, 4096.
1289 .TP
1290 .BR grpquota | noquota | quota | usrquota
1291 These options are accepted but ignored.
1292 (However, quota utilities may react to such strings in
1293 .IR /etc/fstab .)
1294
1295 .SS "Mount options for debugfs"
1296 The debugfs filesystem is a pseudo filesystem, traditionally mounted on
1297 .IR /sys/kernel/debug .
1298 .\" or just /debug
1299 .\" present since 2.6.11
1300 As of kernel version 3.4, debugfs has the following options:
1301 .TP
1302 .BI uid= n ", gid=" n
1303 Set the owner and group of the mountpoint.
1304 .TP
1305 .BI mode= value
1306 Sets the mode of the mountpoint.
1307
1308 .SS "Mount options for devpts"
1309 The devpts filesystem is a pseudo filesystem, traditionally mounted on
1310 .IR /dev/pts .
1311 In order to acquire a pseudo terminal, a process opens
1312 .IR /dev/ptmx ;
1313 the number of the pseudo terminal is then made available to the process
1314 and the pseudo terminal slave can be accessed as
1315 .IR /dev/pts/ <number>.
1316 .TP
1317 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1318 This sets the owner or the group of newly created PTYs to
1319 the specified values. When nothing is specified, they will
1320 be set to the UID and GID of the creating process.
1321 For example, if there is a tty group with GID 5, then
1322 .B gid=5
1323 will cause newly created PTYs to belong to the tty group.
1324 .TP
1325 .BI mode= value
1326 Set the mode of newly created PTYs to the specified value.
1327 The default is 0600.
1328 A value of
1329 .B mode=620
1330 and
1331 .B gid=5
1332 makes "mesg y" the default on newly created PTYs.
1333 .TP
1334 \fBnewinstance
1335 Create a private instance of devpts filesystem, such that
1336 indices of ptys allocated in this new instance are
1337 independent of indices created in other instances of devpts.
1338
1339 All mounts of devpts without this
1340 .B newinstance
1341 option share the same set of pty indices (i.e legacy mode).
1342 Each mount of devpts with the
1343 .B newinstance
1344 option has a private set of pty indices.
1345
1346 This option is mainly used to support containers in the
1347 linux kernel. It is implemented in linux kernel versions
1348 starting with 2.6.29. Further, this mount option is valid
1349 only if CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the
1350 kernel configuration.
1351
1352 To use this option effectively,
1353 .I /dev/ptmx
1354 must be a symbolic link to
1355 .I pts/ptmx.
1356 See
1357 .I Documentation/filesystems/devpts.txt
1358 in the linux kernel source tree for details.
1359 .TP
1360 .BI ptmxmode= value
1361
1362 Set the mode for the new
1363 .I ptmx
1364 device node in the devpts filesystem.
1365
1366 With the support for multiple instances of devpts (see
1367 .B newinstance
1368 option above), each instance has a private
1369 .I ptmx
1370 node in the root of the devpts filesystem (typically
1371 .IR /dev/pts/ptmx ).
1372
1373 For compatibility with older versions of the kernel, the
1374 default mode of the new
1375 .I ptmx
1376 node is 0000.
1377 .BI ptmxmode= value
1378 specifies a more useful mode for the
1379 .I ptmx
1380 node and is highly recommended when the
1381 .B newinstance
1382 option is specified.
1383
1384 This option is only implemented in linux kernel versions
1385 starting with 2.6.29. Further, this option is valid only if
1386 CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the kernel
1387 configuration.
1388
1389 .SS "Mount options for fat"
1390 (Note:
1391 .I fat
1392 is not a separate filesystem, but a common part of the
1393 .IR msdos ,
1394 .I umsdos
1395 and
1396 .I vfat
1397 filesystems.)
1398 .TP
1399 .BR blocksize= { 512 | 1024 | 2048 }
1400 Set blocksize (default 512). This option is obsolete.
1401 .TP
1402 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1403 Set the owner and group of all files.
1404 (Default: the UID and GID of the current process.)
1405 .TP
1406 .BI umask= value
1407 Set the umask (the bitmask of the permissions that are
1408 .B not
1409 present). The default is the umask of the current process.
1410 The value is given in octal.
1411 .TP
1412 .BI dmask= value
1413 Set the umask applied to directories only.
1414 The default is the umask of the current process.
1415 The value is given in octal.
1416 .TP
1417 .BI fmask= value
1418 Set the umask applied to regular files only.
1419 The default is the umask of the current process.
1420 The value is given in octal.
1421 .TP
1422 .BI allow_utime= value
1423 This option controls the permission check of mtime/atime.
1424 .RS
1425 .TP
1426 .B 20
1427 If current process is in group of file's group ID, you can change timestamp.
1428 .TP
1429 .B 2
1430 Other users can change timestamp.
1431 .PP
1432 The default is set from `dmask' option. (If the directory is writable,
1433 .BR utime (2)
1434 is also allowed. I.e.\& \s+3~\s0dmask & 022)
1435
1436 Normally
1437 .BR utime (2)
1438 checks current process is owner of the file, or it has
1439 CAP_FOWNER capability. But FAT filesystem doesn't have UID/GID on disk, so
1440 normal check is too inflexible. With this option you can relax it.
1441 .RE
1442 .TP
1443 .BI check= value
1444 Three different levels of pickyness can be chosen:
1445 .RS
1446 .TP
1447 .BR r [ elaxed ]
1448 Upper and lower case are accepted and equivalent, long name parts are
1449 truncated (e.g.\&
1450 .I verylongname.foobar
1451 becomes
1452 .IR verylong.foo ),
1453 leading and embedded spaces are accepted in each name part (name and extension).
1454 .TP
1455 .BR n [ ormal ]
1456 Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are
1457 rejected. This is the default.
1458 .TP
1459 .BR s [ trict ]
1460 Like "normal", but names that contain long parts or special characters
1461 that are sometimes used on Linux but are not accepted by MS-DOS
1462 (+, =, etc.) are rejected.
1463 .RE
1464 .TP
1465 .BI codepage= value
1466 Sets the codepage for converting to shortname characters on FAT
1467 and VFAT filesystems. By default, codepage 437 is used.
1468 .TP
1469 .BI conv= mode
1470 This option is obsolete and may fail or being ignored.
1471 .TP
1472 .BI cvf_format= module
1473 Forces the driver to use the CVF (Compressed Volume File) module
1474 .RI cvf_ module
1475 instead of auto-detection. If the kernel supports kmod, the
1476 cvf_format=xxx option also controls on-demand CVF module loading.
1477 This option is obsolete.
1478 .TP
1479 .BI cvf_option= option
1480 Option passed to the CVF module. This option is obsolete.
1481 .TP
1482 .B debug
1483 Turn on the
1484 .I debug
1485 flag. A version string and a list of filesystem parameters will be
1486 printed (these data are also printed if the parameters appear to be
1487 inconsistent).
1488 .TP
1489 .B discard
1490 If set, causes discard/TRIM commands to be issued to the block device
1491 when blocks are freed. This is useful for SSD devices and
1492 sparse/thinly-provisioned LUNs.
1493 .TP
1494 .B dos1xfloppy
1495 If set, use a fallback default BIOS Parameter Block configuration, determined
1496 by backing device size. These static parameters match defaults assumed by DOS
1497 1.x for 160 kiB, 180 kiB, 320 kiB, and 360 kiB floppies and floppy images.
1498 .TP
1499 .BR errors= { panic | continue | remount-ro }
1500 Specify FAT behavior on critical errors: panic, continue without doing
1501 anything, or remount the partition in read-only mode (default behavior).
1502 .TP
1503 .BR fat= { 12 | 16 | 32 }
1504 Specify a 12, 16 or 32 bit fat. This overrides
1505 the automatic FAT type detection routine. Use with caution!
1506 .TP
1507 .BI iocharset= value
1508 Character set to use for converting between 8 bit characters
1509 and 16 bit Unicode characters. The default is iso8859-1.
1510 Long filenames are stored on disk in Unicode format.
1511 .TP
1512 .BR nfs= { stale_rw | nostale_ro }
1513 Enable this only if you want to export the FAT filesystem over NFS.
1514
1515 .BR stale_rw :
1516 This option maintains an index (cache) of directory inodes which is used by the
1517 nfs-related code to improve look-ups. Full file operations (read/write) over
1518 NFS are supported but with cache eviction at NFS server, this could result in
1519 spurious
1520 .B ESTALE
1521 errors.
1522
1523 .BR nostale_ro :
1524 This option bases the inode number and file handle
1525 on the on-disk location of a file in the FAT directory entry.
1526 This ensures that
1527 .B ESTALE
1528 will not be returned after a file is
1529 evicted from the inode cache. However, it means that operations
1530 such as rename, create and unlink could cause file handles that
1531 previously pointed at one file to point at a different file,
1532 potentially causing data corruption. For this reason, this
1533 option also mounts the filesystem readonly.
1534
1535 To maintain backward compatibility, '-o nfs' is also accepted,
1536 defaulting to
1537 .BR stale_rw .
1538 .TP
1539 .BI tz=UTC
1540 This option disables the conversion of timestamps
1541 between local time (as used by Windows on FAT) and UTC
1542 (which Linux uses internally). This is particularly
1543 useful when mounting devices (like digital cameras)
1544 that are set to UTC in order to avoid the pitfalls of
1545 local time.
1546 .TP
1547 .BI time_offset= minutes
1548 Set offset for conversion of timestamps from local time used by FAT to UTC.
1549 I.e.,
1550 .I minutes
1551 will be subtracted from each timestamp to convert it to UTC used
1552 internally by Linux. This is useful when the time zone set in the kernel via
1553 .BR settimeofday (2)
1554 is not the time zone used by the filesystem. Note
1555 that this option still does not provide correct time stamps in all cases in
1556 presence of DST - time stamps in a different DST setting will be off by one
1557 hour.
1558 .TP
1559 .B quiet
1560 Turn on the
1561 .I quiet
1562 flag. Attempts to chown or chmod files do not return errors,
1563 although they fail. Use with caution!
1564 .TP
1565 .B rodir
1566 FAT has the ATTR_RO (read-only) attribute. On Windows, the ATTR_RO of the
1567 directory will just be ignored, and is used only by applications as a flag
1568 (e.g.\& it's set for the customized folder).
1569
1570 If you want to use ATTR_RO as read-only flag even for the directory, set this
1571 option.
1572 .TP
1573 .B showexec
1574 If set, the execute permission bits of the file will be allowed only if
1575 the extension part of the name is \&.EXE, \&.COM, or \&.BAT. Not set by default.
1576 .TP
1577 .B sys_immutable
1578 If set, ATTR_SYS attribute on FAT is handled as IMMUTABLE flag on Linux.
1579 Not set by default.
1580 .TP
1581 .B flush
1582 If set, the filesystem will try to flush to disk more early than normal.
1583 Not set by default.
1584 .TP
1585 .B usefree
1586 Use the "free clusters" value stored on FSINFO. It'll
1587 be used to determine number of free clusters without
1588 scanning disk. But it's not used by default, because
1589 recent Windows don't update it correctly in some
1590 case. If you are sure the "free clusters" on FSINFO is
1591 correct, by this option you can avoid scanning disk.
1592 .TP
1593 .BR dots ", " nodots ", " dotsOK= [ yes | no ]
1594 Various misguided attempts to force Unix or DOS conventions
1595 onto a FAT filesystem.
1596
1597 .SS "Mount options for hfs"
1598 .TP
1599 .BI creator= cccc ", type=" cccc
1600 Set the creator/type values as shown by the MacOS finder
1601 used for creating new files. Default values: '????'.
1602 .TP
1603 .BI uid= n ", gid=" n
1604 Set the owner and group of all files.
1605 (Default: the UID and GID of the current process.)
1606 .TP
1607 .BI dir_umask= n ", file_umask=" n ", umask=" n
1608 Set the umask used for all directories, all regular files, or all
1609 files and directories. Defaults to the umask of the current process.
1610 .TP
1611 .BI session= n
1612 Select the CDROM session to mount.
1613 Defaults to leaving that decision to the CDROM driver.
1614 This option will fail with anything but a CDROM as underlying device.
1615 .TP
1616 .BI part= n
1617 Select partition number n from the device.
1618 Only makes sense for CDROMs.
1619 Defaults to not parsing the partition table at all.
1620 .TP
1621 .B quiet
1622 Don't complain about invalid mount options.
1623
1624 .SS "Mount options for hpfs"
1625 .TP
1626 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1627 Set the owner and group of all files. (Default: the UID and GID
1628 of the current process.)
1629 .TP
1630 .BI umask= value
1631 Set the umask (the bitmask of the permissions that are
1632 .B not
1633 present). The default is the umask of the current process.
1634 The value is given in octal.
1635 .TP
1636 .BR case= { lower | asis }
1637 Convert all files names to lower case, or leave them.
1638 (Default:
1639 .BR case=lower .)
1640 .TP
1641 .BI conv= mode
1642 This option is obsolete and may fail or being ignored.
1643 .TP
1644 .B nocheck
1645 Do not abort mounting when certain consistency checks fail.
1646
1647 .SS "Mount options for iso9660"
1648 ISO 9660 is a standard describing a filesystem structure to be used
1649 on CD-ROMs. (This filesystem type is also seen on some DVDs. See also the
1650 .I udf
1651 filesystem.)
1652
1653 Normal
1654 .I iso9660
1655 filenames appear in a 8.3 format (i.e., DOS-like restrictions on filename
1656 length), and in addition all characters are in upper case. Also there is
1657 no field for file ownership, protection, number of links, provision for
1658 block/character devices, etc.
1659
1660 Rock Ridge is an extension to iso9660 that provides all of these UNIX-like
1661 features. Basically there are extensions to each directory record that
1662 supply all of the additional information, and when Rock Ridge is in use,
1663 the filesystem is indistinguishable from a normal UNIX filesystem (except
1664 that it is read-only, of course).
1665 .TP
1666 .B norock
1667 Disable the use of Rock Ridge extensions, even if available. Cf.\&
1668 .BR map .
1669 .TP
1670 .B nojoliet
1671 Disable the use of Microsoft Joliet extensions, even if available. Cf.\&
1672 .BR map .
1673 .TP
1674 .BR check= { r [ elaxed ]| s [ trict ]}
1675 With
1676 .BR check=relaxed ,
1677 a filename is first converted to lower case before doing the lookup.
1678 This is probably only meaningful together with
1679 .B norock
1680 and
1681 .BR map=normal .
1682 (Default:
1683 .BR check=strict .)
1684 .TP
1685 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1686 Give all files in the filesystem the indicated user or group id,
1687 possibly overriding the information found in the Rock Ridge extensions.
1688 (Default:
1689 .BR uid=0,gid=0 .)
1690 .TP
1691 .BR map= { n [ ormal ]| o [ ff ]| a [ corn ]}
1692 For non-Rock Ridge volumes, normal name translation maps upper
1693 to lower case ASCII, drops a trailing `;1', and converts `;' to `.'.
1694 With
1695 .B map=off
1696 no name translation is done. See
1697 .BR norock .
1698 (Default:
1699 .BR map=normal .)
1700 .B map=acorn
1701 is like
1702 .B map=normal
1703 but also apply Acorn extensions if present.
1704 .TP
1705 .BI mode= value
1706 For non-Rock Ridge volumes, give all files the indicated mode.
1707 (Default: read and execute permission for everybody.)
1708 Octal mode values require a leading 0.
1709 .TP
1710 .B unhide
1711 Also show hidden and associated files.
1712 (If the ordinary files and the associated or hidden files have
1713 the same filenames, this may make the ordinary files inaccessible.)
1714 .TP
1715 .BR block= { 512 | 1024 | 2048 }
1716 Set the block size to the indicated value.
1717 (Default:
1718 .BR block=1024 .)
1719 .TP
1720 .BI conv= mode
1721 This option is obsolete and may fail or being ignored.
1722 .TP
1723 .B cruft
1724 If the high byte of the file length contains other garbage,
1725 set this mount option to ignore the high order bits of the file length.
1726 This implies that a file cannot be larger than 16\ MB.
1727 .TP
1728 .BI session= x
1729 Select number of session on multisession CD.
1730 .TP
1731 .BI sbsector= xxx
1732 Session begins from sector xxx.
1733 .LP
1734 The following options are the same as for vfat and specifying them only makes
1735 sense when using discs encoded using Microsoft's Joliet extensions.
1736 .TP
1737 .BI iocharset= value
1738 Character set to use for converting 16 bit Unicode characters on CD
1739 to 8 bit characters. The default is iso8859-1.
1740 .TP
1741 .B utf8
1742 Convert 16 bit Unicode characters on CD to UTF-8.
1743
1744 .SS "Mount options for jfs"
1745 .TP
1746 .BI iocharset= name
1747 Character set to use for converting from Unicode to ASCII. The default is
1748 to do no conversion. Use
1749 .B iocharset=utf8
1750 for UTF8 translations. This requires CONFIG_NLS_UTF8 to be set in
1751 the kernel
1752 .I ".config"
1753 file.
1754 .TP
1755 .BI resize= value
1756 Resize the volume to
1757 .I value
1758 blocks. JFS only supports growing a volume, not shrinking it. This option
1759 is only valid during a remount, when the volume is mounted read-write. The
1760 .B resize
1761 keyword with no value will grow the volume to the full size of the partition.
1762 .TP
1763 .B nointegrity
1764 Do not write to the journal. The primary use of this option is to allow
1765 for higher performance when restoring a volume from backup media. The
1766 integrity of the volume is not guaranteed if the system abnormally ends.
1767 .TP
1768 .B integrity
1769 Default. Commit metadata changes to the journal. Use this option to remount
1770 a volume where the
1771 .B nointegrity
1772 option was previously specified in order to restore normal behavior.
1773 .TP
1774 .BR errors= { continue | remount-ro | panic }
1775 Define the behavior when an error is encountered.
1776 (Either ignore errors and just mark the filesystem erroneous and continue,
1777 or remount the filesystem read-only, or panic and halt the system.)
1778 .TP
1779 .BR noquota | quota | usrquota | grpquota
1780 These options are accepted but ignored.
1781
1782 .SS "Mount options for msdos"
1783 See mount options for fat.
1784 If the
1785 .I msdos
1786 filesystem detects an inconsistency, it reports an error and sets the file
1787 system read-only. The filesystem can be made writable again by remounting
1788 it.
1789
1790 .SS "Mount options for ncpfs"
1791 Just like
1792 .IR nfs ", the " ncpfs
1793 implementation expects a binary argument (a
1794 .IR "struct ncp_mount_data" )
1795 to the mount system call. This argument is constructed by
1796 .BR ncpmount (8)
1797 and the current version of
1798 .B mount
1799 (2.12) does not know anything about ncpfs.
1800
1801 .SS "Mount options for ntfs"
1802 .TP
1803 .BI iocharset= name
1804 Character set to use when returning file names.
1805 Unlike VFAT, NTFS suppresses names that contain
1806 nonconvertible characters. Deprecated.
1807 .TP
1808 .BI nls= name
1809 New name for the option earlier called
1810 .IR iocharset .
1811 .TP
1812 .B utf8
1813 Use UTF-8 for converting file names.
1814 .TP
1815 .BR uni_xlate= { 0 | 1 | 2 }
1816 For 0 (or `no' or `false'), do not use escape sequences
1817 for unknown Unicode characters.
1818 For 1 (or `yes' or `true') or 2, use vfat-style 4-byte escape sequences
1819 starting with ":". Here 2 give a little-endian encoding
1820 and 1 a byteswapped bigendian encoding.
1821 .TP
1822 .B posix=[0|1]
1823 If enabled (posix=1), the filesystem distinguishes between
1824 upper and lower case. The 8.3 alias names are presented as
1825 hard links instead of being suppressed. This option is obsolete.
1826 .TP
1827 \fBuid=\fP\,\fIvalue\fP, \fBgid=\fP\,\fIvalue\fP and \fBumask=\fP\,\fIvalue\fP
1828 Set the file permission on the filesystem.
1829 The umask value is given in octal.
1830 By default, the files are owned by root and not readable by somebody else.
1831
1832 .SS "Mount options for overlay"
1833 Since Linux 3.18 the overlay pseudo filesystem implements a union mount for
1834 other filesystems.
1835
1836 An overlay filesystem combines two filesystems - an \fBupper\fR filesystem and
1837 a \fBlower\fR filesystem. When a name exists in both filesystems, the object
1838 in the upper filesystem is visible while the object in the lower filesystem is
1839 either hidden or, in the case of directories, merged with the upper object.
1840
1841 The lower filesystem can be any filesystem supported by Linux and does not need
1842 to be writable. The lower filesystem can even be another overlayfs. The upper
1843 filesystem will normally be writable and if it is it must support the creation
1844 of trusted.* extended attributes, and must provide a valid d_type in readdir
1845 responses, so NFS is not suitable.
1846
1847 A read-only overlay of two read-only filesystems may use any filesystem type.
1848 The options \fBlowerdir\fR and \fBupperdir\fR are combined into a merged
1849 directory by using:
1850
1851 .RS
1852 .br
1853 .nf
1854 .B "mount \-t overlay overlay \e"
1855 .B " \-olowerdir=/lower,upperdir=/upper,workdir=/work /merged"
1856 .fi
1857 .br
1858 .RE
1859
1860 .TP
1861 .BI lowerdir= directory
1862 Any filesystem, does not need to be on a writable filesystem.
1863 .TP
1864 .BI upperdir= directory
1865 The upperdir is normally on a writable filesystem.
1866 .TP
1867 .BI workdir= directory
1868 The workdir needs to be an empty directory on the same filesystem as upperdir.
1869
1870 .SS "Mount options for reiserfs"
1871 Reiserfs is a journaling filesystem.
1872 .TP
1873 .B conv
1874 Instructs version 3.6 reiserfs software to mount a version 3.5 filesystem,
1875 using the 3.6 format for newly created objects. This filesystem will no
1876 longer be compatible with reiserfs 3.5 tools.
1877 .TP
1878 .BR hash= { rupasov | tea | r5 | detect }
1879 Choose which hash function reiserfs will use to find files within directories.
1880 .RS
1881 .TP
1882 .B rupasov
1883 A hash invented by Yury Yu.\& Rupasov. It is fast and preserves locality,
1884 mapping lexicographically close file names to close hash values.
1885 This option should not be used, as it causes a high probability of hash
1886 collisions.
1887 .TP
1888 .B tea
1889 A Davis-Meyer function implemented by Jeremy Fitzhardinge.
1890 It uses hash permuting bits in the name. It gets high randomness
1891 and, therefore, low probability of hash collisions at some CPU cost.
1892 This may be used if EHASHCOLLISION errors are experienced with the r5 hash.
1893 .TP
1894 .B r5
1895 A modified version of the rupasov hash. It is used by default and is
1896 the best choice unless the filesystem has huge directories and
1897 unusual file-name patterns.
1898 .TP
1899 .B detect
1900 Instructs
1901 .I mount
1902 to detect which hash function is in use by examining
1903 the filesystem being mounted, and to write this information into
1904 the reiserfs superblock. This is only useful on the first mount of
1905 an old format filesystem.
1906 .RE
1907 .TP
1908 .B hashed_relocation
1909 Tunes the block allocator. This may provide performance improvements
1910 in some situations.
1911 .TP
1912 .B no_unhashed_relocation
1913 Tunes the block allocator. This may provide performance improvements
1914 in some situations.
1915 .TP
1916 .B noborder
1917 Disable the border allocator algorithm invented by Yury Yu.\& Rupasov.
1918 This may provide performance improvements in some situations.
1919 .TP
1920 .B nolog
1921 Disable journaling. This will provide slight performance improvements in
1922 some situations at the cost of losing reiserfs's fast recovery from crashes.
1923 Even with this option turned on, reiserfs still performs all journaling
1924 operations, save for actual writes into its journaling area. Implementation
1925 of
1926 .I nolog
1927 is a work in progress.
1928 .TP
1929 .B notail
1930 By default, reiserfs stores small files and `file tails' directly into its
1931 tree. This confuses some utilities such as
1932 .BR LILO (8).
1933 This option is used to disable packing of files into the tree.
1934 .TP
1935 .B replayonly
1936 Replay the transactions which are in the journal, but do not actually
1937 mount the filesystem. Mainly used by
1938 .IR reiserfsck .
1939 .TP
1940 .BI resize= number
1941 A remount option which permits online expansion of reiserfs partitions.
1942 Instructs reiserfs to assume that the device has
1943 .I number
1944 blocks.
1945 This option is designed for use with devices which are under logical
1946 volume management (LVM).
1947 There is a special
1948 .I resizer
1949 utility which can be obtained from
1950 .IR ftp://ftp.namesys.com/pub/reiserfsprogs .
1951 .TP
1952 .B user_xattr
1953 Enable Extended User Attributes. See the
1954 .BR attr (5)
1955 manual page.
1956 .TP
1957 .B acl
1958 Enable POSIX Access Control Lists. See the
1959 .BR acl (5)
1960 manual page.
1961 .TP
1962 .BR barrier=none " / " barrier=flush "
1963 This disables / enables the use of write barriers in the journaling code.
1964 barrier=none disables, barrier=flush enables (default). This also requires an
1965 IO stack which can support barriers, and if reiserfs gets an error on a barrier
1966 write, it will disable barriers again with a warning. Write barriers enforce
1967 proper on-disk ordering of journal commits, making volatile disk write caches
1968 safe to use, at some performance penalty. If your disks are battery-backed in
1969 one way or another, disabling barriers may safely improve performance.
1970
1971 .SS "Mount options for ubifs"
1972 UBIFS is a flash filesystem which works on top of UBI volumes. Note that
1973 \fBatime\fR is not supported and is always turned off.
1974 .TP
1975 The device name may be specified as
1976 .RS
1977 .B ubiX_Y
1978 UBI device number
1979 .BR X ,
1980 volume number
1981 .B Y
1982 .TP
1983 .B ubiY
1984 UBI device number
1985 .BR 0 ,
1986 volume number
1987 .B Y
1988 .TP
1989 .B ubiX:NAME
1990 UBI device number
1991 .BR X ,
1992 volume with name
1993 .B NAME
1994 .TP
1995 .B ubi:NAME
1996 UBI device number
1997 .BR 0 ,
1998 volume with name
1999 .B NAME
2000 .RE
2001 Alternative
2002 .B !
2003 separator may be used instead of
2004 .BR : .
2005 .TP
2006 The following mount options are available:
2007 .TP
2008 .B bulk_read
2009 Enable bulk-read. VFS read-ahead is disabled because it slows down the file
2010 system. Bulk-Read is an internal optimization. Some flashes may read faster if
2011 the data are read at one go, rather than at several read requests. For
2012 example, OneNAND can do "read-while-load" if it reads more than one NAND page.
2013 .TP
2014 .B no_bulk_read
2015 Do not bulk-read. This is the default.
2016 .TP
2017 .B chk_data_crc
2018 Check data CRC-32 checksums. This is the default.
2019 .TP
2020 .BR no_chk_data_crc .
2021 Do not check data CRC-32 checksums. With this option, the filesystem does not
2022 check CRC-32 checksum for data, but it does check it for the internal indexing
2023 information. This option only affects reading, not writing. CRC-32 is always
2024 calculated when writing the data.
2025 .TP
2026 .BR compr= { none | lzo | zlib }
2027 Select the default compressor which is used when new files are written. It is
2028 still possible to read compressed files if mounted with the
2029 .B none
2030 option.
2031
2032 .SS "Mount options for udf"
2033 udf is the "Universal Disk Format" filesystem defined by the Optical
2034 Storage Technology Association, and is often used for DVD-ROM.
2035 See also
2036 .IR iso9660 .
2037 .TP
2038 .B gid=
2039 Set the default group.
2040 .TP
2041 .B umask=
2042 Set the default umask.
2043 The value is given in octal.
2044 .TP
2045 .B uid=
2046 Set the default user.
2047 .TP
2048 .B unhide
2049 Show otherwise hidden files.
2050 .TP
2051 .B undelete
2052 Show deleted files in lists.
2053 .TP
2054 .B nostrict
2055 Unset strict conformance.
2056 .\" .TP
2057 .\" .B utf8
2058 .\" (unused).
2059 .TP
2060 .B iocharset
2061 Set the NLS character set.
2062 .TP
2063 .B bs=
2064 Set the block size. (May not work unless 2048.)
2065 .TP
2066 .B novrs
2067 Skip volume sequence recognition.
2068 .TP
2069 .B session=
2070 Set the CDROM session counting from 0. Default: last session.
2071 .TP
2072 .B anchor=
2073 Override standard anchor location. Default: 256.
2074 .TP
2075 .B volume=
2076 Override the VolumeDesc location. (unused)
2077 .TP
2078 .B partition=
2079 Override the PartitionDesc location. (unused)
2080 .TP
2081 .B lastblock=
2082 Set the last block of the filesystem.
2083 .TP
2084 .B fileset=
2085 Override the fileset block location. (unused)
2086 .TP
2087 .B rootdir=
2088 Override the root directory location. (unused)
2089
2090 .SS "Mount options for ufs"
2091 .TP
2092 .BI ufstype= value
2093 UFS is a filesystem widely used in different operating systems.
2094 The problem are differences among implementations. Features of some
2095 implementations are undocumented, so its hard to recognize the
2096 type of ufs automatically.
2097 That's why the user must specify the type of ufs by mount option.
2098 Possible values are:
2099 .RS
2100 .TP
2101 .B old
2102 Old format of ufs, this is the default, read only.
2103 (Don't forget to give the \-r option.)
2104 .TP
2105 .B 44bsd
2106 For filesystems created by a BSD-like system (NetBSD, FreeBSD, OpenBSD).
2107 .TP
2108 .B ufs2
2109 Used in FreeBSD 5.x supported as read-write.
2110 .TP
2111 .B 5xbsd
2112 Synonym for ufs2.
2113 .TP
2114 .B sun
2115 For filesystems created by SunOS or Solaris on Sparc.
2116 .TP
2117 .B sunx86
2118 For filesystems created by Solaris on x86.
2119 .TP
2120 .B hp
2121 For filesystems created by HP-UX, read-only.
2122 .TP
2123 .B nextstep
2124 For filesystems created by NeXTStep (on NeXT station) (currently read only).
2125 .TP
2126 .B nextstep-cd
2127 For NextStep CDROMs (block_size == 2048), read-only.
2128 .TP
2129 .B openstep
2130 For filesystems created by OpenStep (currently read only).
2131 The same filesystem type is also used by Mac OS X.
2132 .RE
2133
2134 .TP
2135 .BI onerror= value
2136 Set behavior on error:
2137 .RS
2138 .TP
2139 .B panic
2140 If an error is encountered, cause a kernel panic.
2141 .TP
2142 .RB [ lock | umount | repair ]
2143 These mount options don't do anything at present;
2144 when an error is encountered only a console message is printed.
2145 .RE
2146
2147 .SS "Mount options for umsdos"
2148 See mount options for msdos.
2149 The
2150 .B dotsOK
2151 option is explicitly killed by
2152 .IR umsdos .
2153
2154 .SS "Mount options for vfat"
2155 First of all, the mount options for
2156 .I fat
2157 are recognized.
2158 The
2159 .B dotsOK
2160 option is explicitly killed by
2161 .IR vfat .
2162 Furthermore, there are
2163 .TP
2164 .B uni_xlate
2165 Translate unhandled Unicode characters to special escaped sequences.
2166 This lets you backup and restore filenames that are created with any
2167 Unicode characters. Without this option, a '?' is used when no
2168 translation is possible. The escape character is ':' because it is
2169 otherwise invalid on the vfat filesystem. The escape sequence
2170 that gets used, where u is the Unicode character,
2171 is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
2172 .TP
2173 .B posix
2174 Allow two files with names that only differ in case.
2175 This option is obsolete.
2176 .TP
2177 .B nonumtail
2178 First try to make a short name without sequence number,
2179 before trying
2180 .IR name\s+3~\s0num.ext .
2181 .TP
2182 .B utf8
2183 UTF8 is the filesystem safe 8-bit encoding of Unicode that is used by the
2184 console. It can be enabled for the filesystem with this option or disabled
2185 with utf8=0, utf8=no or utf8=false. If `uni_xlate' gets set, UTF8 gets
2186 disabled.
2187 .TP
2188 .BI shortname= mode
2189 Defines the behavior for creation and display of filenames which fit into
2190 8.3 characters. If a long name for a file exists, it will always be the
2191 preferred one for display. There are four \fImode\fRs:
2192 .RS
2193 .TP
2194 .B lower
2195 Force the short name to lower case upon display; store a long name when
2196 the short name is not all upper case.
2197 .TP
2198 .B win95
2199 Force the short name to upper case upon display; store a long name when
2200 the short name is not all upper case.
2201 .TP
2202 .B winnt
2203 Display the short name as is; store a long name when the short name is
2204 not all lower case or all upper case.
2205 .TP
2206 .B mixed
2207 Display the short name as is; store a long name when the short name is not
2208 all upper case. This mode is the default since Linux 2.6.32.
2209 .RE
2210
2211 .SS "Mount options for usbfs"
2212 .TP
2213 \fBdevuid=\fP\,\fIuid\fP and \fBdevgid=\fP\,\fIgid\fP and \fBdevmode=\fP\,\fImode\fP
2214 Set the owner and group and mode of the device files in the usbfs filesystem
2215 (default: uid=gid=0, mode=0644). The mode is given in octal.
2216 .TP
2217 \fBbusuid=\fP\,\fIuid\fP and \fBbusgid=\fP\,\fIgid\fP and \fBbusmode=\fP\,\fImode\fP
2218 Set the owner and group and mode of the bus directories in the usbfs
2219 filesystem (default: uid=gid=0, mode=0555). The mode is given in octal.
2220 .TP
2221 \fBlistuid=\fP\,\fIuid\fP and \fBlistgid=\fP\,\fIgid\fP and \fBlistmode=\fP\,\fImode\fP
2222 Set the owner and group and mode of the file
2223 .I devices
2224 (default: uid=gid=0, mode=0444). The mode is given in octal.
2225
2226 .SH "THE LOOP DEVICE"
2227 One further possible type is a mount via the loop device. For example,
2228 the command
2229 .RS
2230 .sp
2231 .B "mount /tmp/disk.img /mnt \-t vfat \-o loop=/dev/loop3"
2232 .sp
2233 .RE
2234 will set up the loop device
2235 .I /dev/loop3
2236 to correspond to the file
2237 .IR /tmp/disk.img ,
2238 and then mount this device on
2239 .IR /mnt .
2240
2241 If no explicit loop device is mentioned
2242 (but just an option `\fB\-o loop\fP' is given), then
2243 .B mount
2244 will try to find some unused loop device and use that, for example
2245 .RS
2246 .sp
2247 .B "mount /tmp/disk.img /mnt \-o loop"
2248 .sp
2249 .RE
2250 The mount command
2251 .B automatically
2252 creates a loop device from a regular file if a filesystem type is
2253 not specified or the filesystem is known for libblkid, for example:
2254 .RS
2255 .sp
2256 .B "mount /tmp/disk.img /mnt"
2257 .sp
2258 .B "mount \-t ext3 /tmp/disk.img /mnt"
2259 .sp
2260 .RE
2261 This type of mount knows about three options, namely
2262 .BR loop ", " offset " and " sizelimit ,
2263 that are really options to
2264 .BR \%losetup (8).
2265 (These options can be used in addition to those specific
2266 to the filesystem type.)
2267
2268 Since Linux 2.6.25 auto-destruction of loop devices is supported,
2269 meaning that any loop device allocated by
2270 .B mount
2271 will be freed by
2272 .B umount
2273 independently of
2274 .IR /etc/mtab .
2275
2276 You can also free a loop device by hand, using
2277 .BR "losetup \-d " or " umount \-d" .
2278
2279 Since util-linux v2.29 mount command re-uses the loop device rather than
2280 initialize a new device if the same backing file is already used for some loop
2281 device with the same offset and sizelimit. This is necessary to avoid
2282 a filesystem corruption.
2283
2284 .SH RETURN CODES
2285 .B mount
2286 has the following return codes (the bits can be ORed):
2287 .TP
2288 .B 0
2289 success
2290 .TP
2291 .B 1
2292 incorrect invocation or permissions
2293 .TP
2294 .B 2
2295 system error (out of memory, cannot fork, no more loop devices)
2296 .TP
2297 .B 4
2298 internal
2299 .B mount
2300 bug
2301 .TP
2302 .B 8
2303 user interrupt
2304 .TP
2305 .B 16
2306 problems writing or locking /etc/mtab
2307 .TP
2308 .B 32
2309 mount failure
2310 .TP
2311 .B 64
2312 some mount succeeded
2313 .RE
2314
2315 The command \fBmount \-a\fR returns 0 (all succeeded), 32 (all failed), or 64 (some
2316 failed, some succeeded).
2317
2318 .SH "EXTERNAL HELPERS"
2319 The syntax of external mount helpers is:
2320 .sp
2321 .in +4
2322 .BI /sbin/mount. suffix
2323 .I spec dir
2324 .RB [ \-sfnv ]
2325 .RB [ \-o
2326 .IR options ]
2327 .RB [ \-t
2328 .IR type \fB. subtype ]
2329 .in
2330 .sp
2331 where the \fIsuffix\fR is the filesystem type and the \fB\-sfnvo\fR options have
2332 the same meaning as the normal mount options. The \fB\-t\fR option is used for
2333 filesystems with subtypes support (for example
2334 .BR "/sbin/mount.fuse \-t fuse.sshfs" ).
2335
2336 The command \fBmount\fR does not pass the mount options
2337 .BR unbindable ,
2338 .BR runbindable ,
2339 .BR private ,
2340 .BR rprivate ,
2341 .BR slave ,
2342 .BR rslave ,
2343 .BR shared ,
2344 .BR rshared ,
2345 .BR auto ,
2346 .BR noauto ,
2347 .BR comment ,
2348 .BR x-* ,
2349 .BR loop ,
2350 .B offset
2351 and
2352 .B sizelimit
2353 to the mount.<suffix> helpers. All other options are used in a
2354 comma-separated list as argument to the \fB\-o\fR option.
2355
2356 .SH FILES
2357 .TP 18n
2358 .I /etc/fstab
2359 filesystem table
2360 .TP
2361 .I /etc/mtab
2362 table of mounted filesystems
2363 .TP
2364 .I /etc/mtab\s+3~\s0
2365 lock file
2366 .TP
2367 .I /etc/mtab.tmp
2368 temporary file
2369 .TP
2370 .I /etc/filesystems
2371 a list of filesystem types to try
2372 .SH ENVIRONMENT
2373 .IP LIBMOUNT_FSTAB=<path>
2374 overrides the default location of the fstab file (ignored for suid)
2375 .IP LIBMOUNT_MTAB=<path>
2376 overrides the default location of the mtab file (ignored for suid)
2377 .IP LIBMOUNT_DEBUG=all
2378 enables libmount debug output
2379 .IP LIBBLKID_DEBUG=all
2380 enables libblkid debug output
2381 .IP LOOPDEV_DEBUG=all
2382 enables loop device setup debug output
2383 .SH "SEE ALSO"
2384 .na
2385 .BR mount (2),
2386 .BR umount (2),
2387 .BR umount (8),
2388 .BR fstab (5),
2389 .BR nfs (5),
2390 .BR xfs (5),
2391 .BR e2label (8),
2392 .BR findmnt (8),
2393 .BR losetup (8),
2394 .BR mke2fs (8),
2395 .BR mountd (8),
2396 .BR nfsd (8),
2397 .BR swapon (8),
2398 .BR tune2fs (8),
2399 .BR xfs_admin (8)
2400 .ad
2401 .SH BUGS
2402 It is possible for a corrupted filesystem to cause a crash.
2403 .PP
2404 Some Linux filesystems don't support
2405 .BR "\-o sync " nor " \-o dirsync"
2406 (the ext2, ext3, fat and vfat filesystems
2407 .I do
2408 support synchronous updates (a la BSD) when mounted with the
2409 .B sync
2410 option).
2411 .PP
2412 The
2413 .B "\-o remount"
2414 may not be able to change mount parameters (all
2415 .IR ext2fs -specific
2416 parameters, except
2417 .BR sb ,
2418 are changeable with a remount, for example, but you can't change
2419 .B gid
2420 or
2421 .B umask
2422 for the
2423 .IR fatfs ).
2424 .PP
2425 It is possible that the files
2426 .I /etc/mtab
2427 and
2428 .I /proc/mounts
2429 don't match on systems with a regular mtab file. The first file is based only on
2430 the mount command options, but the content of the second file also depends on
2431 the kernel and others settings (e.g.\& on a remote NFS server -- in certain cases
2432 the mount command may report unreliable information about an NFS mount point
2433 and the /proc/mounts file usually contains more reliable information.) This is
2434 another reason to replace the mtab file with a symlink to the
2435 .I /proc/mounts
2436 file.
2437 .PP
2438 Checking files on NFS filesystems referenced by file descriptors (i.e.\& the
2439 .B fcntl
2440 and
2441 .B ioctl
2442 families of functions) may lead to inconsistent results due to the lack of
2443 a consistency check in the kernel even if noac is used.
2444 .PP
2445 The
2446 .B loop
2447 option with the
2448 .B offset
2449 or
2450 .B sizelimit
2451 options used may fail when using older kernels if the
2452 .B mount
2453 command can't confirm that the size of the block device has been configured
2454 as requested. This situation can be worked around by using
2455 the
2456 .B losetup
2457 command manually before calling
2458 .B mount
2459 with the configured loop device.
2460 .SH HISTORY
2461 A
2462 .B mount
2463 command existed in Version 5 AT&T UNIX.
2464 .SH AUTHORS
2465 .nf
2466 Karel Zak <kzak@redhat.com>
2467 .fi
2468 .SH AVAILABILITY
2469 The mount command is part of the util-linux package and is available from
2470 https://www.kernel.org/pub/linux/utils/util-linux/.