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