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