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