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