]>
Commit | Line | Data |
---|---|---|
60a2a323 KZ |
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 | .\" | |
7cebf0bb SK |
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. | |
60a2a323 KZ |
29 | .\" |
30 | .\" | |
31 | .TH MOUNT 8 "January 2012" "util-linux" "System Administration" | |
32 | .SH NAME | |
33 | mount \- mount a filesystem | |
34 | .SH SYNOPSIS | |
35 | .B mount | |
36 | .RB [ \-lhV ] | |
37 | .LP | |
38 | .BI "mount \-a | |
39 | .RB [ \-fFnrsvw ] | |
40 | .RB [ \-t | |
41 | .IR vfstype ] | |
42 | .RB [ \-O | |
43 | .IR optlist ] | |
44 | .LP | |
45 | .B mount | |
46 | .RB [ \-fnrsvw ] | |
47 | .RB [ \-o | |
48 | .IR option [ \fB,\fPoption ]...] | |
49 | .IR device | dir | |
50 | .LP | |
51 | .B mount | |
52 | .RB [ \-fnrsvw ] | |
53 | .RB [ \-t | |
54 | .IB vfstype ] | |
55 | .RB [ \-o | |
56 | .IR options ] | |
57 | .I device dir | |
58 | .SH DESCRIPTION | |
59 | All files accessible in a Unix system are arranged in one big | |
60 | tree, the file hierarchy, rooted at | |
61 | .BR / . | |
62 | These files can be spread out over several devices. The | |
63 | .B mount | |
64 | command serves to attach the filesystem found on some device | |
65 | to the big file tree. Conversely, the | |
66 | .BR umount (8) | |
67 | command will detach it again. | |
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 previous contents (if any) and owner and mode of | |
86 | .I dir | |
87 | become invisible, and as long as this filesystem remains mounted, | |
88 | the pathname | |
89 | .I dir | |
90 | refers to the root of the filesystem on | |
91 | .IR device . | |
92 | ||
93 | If only directory or device is given, for example: | |
94 | .RS | |
95 | ||
96 | .br | |
97 | .BI "mount /dir" | |
98 | .br | |
99 | ||
100 | .RE | |
101 | then mount looks for a mountpoint and if not found then for a device in the | |
aedeaa40 KZ |
102 | /etc/fstab file. It's possible to use |
103 | .B --target | |
104 | or | |
105 | .B --source | |
106 | options to avoid ambivalent interpretation of the given argument. For example | |
107 | .RS | |
108 | ||
109 | .br | |
110 | .BI "mount --target /mountpoint" | |
111 | .br | |
112 | ||
113 | .RE | |
114 | ||
60a2a323 KZ |
115 | |
116 | .B The listing and help. | |
117 | .RS | |
5f7c1890 KZ |
118 | The listing mode is maintained for backward compatibility only. |
119 | ||
120 | For more robust and definable output use | |
121 | .BR findmnt (8), | |
122 | \fBespecially in your scripts\fP. Note that control characters in the | |
123 | mountpoint name are replaced with '?'. | |
124 | ||
60a2a323 KZ |
125 | .TP |
126 | .BR "mount " [ -l "] [" "-t \fItype\fP" ] | |
127 | lists all mounted filesystems (of type | |
128 | .IR type ). | |
129 | The option \-l adds the labels in this listing. | |
130 | See below. | |
131 | .RE | |
132 | ||
133 | .B The device indication. | |
134 | .RS | |
135 | Most devices are indicated by a file name (of a block special device), like | |
136 | .IR /dev/sda1 , | |
137 | but there are other possibilities. For example, in the case of an NFS mount, | |
138 | .I device | |
139 | may look like | |
140 | .IR knuth.cwi.nl:/dir . | |
141 | It is possible to indicate a block special device using its | |
eb0eb262 | 142 | filesystem |
60a2a323 KZ |
143 | .B LABEL |
144 | or | |
145 | .B UUID | |
eb0eb262 KZ |
146 | (see the \-L and \-U options below) and |
147 | partition | |
148 | .B PARTUUID | |
149 | or | |
150 | .B PARTLABEL | |
71e87708 KZ |
151 | (partition identifiers are supported for example for GUID Partition Table (GPT) |
152 | partition tables). | |
153 | ||
154 | Don't forget that there is no guarantee that UUIDs and labels are really | |
155 | unique, especially if you move, share or copy the device. Use | |
156 | .BR "lsblk -o +UUID,PARTUUID" | |
157 | to verify that the UUIDs are really unique in your system. | |
60a2a323 | 158 | |
eb0eb262 KZ |
159 | The recommended setup is to use tags (e.g. LABEL=<label>) rather than |
160 | .B /dev/disk/by-{label,uuid,partuuid,partlabel} | |
60a2a323 KZ |
161 | udev symlinks in the /etc/fstab file. The tags are |
162 | more readable, robust and portable. The | |
163 | .BR mount (8) | |
164 | command internally uses udev | |
eb0eb262 | 165 | symlinks, so use the symlinks in /etc/fstab has no advantage over the tags. |
60a2a323 KZ |
166 | For more details see |
167 | .BR libblkid (3). | |
168 | ||
169 | Note that | |
170 | .BR mount (8) | |
171 | uses UUIDs as strings. The UUIDs from command line or | |
172 | .BR fstab (5) | |
173 | are not converted to internal binary representation. The string representation | |
174 | of the UUID should be based on lower case characters. | |
175 | ||
176 | The | |
177 | .I proc | |
178 | filesystem is not associated with a special device, and when | |
179 | mounting it, an arbitrary keyword, such as | |
180 | .I proc | |
181 | can be used instead of a device specification. | |
182 | (The customary choice | |
183 | .I none | |
184 | is less fortunate: the error message `none busy' from | |
185 | .B umount | |
186 | can be confusing.) | |
187 | .RE | |
188 | ||
189 | .B The /etc/fstab, /etc/mtab and /proc/mounts files. | |
190 | .RS | |
191 | The file | |
192 | .I /etc/fstab | |
193 | (see | |
194 | .BR fstab (5)), | |
195 | may contain lines describing what devices are usually | |
196 | mounted where, using which options. The default location of the | |
197 | .BR fstab (5) | |
f036b4c7 | 198 | file could be overridden by --fstab <path> command line option (see below for |
60a2a323 | 199 | more details). |
60a2a323 KZ |
200 | .LP |
201 | The command | |
202 | .RS | |
203 | .sp | |
204 | .B mount \-a | |
205 | .RB [ \-t | |
206 | .IR type ] | |
207 | .RB [ \-O | |
208 | .IR optlist ] | |
209 | .sp | |
210 | .RE | |
211 | (usually given in a bootscript) causes all filesystems mentioned in | |
212 | .I fstab | |
213 | (of the proper type and/or having or not having the proper options) | |
214 | to be mounted as indicated, except for those whose line contains the | |
215 | .B noauto | |
216 | keyword. Adding the | |
217 | .B \-F | |
218 | option will make mount fork, so that the | |
219 | filesystems are mounted simultaneously. | |
220 | .LP | |
221 | When mounting a filesystem mentioned in | |
222 | .IR fstab | |
223 | or | |
224 | .IR mtab, | |
225 | it suffices to give only the device, or only the mount point. | |
226 | ||
227 | ||
228 | The programs | |
229 | .B mount | |
230 | and | |
231 | .B umount | |
232 | maintain a list of currently mounted filesystems in the file | |
233 | .IR /etc/mtab . | |
234 | If no arguments are given to | |
235 | .BR mount , | |
236 | this list is printed. | |
237 | ||
238 | The | |
239 | .B mount | |
240 | program does not read the | |
241 | .I /etc/fstab | |
242 | file if | |
243 | .I device | |
eb0eb262 | 244 | (or LABEL, UUID, PARTUUID or PARTLABEL) and |
60a2a323 KZ |
245 | .I dir |
246 | are specified. For example: | |
247 | .RS | |
248 | .sp | |
249 | .B "mount /dev/foo /dir" | |
250 | .sp | |
251 | .RE | |
252 | If you want to override mount options from | |
253 | .I /etc/fstab | |
254 | you have to use: | |
255 | .RS | |
256 | .sp | |
257 | .B "mount device|dir -o <options>" | |
258 | .sp | |
259 | .RE | |
260 | and then the mount options from command line will be appended to | |
261 | the list of options from | |
262 | .IR /etc/fstab . | |
263 | The usual behaviour is that the last option wins if there is more duplicated | |
264 | options. | |
265 | ||
266 | When the | |
267 | .I proc | |
268 | filesystem is mounted (say at | |
269 | .IR /proc ), | |
270 | the files | |
271 | .I /etc/mtab | |
272 | and | |
273 | .I /proc/mounts | |
274 | have very similar contents. The former has somewhat | |
275 | more information, such as the mount options used, | |
276 | but is not necessarily up-to-date (cf. the | |
277 | .B \-n | |
278 | option below). It is possible to replace | |
279 | .I /etc/mtab | |
280 | by a symbolic link to | |
281 | .IR /proc/mounts , | |
282 | and especially when you have very large numbers of mounts | |
283 | things will be much faster with that symlink, | |
284 | but some information is lost that way, and in particular | |
285 | using the "user" option will fail. | |
286 | .RE | |
287 | ||
288 | .B The non-superuser mounts. | |
289 | .RS | |
290 | Normally, only the superuser can mount filesystems. | |
291 | However, when | |
292 | .I fstab | |
293 | contains the | |
294 | .B user | |
295 | option on a line, anybody can mount the corresponding system. | |
296 | .LP | |
297 | Thus, given a line | |
298 | .RS | |
299 | .sp | |
300 | .B "/dev/cdrom /cd iso9660 ro,user,noauto,unhide" | |
301 | .sp | |
302 | .RE | |
303 | any user can mount the iso9660 filesystem found on his CDROM | |
304 | using the command | |
305 | .RS | |
306 | .sp | |
307 | .B "mount /dev/cdrom" | |
308 | .sp | |
309 | .RE | |
310 | or | |
311 | .RS | |
312 | .sp | |
313 | .B "mount /cd" | |
314 | .sp | |
315 | .RE | |
316 | For more details, see | |
317 | .BR fstab (5). | |
318 | Only the user that mounted a filesystem can unmount it again. | |
319 | If any user should be able to unmount, then use | |
320 | .B users | |
321 | instead of | |
322 | .B user | |
323 | in the | |
324 | .I fstab | |
325 | line. | |
326 | The | |
327 | .B owner | |
328 | option is similar to the | |
329 | .B user | |
330 | option, with the restriction that the user must be the owner | |
331 | of the special file. This may be useful e.g. for | |
332 | .I /dev/fd | |
333 | if a login script makes the console user owner of this device. | |
334 | The | |
335 | .B group | |
336 | option is similar, with the restriction that the user must be | |
337 | member of the group of the special file. | |
338 | .RE | |
339 | ||
340 | ||
341 | .B The bind mounts. | |
342 | .RS | |
343 | .\" In fact since 2.3.99. At first the syntax was mount -t bind. | |
344 | Since Linux 2.4.0 it is possible to remount part of the | |
345 | file hierarchy somewhere else. The call is | |
346 | .RS | |
347 | .br | |
348 | .B mount --bind | |
349 | .I olddir newdir | |
350 | .RE | |
351 | or shortoption | |
352 | .RS | |
353 | .br | |
354 | .B mount -B | |
355 | .I olddir newdir | |
356 | .RE | |
357 | or fstab entry is: | |
358 | .RS | |
359 | .br | |
360 | .I /olddir | |
361 | .I /newdir | |
362 | .B none bind | |
363 | .RE | |
364 | ||
365 | After this call the same contents is accessible in two places. | |
366 | One can also remount a single file (on a single file). It's also | |
367 | possible to use the bind mount to create a mountpoint from a regular | |
368 | directory, for example: | |
369 | ||
370 | .RS | |
371 | .br | |
372 | .B mount --bind | |
373 | .I foo foo | |
374 | .RE | |
375 | ||
376 | The bind mount call attaches only (part of) a single filesystem, not possible | |
377 | submounts. The entire file hierarchy including submounts is attached | |
378 | a second place using | |
379 | ||
380 | .RS | |
381 | .br | |
382 | .B mount --rbind | |
383 | .I olddir newdir | |
384 | .RE | |
385 | ||
386 | or shortoption | |
387 | ||
388 | .RS | |
389 | .br | |
390 | .B mount -R | |
391 | .I olddir newdir | |
392 | .RE | |
393 | .\" available since Linux 2.4.11. | |
394 | ||
395 | Note that the filesystem mount options will remain the same as those | |
396 | on the original mount point, and cannot be changed by passing the -o | |
397 | option along with --bind/--rbind. The mount options can be | |
398 | changed by a separate remount command, for example: | |
399 | ||
400 | .RS | |
401 | .br | |
402 | .B mount --bind | |
403 | .I olddir newdir | |
404 | .br | |
405 | .B mount -o remount,ro | |
406 | .I newdir | |
407 | .RE | |
408 | ||
409 | Note that behavior of the remount operation depends on the /etc/mtab file. The | |
410 | first command stores the 'bind' flag to the /etc/mtab file and the second | |
411 | command reads the flag from the file. If you have a system without the | |
412 | /etc/mtab file or if you explicitly define source and target for the remount | |
413 | command (then mount(8) does not read /etc/mtab), then you have to use bind flag | |
414 | (or option) for the remount command too. For example: | |
415 | ||
416 | .RS | |
417 | .br | |
418 | .B mount --bind | |
419 | .I olddir newdir | |
420 | .br | |
421 | .B mount -o remount,ro,bind | |
422 | .I olddir newdir | |
423 | .RE | |
d7890778 KZ |
424 | |
425 | Note that | |
426 | .I remount,ro,bind | |
427 | will create a read-only mountpoint (VFS entry), but the original filesystem suberblock | |
428 | will be still writable, it means that the | |
429 | .I olddir | |
430 | will be writable, but the | |
431 | .I newdir | |
432 | will be read-only. | |
60a2a323 KZ |
433 | .RE |
434 | ||
435 | .B The move operation. | |
436 | .RS | |
437 | Since Linux 2.5.1 it is possible to atomically move a | |
438 | .B mounted tree | |
439 | to another place. The call is | |
440 | .RS | |
441 | .br | |
442 | .B mount --move | |
443 | .I olddir newdir | |
444 | .RE | |
445 | or shortoption | |
446 | .RS | |
447 | .br | |
448 | .B mount -M | |
449 | .I olddir newdir | |
450 | .RE | |
451 | This will cause the contents which previously appeared under olddir to be | |
452 | accessed under newdir. The physical location of the files is not changed. | |
453 | Note that the | |
454 | .I olddir | |
455 | has to be a mountpoint. | |
fcc0413a KZ |
456 | |
457 | Note that moving a mount residing under a shared mount is invalid and | |
458 | unsupported. Use | |
459 | .B findmnt -o TARGET,PROPAGATION /dir | |
460 | to see the current propagation flags. | |
60a2a323 KZ |
461 | .RE |
462 | ||
463 | .B The shared subtrees operations. | |
464 | .RS | |
465 | Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared, | |
466 | private, slave or unbindable. A shared mount provides ability to create mirrors | |
467 | of that mount such that mounts and umounts within any of the mirrors propagate | |
468 | to the other mirror. A slave mount receives propagation from its master, but | |
469 | any not vice-versa. A private mount carries no propagation abilities. A | |
470 | unbindable mount is a private mount which cannot be cloned through a bind | |
be6904b9 KZ |
471 | operation. Detailed semantics is documented in |
472 | .B Documentation/filesystems/sharedsubtree.txt | |
60a2a323 KZ |
473 | file in the kernel source tree. |
474 | ||
be6904b9 | 475 | Supported operations: |
60a2a323 KZ |
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 allows 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 | |
be6904b9 KZ |
496 | |
497 | .BR mount (8) | |
498 | .B does not read | |
499 | .BR fstab (5) | |
500 | when --make-* operation is requested. All necessary information has to be | |
501 | specified on command line. | |
502 | ||
503 | Note that Linux kernel does not allow to change more propagation flags by one | |
504 | .BR mount (2) | |
505 | syscall and the flags cannot be mixed with another mount options. | |
506 | ||
507 | Since util-linux 2.23 mount command allows to use more propagation flags | |
e80d46b0 KZ |
508 | together and with another mount operations. This feature is EXPERIMENTAL. |
509 | The propagation flags are applied by additional mount(2) syscalls | |
be6904b9 | 510 | after previous successful mount operation. Note that this use case is not |
e80d46b0 | 511 | atomic. The propagation flags is possible to specify in |
be6904b9 KZ |
512 | .BR fstab (5) |
513 | as mount options | |
49c6c4f1 SK |
514 | .RI ( private , |
515 | .IR slave , | |
516 | .IR shared , | |
517 | .IR unbindable , | |
518 | .IR rprivate , | |
519 | .IR rslave , | |
520 | .IR rshared , | |
521 | .IR runbindable ). | |
be6904b9 KZ |
522 | |
523 | For example | |
524 | .RS | |
525 | .nf | |
526 | .BI "mount --make-private --make-unbindable /dev/sda1 /A" | |
527 | .fi | |
528 | .RE | |
529 | ||
530 | is the same as | |
531 | .RS | |
532 | .nf | |
533 | .BI "mount /dev/sda1 /A" | |
534 | .BI "mount --make-private /A" | |
535 | .BI "mount --make-unbindable /A" | |
536 | .fi | |
537 | .RE | |
60a2a323 KZ |
538 | .RE |
539 | ||
540 | .SH COMMAND LINE OPTIONS | |
541 | The full set of mount options used by an invocation of | |
542 | .B mount | |
543 | is determined by first extracting the | |
544 | mount options for the filesystem from the | |
545 | .I fstab | |
546 | table, then applying any options specified by the | |
547 | .B \-o | |
548 | argument, and finally applying a | |
549 | .BR \-r " or " \-w | |
550 | option, when present. | |
551 | ||
552 | Command line options available for the | |
553 | .B mount | |
554 | command: | |
555 | .IP "\fB\-V, \-\-version\fP" | |
b4362b6f | 556 | Display version information and exit. |
60a2a323 | 557 | .IP "\fB\-h, \-\-help\fP" |
b4362b6f | 558 | Display help text and exit. |
60a2a323 KZ |
559 | .IP "\fB\-v, \-\-verbose\fP" |
560 | Verbose mode. | |
561 | .IP "\fB\-a, \-\-all\fP" | |
562 | Mount all filesystems (of the given types) mentioned in | |
563 | .IR fstab . | |
564 | .IP "\fB\-F, \-\-fork\fP" | |
565 | (Used in conjunction with | |
566 | .BR \-a .) | |
567 | Fork off a new incarnation of mount for each device. | |
568 | This will do the mounts on different devices or different NFS servers | |
569 | in parallel. | |
570 | This has the advantage that it is faster; also NFS timeouts go in | |
571 | parallel. A disadvantage is that the mounts are done in undefined order. | |
572 | Thus, you cannot use this option if you want to mount both | |
573 | .I /usr | |
574 | and | |
575 | .IR /usr/spool . | |
576 | .IP "\fB\-f, \-\-fake\fP" | |
577 | Causes everything to be done except for the actual system call; if it's not | |
578 | obvious, this ``fakes'' mounting the filesystem. This option is useful in | |
579 | conjunction with the | |
580 | .B \-v | |
581 | flag to determine what the | |
582 | .B mount | |
583 | command is trying to do. It can also be used to add entries for devices | |
584 | that were mounted earlier with the -n option. The -f option checks for | |
585 | existing record in /etc/mtab and fails when the record already | |
586 | exists (with regular non-fake mount, this check is done by kernel). | |
587 | .IP "\fB\-i, \-\-internal\-only\fP" | |
588 | Don't call the /sbin/mount.<filesystem> helper even if it exists. | |
81009d72 | 589 | .IP "\fB\-l, \-\-show\-labels\fP" |
60a2a323 KZ |
590 | Add the labels in the mount output. Mount must have |
591 | permission to read the disk device (e.g. be suid root) for this to work. | |
592 | One can set such a label for ext2, ext3 or ext4 using the | |
593 | .BR e2label (8) | |
594 | utility, or for XFS using | |
595 | .BR xfs_admin (8), | |
596 | or for reiserfs using | |
597 | .BR reiserfstune (8). | |
598 | .IP "\fB\-n, \-\-no\-mtab\fP" | |
599 | Mount without writing in | |
600 | .IR /etc/mtab . | |
601 | This is necessary for example when | |
602 | .I /etc | |
603 | is on a read-only filesystem. | |
249fd011 | 604 | .IP "\fB\-c, \-\-no\-canonicalize\fP" |
60a2a323 KZ |
605 | Don't canonicalize paths. The mount command canonicalizes all paths |
606 | (from command line or fstab) and stores canonicalized paths to the | |
607 | .IR /etc/mtab | |
608 | file. This option can be used together with the | |
609 | .B \-f | |
f036b4c7 | 610 | flag for already canonicalized absolute paths. |
60a2a323 | 611 | .IP "\fB\-s\fP" |
5875c506 KZ |
612 | Tolerate sloppy mount options rather than failing. This will ignore mount |
613 | options not supported by a filesystem type. Not all filesystems support this | |
614 | option. Currently it's supported by the mount.nfs mount helper only. | |
aedeaa40 KZ |
615 | .IP "\fB\-\-source \fIsrc\fP" |
616 | If only one argument for the mount command is given then the argument might be | |
617 | interpreted as target (mountpoint) or source (device). This option allows to | |
618 | explicitly define that the argument is mount source. | |
60a2a323 KZ |
619 | .IP "\fB\-r, \-\-read\-only\fP" |
620 | Mount the filesystem read-only. A synonym is | |
621 | .BR "\-o ro" . | |
622 | ||
623 | Note that, depending on the filesystem type, state and kernel behavior, the | |
624 | system may still write to the device. For example, Ext3 or ext4 will replay its | |
625 | journal if the filesystem is dirty. To prevent this kind of write access, you | |
626 | may want to mount ext3 or ext4 filesystem with "ro,noload" mount options or | |
627 | set the block device to read-only mode, see command | |
628 | .BR blockdev (8). | |
6d402bbe | 629 | .IP "\fB\-w, \-\-rw, \-\-read\-write\fP" |
60a2a323 KZ |
630 | Mount the filesystem read/write. This is the default. A synonym is |
631 | .BR "\-o rw" . | |
b4359220 | 632 | .IP "\fB\-L, \-\-label \fIlabel\fP" |
60a2a323 KZ |
633 | Mount the partition that has the specified |
634 | .IR label . | |
b4359220 | 635 | .IP "\fB\-U, \-\-uuid \fIuuid\fP" |
60a2a323 KZ |
636 | Mount the partition that has the specified |
637 | .IR uuid . | |
638 | These two options require the file | |
639 | .I /proc/partitions | |
640 | (present since Linux 2.1.116) to exist. | |
641 | .IP "\fB\-T, \-\-fstab \fIpath\fP" | |
c633953c KZ |
642 | Specifies alternative fstab file. If the \fIpath\fP is directory then the files |
643 | in the directory are sorted by | |
60a2a323 KZ |
644 | .BR strverscmp (3), |
645 | files that starts with "." or without .fstab extension are ignored. The option | |
c633953c KZ |
646 | can be specified more than once. This option is mostly designed for initramfs |
647 | or chroot scripts where additional configuration is specified outside standard | |
648 | system configuration. | |
649 | ||
650 | Note that mount(8) does not pass the option \fB\-\-fstab\fP to | |
651 | /sbin/mount.<type> helpers, it means that the alternative fstab files will be | |
652 | invisible for the helpers. This is no problem for normal mounts, but user | |
653 | (non-root) mounts always require fstab to verify user's rights. | |
60a2a323 KZ |
654 | .IP "\fB\-t, \-\-types \fIvfstype\fP" |
655 | The argument following the | |
656 | .B \-t | |
657 | is used to indicate the filesystem type. The filesystem types which are | |
658 | currently supported include: | |
659 | .IR adfs , | |
660 | .IR affs , | |
661 | .IR autofs , | |
662 | .IR cifs , | |
663 | .IR coda , | |
664 | .IR coherent , | |
665 | .IR cramfs , | |
666 | .IR debugfs , | |
667 | .IR devpts , | |
668 | .IR efs , | |
669 | .IR ext , | |
670 | .IR ext2 , | |
671 | .IR ext3 , | |
672 | .IR ext4 , | |
673 | .IR hfs , | |
674 | .IR hfsplus , | |
675 | .IR hpfs , | |
676 | .IR iso9660 , | |
677 | .IR jfs , | |
678 | .IR minix , | |
679 | .IR msdos , | |
680 | .IR ncpfs , | |
681 | .IR nfs , | |
682 | .IR nfs4 , | |
683 | .IR ntfs , | |
684 | .IR proc , | |
685 | .IR qnx4 , | |
686 | .IR ramfs , | |
687 | .IR reiserfs , | |
688 | .IR romfs , | |
689 | .IR squashfs , | |
690 | .IR smbfs , | |
691 | .IR sysv , | |
692 | .IR tmpfs , | |
693 | .IR ubifs , | |
694 | .IR udf , | |
695 | .IR ufs , | |
696 | .IR umsdos , | |
697 | .IR usbfs , | |
698 | .IR vfat , | |
699 | .IR xenix , | |
700 | .IR xfs , | |
701 | .IR xiafs . | |
702 | Note that coherent, sysv and xenix are equivalent and that | |
703 | .I xenix | |
704 | and | |
705 | .I coherent | |
706 | will be removed at some point in the future \(em use | |
707 | .I sysv | |
708 | instead. Since kernel version 2.1.21 the types | |
709 | .I ext | |
710 | and | |
711 | .I xiafs | |
712 | do not exist anymore. Earlier, | |
713 | .I usbfs | |
714 | was known as | |
715 | .IR usbdevfs . | |
716 | Note, the real list of all supported filesystems depends on your | |
717 | kernel. | |
718 | ||
719 | The programs | |
720 | .B mount | |
721 | and | |
722 | .B umount | |
723 | support filesystem subtypes. The subtype is defined by '.subtype' suffix. For | |
724 | example 'fuse.sshfs'. It's recommended to use subtype notation rather than add | |
725 | any prefix to the mount source (for example 'sshfs#example.com' is | |
ef75bc88 | 726 | deprecated). |
60a2a323 KZ |
727 | |
728 | For most types all the | |
729 | .B mount | |
730 | program has to do is issue a simple | |
731 | .IR mount (2) | |
732 | system call, and no detailed knowledge of the filesystem type is required. | |
733 | For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) ad hoc code is | |
734 | necessary. The nfs, nfs4, cifs, smbfs, and ncpfs filesystems | |
735 | have a separate mount program. In order to make it possible to | |
736 | treat all types in a uniform way, mount will execute the program | |
737 | .BI /sbin/mount. TYPE | |
738 | (if that exists) when called with type | |
739 | .IR TYPE . | |
740 | Since various versions of the | |
741 | .B smbmount | |
742 | program have different calling conventions, | |
743 | .B /sbin/mount.smbfs | |
744 | may have to be a shell script that sets up the desired call. | |
745 | ||
746 | If no | |
747 | .B \-t | |
748 | option is given, or if the | |
749 | .B auto | |
750 | type is specified, mount will try to guess the desired type. | |
751 | Mount uses the blkid library for guessing the filesystem | |
752 | type; if that does not turn up anything that looks familiar, | |
753 | mount will try to read the file | |
754 | .IR /etc/filesystems , | |
755 | or, if that does not exist, | |
756 | .IR /proc/filesystems . | |
757 | All of the filesystem types listed there will be tried, | |
758 | except for those that are labeled "nodev" (e.g., | |
759 | .IR devpts , | |
760 | .I proc | |
761 | and | |
762 | .IR nfs ). | |
763 | If | |
764 | .I /etc/filesystems | |
765 | ends in a line with a single * only, mount will read | |
766 | .I /proc/filesystems | |
a21aa92f KZ |
767 | afterwards. All of the filesystem types will be |
768 | mounted with mount option "silent". | |
60a2a323 KZ |
769 | |
770 | The | |
771 | .B auto | |
772 | type may be useful for user-mounted floppies. | |
773 | Creating a file | |
774 | .I /etc/filesystems | |
775 | can be useful to change the probe order (e.g., to try vfat before msdos | |
776 | or ext3 before ext2) or if you use a kernel module autoloader. | |
777 | ||
778 | More than one type may be specified in a comma separated | |
779 | list. The list of filesystem types can be prefixed with | |
780 | .B no | |
781 | to specify the filesystem types on which no action should be taken. | |
782 | (This can be meaningful with the | |
783 | .B \-a | |
784 | option.) For example, the command: | |
785 | .RS | |
786 | .RS | |
787 | .sp | |
788 | .B "mount \-a \-t nomsdos,ext" | |
789 | .sp | |
790 | .RE | |
791 | mounts all filesystems except those of type | |
792 | .I msdos | |
793 | and | |
794 | .IR ext . | |
795 | .RE | |
aedeaa40 KZ |
796 | .IP "\fB\-\-target \fIdir\fP" |
797 | If only one argument for the mount command is given then the argument might be | |
798 | interpreted as target (mountpoint) or source (device). This option allows to | |
799 | explicitly define that the argument is mount target. | |
60a2a323 KZ |
800 | .IP "\fB\-O, \-\-test-opts \fIopts\fP" |
801 | Used in conjunction with | |
802 | .BR \-a , | |
803 | to limit the set of filesystems to which the | |
804 | .B \-a | |
805 | is applied. Like | |
806 | .B \-t | |
807 | in this regard except that it is useless except in the context of | |
808 | .BR \-a . | |
809 | For example, the command: | |
810 | .RS | |
811 | .RS | |
812 | .sp | |
813 | .B "mount \-a \-O no_netdev" | |
814 | .sp | |
815 | .RE | |
816 | mounts all filesystems except those which have the option | |
817 | .I _netdev | |
818 | specified in the options field in the | |
819 | .I /etc/fstab | |
820 | file. | |
821 | ||
822 | It is different from | |
823 | .B \-t | |
824 | in that each option is matched exactly; a leading | |
825 | .B no | |
826 | at the beginning of one option does not negate the rest. | |
827 | ||
828 | The | |
829 | .B \-t | |
830 | and | |
831 | .B \-O | |
832 | options are cumulative in effect; that is, the command | |
833 | .RS | |
834 | .sp | |
835 | .B "mount \-a \-t ext2 \-O _netdev" | |
836 | .sp | |
837 | .RE | |
838 | mounts all ext2 filesystems with the _netdev option, not all filesystems | |
839 | that are either ext2 or have the _netdev option specified. | |
840 | .RE | |
841 | .IP "\fB\-o, \-\-options \fIopts\fP" | |
842 | Options are specified with a | |
843 | .B \-o | |
844 | flag followed by a comma separated string of options. For example: | |
845 | .RS | |
846 | .RS | |
847 | .sp | |
848 | .B "mount LABEL=mydisk \-o noatime,nouser" | |
849 | .sp | |
850 | .RE | |
851 | ||
852 | For more details, see | |
853 | .B FILESYSTEM INDEPENDENT MOUNT OPTIONS | |
854 | and | |
855 | .B FILESYSTEM SPECIFIC MOUNT OPTIONS | |
856 | sections. | |
857 | .RE | |
858 | .IP "\fB\-B, \-\-bind\fP" | |
859 | Remount a subtree somewhere else (so that its contents are available | |
860 | in both places). See above. | |
861 | .IP "\fB\-R, \-\-rbind\fP" | |
862 | Remount a subtree and all possible submounts somewhere else (so that its | |
863 | contents are available in both places). See above. | |
864 | .IP "\fB\-M, \-\-move\fP" | |
865 | Move a subtree to some other place. See above. | |
866 | ||
867 | .SH FILESYSTEM INDEPENDENT MOUNT OPTIONS | |
868 | Some of these options are only useful when they appear in the | |
869 | .I /etc/fstab | |
870 | file. | |
871 | ||
872 | Some of these options could be enabled or disabled by default | |
873 | in the system kernel. To check the current setting see the options | |
874 | in /proc/mounts. | |
875 | ||
876 | The following options apply to any filesystem that is being | |
877 | mounted (but not every filesystem actually honors them - e.g., the | |
878 | .B sync | |
879 | option today has effect only for ext2, ext3, fat, vfat and ufs): | |
880 | ||
881 | .TP | |
882 | .B async | |
883 | All I/O to the filesystem should be done asynchronously. (See also the | |
884 | .B sync | |
885 | option.) | |
886 | .TP | |
887 | .B atime | |
888 | Do not use noatime feature, then the inode access time is controlled by kernel | |
889 | defaults. See also the description for | |
890 | .B strictatime | |
891 | and | |
d5360e92 | 892 | .B relatime |
60a2a323 KZ |
893 | mount options. |
894 | .TP | |
895 | .B noatime | |
896 | Do not update inode access times on this filesystem (e.g., for faster | |
897 | access on the news spool to speed up news servers). | |
898 | .TP | |
899 | .B auto | |
900 | Can be mounted with the | |
901 | .B \-a | |
902 | option. | |
903 | .TP | |
904 | .B noauto | |
905 | Can only be mounted explicitly (i.e., the | |
906 | .B \-a | |
907 | option will not cause the filesystem to be mounted). | |
908 | .TP | |
909 | \fBcontext=\fP\fIcontext\fP, \fBfscontext=\fP\fIcontext\fP, \fBdefcontext=\fP\fIcontext\fP and \fBrootcontext=\fP\fIcontext\fP | |
910 | The | |
911 | .BR context= | |
912 | option is useful when mounting filesystems that do not support | |
913 | extended attributes, such as a floppy or hard disk formatted with VFAT, or | |
914 | systems that are not normally running under SELinux, such as an ext3 formatted | |
915 | disk from a non-SELinux workstation. You can also use | |
916 | .BR context= | |
917 | on filesystems you do not trust, such as a floppy. It also helps in compatibility with | |
918 | xattr-supporting filesystems on earlier 2.4.<x> kernel versions. Even where | |
919 | xattrs are supported, you can save time not having to label every file by | |
920 | assigning the entire disk one security context. | |
921 | ||
922 | A commonly used option for removable media is | |
923 | .BR context="system_u:object_r:removable_t" . | |
924 | ||
925 | Two other options are | |
926 | .BR fscontext= | |
927 | and | |
928 | .BR defcontext= , | |
929 | both of which are mutually exclusive of the context option. This means you | |
930 | can use fscontext and defcontext with each other, but neither can be used with | |
931 | context. | |
932 | ||
933 | The | |
934 | .BR fscontext= | |
935 | option works for all filesystems, regardless of their xattr | |
936 | support. The fscontext option sets the overarching filesystem label to a | |
937 | specific security context. This filesystem label is separate from the | |
938 | individual labels on the files. It represents the entire filesystem for | |
939 | certain kinds of permission checks, such as during mount or file creation. | |
940 | Individual file labels are still obtained from the xattrs on the files | |
941 | themselves. The context option actually sets the aggregate context that | |
942 | fscontext provides, in addition to supplying the same label for individual | |
943 | files. | |
944 | ||
945 | You can set the default security context for unlabeled files using | |
946 | .BR defcontext= | |
947 | option. This overrides the value set for unlabeled files in the policy and requires a | |
948 | filesystem that supports xattr labeling. | |
949 | ||
950 | The | |
951 | .BR rootcontext= | |
952 | option allows you to explicitly label the root inode of a FS being mounted | |
60c02107 | 953 | before that FS or inode becomes visible to userspace. This was found to be |
60a2a323 KZ |
954 | useful for things like stateless linux. |
955 | ||
60c02107 BS |
956 | Note that the kernel rejects any remount request that includes the context |
957 | option, \fBeven\fP when unchanged from the current context. | |
60a2a323 | 958 | |
60c02107 BS |
959 | .BR "Warning: the \fIcontext\fP value might contain commas" , |
960 | in which case the value has to be properly quoted, otherwise | |
60a2a323 | 961 | .BR mount (8) |
60c02107 BS |
962 | will interpret the comma as a separator between mount options. Don't forget that |
963 | the shell strips off quotes and thus | |
964 | .BR "double quoting is required" . | |
965 | For example: | |
60a2a323 KZ |
966 | .RS |
967 | .RS | |
968 | .sp | |
60c02107 | 969 | .B mount -t tmpfs none /mnt \-o 'context="system_u:object_r:tmp_t:s0:c127,c456",noexec' |
60a2a323 KZ |
970 | .sp |
971 | .RE | |
60a2a323 | 972 | For more details, see |
60c02107 | 973 | .BR selinux (8). |
60a2a323 KZ |
974 | .RE |
975 | ||
976 | .TP | |
977 | .B defaults | |
978 | Use default options: | |
979 | .BR rw ", " suid ", " dev ", " exec ", " auto ", " nouser ", and " async. | |
980 | .TP | |
981 | .B dev | |
982 | Interpret character or block special devices on the filesystem. | |
983 | .TP | |
984 | .B nodev | |
985 | Do not interpret character or block special devices on the file | |
986 | system. | |
987 | .TP | |
988 | .B diratime | |
989 | Update directory inode access times on this filesystem. This is the default. | |
990 | .TP | |
991 | .B nodiratime | |
992 | Do not update directory inode access times on this filesystem. | |
993 | .TP | |
994 | .B dirsync | |
995 | All directory updates within the filesystem should be done synchronously. | |
996 | This affects the following system calls: creat, link, unlink, symlink, | |
997 | mkdir, rmdir, mknod and rename. | |
998 | .TP | |
999 | .B exec | |
1000 | Permit execution of binaries. | |
1001 | .TP | |
1002 | .B noexec | |
1003 | Do not allow direct execution of any binaries on the mounted filesystem. | |
1004 | (Until recently it was possible to run binaries anyway using a command like | |
1005 | /lib/ld*.so /mnt/binary. This trick fails since Linux 2.4.25 / 2.6.0.) | |
1006 | .TP | |
1007 | .B group | |
1008 | Allow an ordinary (i.e., non-root) user to mount the filesystem if one | |
1009 | of his groups matches the group of the device. | |
1010 | This option implies the options | |
1011 | .BR nosuid " and " nodev | |
1012 | (unless overridden by subsequent options, as in the option line | |
1013 | .BR group,dev,suid ). | |
1014 | .TP | |
1015 | .B iversion | |
1016 | Every time the inode is modified, the i_version field will be incremented. | |
1017 | .TP | |
1018 | .B noiversion | |
1019 | Do not increment the i_version inode field. | |
1020 | .TP | |
1021 | .B mand | |
1022 | Allow mandatory locks on this filesystem. See | |
1023 | .BR fcntl (2). | |
1024 | .TP | |
1025 | .B nomand | |
1026 | Do not allow mandatory locks on this filesystem. | |
1027 | .TP | |
1028 | .B _netdev | |
1029 | The filesystem resides on a device that requires network access | |
1030 | (used to prevent the system from attempting to mount these filesystems | |
1031 | until the network has been enabled on the system). | |
1032 | .TP | |
1033 | .B nofail | |
1034 | Do not report errors for this device if it does not exist. | |
1035 | .TP | |
1036 | .B relatime | |
1037 | Update inode access times relative to modify or change time. Access | |
1038 | time is only updated if the previous access time was earlier than the | |
1039 | current modify or change time. (Similar to noatime, but doesn't break | |
1040 | mutt or other applications that need to know if a file has been read | |
1041 | since the last time it was modified.) | |
1042 | ||
1043 | Since Linux 2.6.30, the kernel defaults to the behavior provided by this | |
1044 | option (unless | |
1045 | .B noatime | |
1046 | was specified), and the | |
1047 | .B strictatime | |
1048 | option is required to obtain traditional semantics. In addition, since Linux | |
1049 | 2.6.30, the file's last access time is always updated if it is more than 1 | |
1050 | day old. | |
1051 | .TP | |
1052 | .B norelatime | |
1053 | Do not use | |
1054 | .B relatime | |
1055 | feature. See also the | |
1056 | .B strictatime | |
1057 | mount option. | |
1058 | .TP | |
1059 | .B strictatime | |
1060 | Allows to explicitly requesting full atime updates. This makes it | |
1061 | possible for kernel to defaults to | |
1062 | .B relatime | |
1063 | or | |
1064 | .B noatime | |
1065 | but still allow userspace to override it. For more details about the default | |
1066 | system mount options see /proc/mounts. | |
1067 | .TP | |
1068 | .B nostrictatime | |
1069 | Use the kernel's default behaviour for inode access time updates. | |
1070 | .TP | |
1071 | .B suid | |
1072 | Allow set-user-identifier or set-group-identifier bits to take | |
1073 | effect. | |
1074 | .TP | |
1075 | .B nosuid | |
1076 | Do not allow set-user-identifier or set-group-identifier bits to take | |
1077 | effect. (This seems safe, but is in fact rather unsafe if you have | |
1078 | suidperl(1) installed.) | |
1079 | .TP | |
1080 | .B silent | |
1081 | Turn on the silent flag. | |
1082 | .TP | |
1083 | .B loud | |
1084 | Turn off the silent flag. | |
1085 | .TP | |
1086 | .B owner | |
1087 | Allow an ordinary (i.e., non-root) user to mount the filesystem if he | |
1088 | is the owner of the device. | |
1089 | This option implies the options | |
1090 | .BR nosuid " and " nodev | |
1091 | (unless overridden by subsequent options, as in the option line | |
1092 | .BR owner,dev,suid ). | |
1093 | .TP | |
1094 | .B remount | |
1095 | Attempt to remount an already-mounted filesystem. This is commonly | |
1096 | used to change the mount flags for a filesystem, especially to make a | |
1097 | readonly filesystem writable. It does not change device or mount point. | |
1098 | ||
1099 | The remount functionality follows the standard way how the mount command works | |
1100 | with options from fstab. It means the mount command doesn't read fstab (or | |
1101 | mtab) only when a | |
1102 | .IR device | |
1103 | and | |
1104 | .IR dir | |
1105 | are fully specified. | |
1106 | ||
1107 | .BR "mount -o remount,rw /dev/foo /dir" | |
1108 | ||
1109 | After this call all old mount options are replaced and arbitrary stuff from | |
1110 | fstab is ignored, except the loop= option which is internally generated and | |
1111 | maintained by the mount command. | |
1112 | ||
1113 | .BR "mount -o remount,rw /dir" | |
1114 | ||
1115 | After this call mount reads fstab (or mtab) and merges these options with | |
1116 | options from command line ( | |
1117 | .B -o | |
1118 | ). | |
1119 | .TP | |
1120 | .B ro | |
1121 | Mount the filesystem read-only. | |
1122 | .TP | |
1123 | .B rw | |
1124 | Mount the filesystem read-write. | |
1125 | .TP | |
1126 | .B sync | |
1127 | All I/O to the filesystem should be done synchronously. In case of media with limited number of write cycles | |
1128 | (e.g. some flash drives) "sync" may cause life-cycle shortening. | |
1129 | .TP | |
1130 | .B user | |
1131 | Allow an ordinary user to mount the filesystem. | |
1132 | The name of the mounting user is written to mtab so that he can unmount | |
1133 | the filesystem again. | |
1134 | This option implies the options | |
1135 | .BR noexec ", " nosuid ", and " nodev | |
1136 | (unless overridden by subsequent options, as in the option line | |
1137 | .BR user,exec,dev,suid ). | |
1138 | .TP | |
1139 | .B nouser | |
1140 | Forbid an ordinary (i.e., non-root) user to mount the filesystem. | |
1141 | This is the default. | |
1142 | .TP | |
1143 | .B users | |
1144 | Allow every user to mount and unmount the filesystem. | |
1145 | This option implies the options | |
1146 | .BR noexec ", " nosuid ", and " nodev | |
1147 | (unless overridden by subsequent options, as in the option line | |
1148 | .BR users,exec,dev,suid ). | |
f3242e06 KZ |
1149 | .TP |
1150 | .B x-* | |
1151 | All options prefixed with "x-" are interpreted as comments or userspace | |
1152 | applications specific options. These options are not stored to mtab file, send | |
1153 | to mount.<type> helpers or | |
1154 | .B mount(2) | |
1155 | system call. The suggested format is x-<appname>.<option> (e.g. x-systemd.automount). | |
701c6961 OO |
1156 | .TP |
1157 | .B x-mount.mkdir[=<mode>] | |
1158 | Allow to make a target directory (mountpoint). The optional argument <mode> | |
1159 | specifies the file system access mode used for | |
1160 | .B mkdir (2) | |
1161 | in octal notation. The default mode is 0755. This functionality is supported | |
1162 | only for root users. | |
60a2a323 KZ |
1163 | |
1164 | .SH "FILESYSTEM SPECIFIC MOUNT OPTIONS" | |
1165 | The following options apply only to certain filesystems. | |
1166 | We sort them by filesystem. They all follow the | |
1167 | .B \-o | |
1168 | flag. | |
1169 | ||
1170 | What options are supported depends a bit on the running kernel. | |
1171 | More info may be found in the kernel source subdirectory | |
1172 | .IR Documentation/filesystems . | |
1173 | ||
1174 | .SH "Mount options for adfs" | |
1175 | .TP | |
1176 | \fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP | |
1177 | Set the owner and group of the files in the filesystem (default: uid=gid=0). | |
1178 | .TP | |
1179 | \fBownmask=\fP\fIvalue\fP and \fBothmask=\fP\fIvalue\fP | |
1180 | Set the permission mask for ADFS 'owner' permissions and 'other' permissions, | |
1181 | respectively (default: 0700 and 0077, respectively). | |
1182 | See also | |
1183 | .IR /usr/src/linux/Documentation/filesystems/adfs.txt . | |
1184 | .SH "Mount options for affs" | |
1185 | .TP | |
1186 | \fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP | |
1187 | Set the owner and group of the root of the filesystem (default: uid=gid=0, | |
1188 | but with option | |
1189 | .B uid | |
1190 | or | |
1191 | .B gid | |
1192 | without specified value, the uid and gid of the current process are taken). | |
1193 | .TP | |
1194 | \fBsetuid=\fP\fIvalue\fP and \fBsetgid=\fP\fIvalue\fP | |
1195 | Set the owner and group of all files. | |
1196 | .TP | |
1197 | .BI mode= value | |
1198 | Set the mode of all files to | |
1199 | .IR value " & 0777" | |
1200 | disregarding the original permissions. | |
1201 | Add search permission to directories that have read permission. | |
1202 | The value is given in octal. | |
1203 | .TP | |
1204 | .B protect | |
1205 | Do not allow any changes to the protection bits on the filesystem. | |
1206 | .TP | |
1207 | .B usemp | |
1208 | Set uid and gid of the root of the filesystem to the uid and gid | |
1209 | of the mount point upon the first sync or umount, and then | |
1210 | clear this option. Strange... | |
1211 | .TP | |
1212 | .B verbose | |
1213 | Print an informational message for each successful mount. | |
1214 | .TP | |
1215 | .BI prefix= string | |
1216 | Prefix used before volume name, when following a link. | |
1217 | .TP | |
1218 | .BI volume= string | |
1219 | Prefix (of length at most 30) used before '/' when following a symbolic link. | |
1220 | .TP | |
1221 | .BI reserved= value | |
1222 | (Default: 2.) Number of unused blocks at the start of the device. | |
1223 | .TP | |
1224 | .BI root= value | |
1225 | Give explicitly the location of the root block. | |
1226 | .TP | |
1227 | .BI bs= value | |
1228 | Give blocksize. Allowed values are 512, 1024, 2048, 4096. | |
1229 | .TP | |
1230 | .BR grpquota | noquota | quota | usrquota | |
1231 | These options are accepted but ignored. | |
1232 | (However, quota utilities may react to such strings in | |
1233 | .IR /etc/fstab .) | |
1234 | ||
1235 | .SH "Mount options for cifs" | |
1236 | See the options section of the | |
1237 | .BR mount.cifs (8) | |
1238 | man page (cifs-utils package must be installed). | |
1239 | ||
1240 | .SH "Mount options for coherent" | |
1241 | None. | |
1242 | ||
1243 | .SH "Mount options for debugfs" | |
1244 | The debugfs filesystem is a pseudo filesystem, traditionally mounted on | |
1245 | .IR /sys/kernel/debug . | |
1246 | .\" or just /debug | |
1247 | .\" present since 2.6.11 | |
88633047 DR |
1248 | As of kernel version 3.4, debugfs has the following options: |
1249 | .TP | |
1250 | .BI uid= n ", gid=" n | |
1251 | Set the owner and group of the mountpoint. | |
1252 | .TP | |
1253 | .BI mode= value | |
1254 | Sets the mode of the mountpoint. | |
60a2a323 KZ |
1255 | .SH "Mount options for devpts" |
1256 | The devpts filesystem is a pseudo filesystem, traditionally mounted on | |
1257 | .IR /dev/pts . | |
1258 | In order to acquire a pseudo terminal, a process opens | |
1259 | .IR /dev/ptmx ; | |
1260 | the number of the pseudo terminal is then made available to the process | |
1261 | and the pseudo terminal slave can be accessed as | |
1262 | .IR /dev/pts/ <number>. | |
1263 | .TP | |
1264 | \fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP | |
1265 | This sets the owner or the group of newly created PTYs to | |
1266 | the specified values. When nothing is specified, they will | |
1267 | be set to the UID and GID of the creating process. | |
1268 | For example, if there is a tty group with GID 5, then | |
1269 | .B gid=5 | |
1270 | will cause newly created PTYs to belong to the tty group. | |
1271 | .TP | |
1272 | .BI mode= value | |
1273 | Set the mode of newly created PTYs to the specified value. | |
1274 | The default is 0600. | |
1275 | A value of | |
1276 | .B mode=620 | |
1277 | and | |
1278 | .B gid=5 | |
1279 | makes "mesg y" the default on newly created PTYs. | |
1280 | .TP | |
1281 | \fBnewinstance | |
1282 | Create a private instance of devpts filesystem, such that | |
1283 | indices of ptys allocated in this new instance are | |
1284 | independent of indices created in other instances of devpts. | |
1285 | ||
1286 | All mounts of devpts without this | |
1287 | .B newinstance | |
1288 | option share the same set of pty indices (i.e legacy mode). | |
1289 | Each mount of devpts with the | |
1290 | .B newinstance | |
1291 | option has a private set of pty indices. | |
1292 | ||
1293 | This option is mainly used to support containers in the | |
1294 | linux kernel. It is implemented in linux kernel versions | |
1295 | starting with 2.6.29. Further, this mount option is valid | |
1296 | only if CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the | |
1297 | kernel configuration. | |
1298 | ||
1299 | To use this option effectively, | |
1300 | .IR /dev/ptmx | |
1301 | must be a symbolic link to | |
1302 | .IR pts/ptmx. | |
1303 | See | |
1304 | .IR Documentation/filesystems/devpts.txt | |
1305 | in the linux kernel source tree for details. | |
1306 | .TP | |
1307 | .BI ptmxmode= value | |
1308 | ||
1309 | Set the mode for the new | |
1310 | .IR ptmx | |
1311 | device node in the devpts filesystem. | |
1312 | ||
1313 | With the support for multiple instances of devpts (see | |
1314 | .B newinstance | |
1315 | option above), each instance has a private | |
1316 | .IR ptmx | |
1317 | node in the root of the devpts filesystem (typically | |
1318 | .IR /dev/pts/ptmx). | |
1319 | ||
1320 | For compatibility with older versions of the kernel, the | |
1321 | default mode of the new | |
1322 | .IR ptmx | |
1323 | node is 0000. | |
1324 | .BI ptmxmode= value | |
1325 | specifies a more useful mode for the | |
1326 | .IR ptmx | |
1327 | node and is highly recommended when the | |
1328 | .B newinstance | |
1329 | option is specified. | |
1330 | ||
1331 | This option is only implemented in linux kernel versions | |
1332 | starting with 2.6.29. Further this option is valid only if | |
1333 | CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the kernel | |
1334 | configuration. | |
1335 | ||
1336 | .SH "Mount options for ext" | |
1337 | None. | |
1338 | Note that the `ext' filesystem is obsolete. Don't use it. | |
1339 | Since Linux version 2.1.21 extfs is no longer part of the kernel source. | |
1340 | ||
1341 | .SH "Mount options for ext2" | |
1342 | The `ext2' filesystem is the standard Linux filesystem. | |
1343 | .\" Due to a kernel bug, it may be mounted with random mount options | |
1344 | .\" (fixed in Linux 2.0.4). | |
1345 | Since Linux 2.5.46, for most mount options the default | |
1346 | is determined by the filesystem superblock. Set them with | |
1347 | .BR tune2fs (8). | |
1348 | .TP | |
1349 | .BR acl | noacl | |
1350 | Support POSIX Access Control Lists (or not). | |
1351 | .\" requires CONFIG_EXT2_FS_POSIX_ACL | |
1352 | .TP | |
1353 | .BR bsddf | minixdf | |
1354 | Set the behaviour for the | |
1355 | .I statfs | |
1356 | system call. The | |
1357 | .B minixdf | |
1358 | behaviour is to return in the | |
1359 | .I f_blocks | |
1360 | field the total number of blocks of the filesystem, while the | |
1361 | .B bsddf | |
1362 | behaviour (which is the default) is to subtract the overhead blocks | |
1363 | used by the ext2 filesystem and not available for file storage. Thus | |
1364 | .nf | |
1365 | ||
1366 | % mount /k -o minixdf; df /k; umount /k | |
1367 | Filesystem 1024-blocks Used Available Capacity Mounted on | |
1368 | /dev/sda6 2630655 86954 2412169 3% /k | |
1369 | % mount /k -o bsddf; df /k; umount /k | |
1370 | Filesystem 1024-blocks Used Available Capacity Mounted on | |
1371 | /dev/sda6 2543714 13 2412169 0% /k | |
1372 | ||
1373 | .fi | |
1374 | (Note that this example shows that one can add command line options | |
1375 | to the options given in | |
1376 | .IR /etc/fstab .) | |
1377 | ||
1378 | .TP | |
1379 | .BR check=none " or " nocheck | |
1380 | No checking is done at mount time. This is the default. This is fast. | |
1381 | It is wise to invoke | |
1382 | .BR e2fsck (8) | |
f036b4c7 | 1383 | every now and then, e.g. at boot time. The non-default behavior is unsupported |
60a2a323 KZ |
1384 | (check=normal and check=strict options have been removed). Note that these mount options |
1385 | don't have to be supported if ext4 kernel driver is used for ext2 and ext3 filesystems. | |
1386 | .TP | |
1387 | .B debug | |
1388 | Print debugging info upon each (re)mount. | |
1389 | .TP | |
1390 | .BR errors= { continue | remount-ro | panic } | |
1391 | Define the behaviour when an error is encountered. | |
1392 | (Either ignore errors and just mark the filesystem erroneous and continue, | |
1393 | or remount the filesystem read-only, or panic and halt the system.) | |
1394 | The default is set in the filesystem superblock, and can be | |
1395 | changed using | |
1396 | .BR tune2fs (8). | |
1397 | .TP | |
1398 | .BR grpid | bsdgroups " and " nogrpid | sysvgroups | |
1399 | These options define what group id a newly created file gets. | |
1400 | When | |
1401 | .BR grpid | |
1402 | is set, it takes the group id of the directory in which it is created; | |
1403 | otherwise (the default) it takes the fsgid of the current process, unless | |
1404 | the directory has the setgid bit set, in which case it takes the gid | |
1405 | from the parent directory, and also gets the setgid bit set | |
1406 | if it is a directory itself. | |
1407 | .TP | |
1408 | .BR grpquota | noquota | quota | usrquota | |
7860d8f5 BJ |
1409 | The usrquota (same as quota) mount option enables user quota support on the |
1410 | filesystem. grpquota enables group quotas support. You need the quota utilities | |
1411 | to actually enable and manage the quota system. | |
60a2a323 KZ |
1412 | .TP |
1413 | .BR nouid32 | |
1414 | Disables 32-bit UIDs and GIDs. This is for interoperability with older | |
1415 | kernels which only store and expect 16-bit values. | |
1416 | .TP | |
1417 | .BR oldalloc " or " orlov | |
1418 | Use old allocator or Orlov allocator for new inodes. Orlov is default. | |
1419 | .TP | |
1420 | \fBresgid=\fP\fIn\fP and \fBresuid=\fP\fIn\fP | |
1421 | The ext2 filesystem reserves a certain percentage of the available | |
1422 | space (by default 5%, see | |
1423 | .BR mke2fs (8) | |
1424 | and | |
1425 | .BR tune2fs (8)). | |
1426 | These options determine who can use the reserved blocks. | |
1427 | (Roughly: whoever has the specified uid, or belongs to the specified group.) | |
1428 | .TP | |
1429 | .BI sb= n | |
1430 | Instead of block 1, use block | |
1431 | .I n | |
1432 | as superblock. This could be useful when the filesystem has been damaged. | |
1433 | (Earlier, copies of the superblock would be made every 8192 blocks: in | |
1434 | block 1, 8193, 16385, ... (and one got thousands of copies on | |
1435 | a big filesystem). Since version 1.08, | |
1436 | .B mke2fs | |
1437 | has a \-s (sparse superblock) option to reduce the number of backup | |
1438 | superblocks, and since version 1.15 this is the default. Note | |
1439 | that this may mean that ext2 filesystems created by a recent | |
1440 | .B mke2fs | |
1441 | cannot be mounted r/w under Linux 2.0.*.) | |
1442 | The block number here uses 1k units. Thus, if you want to use logical | |
1443 | block 32768 on a filesystem with 4k blocks, use "sb=131072". | |
1444 | .TP | |
1445 | .BR user_xattr | nouser_xattr | |
1446 | Support "user." extended attributes (or not). | |
1447 | .\" requires CONFIG_EXT2_FS_XATTR | |
1448 | ||
1449 | ||
1450 | .SH "Mount options for ext3" | |
1451 | The ext3 filesystem is a version of the ext2 filesystem which has been | |
f036b4c7 | 1452 | enhanced with journaling. It supports the same options as ext2 as |
60a2a323 KZ |
1453 | well as the following additions: |
1454 | .\" .TP | |
1455 | .\" .BR abort | |
1456 | .\" Mount the filesystem in abort mode, as if a fatal error has occurred. | |
1457 | .TP | |
1458 | .BR journal=update | |
1459 | Update the ext3 filesystem's journal to the current format. | |
1460 | .TP | |
1461 | .BR journal=inum | |
1462 | When a journal already exists, this option is ignored. Otherwise, it | |
1463 | specifies the number of the inode which will represent the ext3 filesystem's | |
1464 | journal file; ext3 will create a new journal, overwriting the old contents | |
1465 | of the file whose inode number is | |
1466 | .IR inum . | |
1467 | .TP | |
79f84818 | 1468 | .BR journal_dev=devnum |
60a2a323 KZ |
1469 | When the external journal device's major/minor numbers |
1470 | have changed, this option allows the user to specify | |
1471 | the new journal location. The journal device is | |
1472 | identified through its new major/minor numbers encoded | |
1473 | in devnum. | |
1474 | .TP | |
1475 | .BR norecovery / noload | |
1476 | Don't load the journal on mounting. Note that | |
1477 | if the filesystem was not unmounted cleanly, | |
1478 | skipping the journal replay will lead to the | |
1479 | filesystem containing inconsistencies that can | |
1480 | lead to any number of problems. | |
1481 | .TP | |
1482 | .BR data= { journal | ordered | writeback } | |
f036b4c7 | 1483 | Specifies the journaling mode for file data. Metadata is always journaled. |
60a2a323 KZ |
1484 | To use modes other than |
1485 | .B ordered | |
1486 | on the root filesystem, pass the mode to the kernel as boot parameter, e.g. | |
1487 | .IR rootflags=data=journal . | |
1488 | .RS | |
1489 | .TP | |
1490 | .B journal | |
1491 | All data is committed into the journal prior to being written into the | |
1492 | main filesystem. | |
1493 | .TP | |
1494 | .B ordered | |
1495 | This is the default mode. All data is forced directly out to the main file | |
1496 | system prior to its metadata being committed to the journal. | |
1497 | .TP | |
1498 | .B writeback | |
1499 | Data ordering is not preserved - data may be written into the main | |
1500 | filesystem after its metadata has been committed to the journal. | |
1501 | This is rumoured to be the highest-throughput option. It guarantees | |
1502 | internal filesystem integrity, however it can allow old data to appear | |
1503 | in files after a crash and journal recovery. | |
1504 | .RE | |
1505 | .TP | |
1506 | .BR barrier=0 " / " barrier=1 " | |
1507 | This enables/disables barriers. barrier=0 disables it, barrier=1 enables it. | |
1508 | Write barriers enforce proper on-disk ordering of journal commits, making | |
1509 | volatile disk write caches safe to use, at some performance penalty. The ext3 | |
1510 | filesystem does not enable write barriers by default. Be sure to enable | |
1511 | barriers unless your disks are battery-backed one way or another. Otherwise | |
1512 | you risk filesystem corruption in case of power failure. | |
1513 | .TP | |
1514 | .BI commit= nrsec | |
1515 | Sync all data and metadata every | |
1516 | .I nrsec | |
1517 | seconds. The default value is 5 seconds. Zero means default. | |
1518 | .TP | |
1519 | .BR user_xattr | |
1520 | Enable Extended User Attributes. See the | |
1521 | .BR attr (5) | |
1522 | manual page. | |
1523 | .TP | |
1524 | .BR acl | |
1525 | Enable POSIX Access Control Lists. See the | |
1526 | .BR acl (5) | |
1527 | manual page. | |
ea39af9a | 1528 | .TP |
309f26bb | 1529 | .BR usrjquota=aquota.user | grpjquota=aquota.group | jqfmt=vfsv0 |
ea39af9a BJ |
1530 | Apart from the old quota system (as in ext2, jqfmt=vfsold aka version 1 quota) |
1531 | ext3 also supports journaled quotas (version 2 quota). jqfmt=vfsv0 | |
1532 | enables journaled quotas. For journaled quotas the mount options | |
309f26bb | 1533 | usrjquota=aquota.user and grpjquota=aquota.group are required to tell the |
ea39af9a BJ |
1534 | quota system which quota database files to use. Journaled quotas have the |
1535 | advantage that even after a crash no quota check is required. | |
60a2a323 KZ |
1536 | |
1537 | .SH "Mount options for ext4" | |
1538 | The ext4 filesystem is an advanced level of the ext3 filesystem which | |
1539 | incorporates scalability and reliability enhancements for supporting large | |
1540 | filesystem. | |
1541 | ||
1542 | The options | |
1543 | .B journal_dev, noload, data, commit, orlov, oldalloc, [no]user_xattr | |
1544 | .B [no]acl, bsddf, minixdf, debug, errors, data_err, grpid, bsdgroups, nogrpid | |
ea39af9a | 1545 | .B sysvgroups, resgid, resuid, sb, quota, noquota, grpquota, usrquota |
309f26bb | 1546 | .B usrjquota, grpjquota and jqfmt |
60a2a323 KZ |
1547 | are backwardly compatible with ext3 or ext2. |
1548 | .TP | |
1549 | .BR journal_checksum | |
1550 | Enable checksumming of the journal transactions. This will allow the recovery | |
1551 | code in e2fsck and the kernel to detect corruption in the kernel. It is a | |
1552 | compatible change and will be ignored by older kernels. | |
1553 | .TP | |
1554 | .BR journal_async_commit | |
1555 | Commit block can be written to disk without waiting for descriptor blocks. If | |
1556 | enabled older kernels cannot mount the device. | |
1557 | This will enable 'journal_checksum' internally. | |
1558 | .TP | |
60a2a323 KZ |
1559 | .BR barrier=0 " / " barrier=1 " / " barrier " / " nobarrier |
1560 | This enables/disables the use of write barriers in the jbd code. barrier=0 | |
1561 | disables, barrier=1 enables. This also requires an IO stack which can support | |
1562 | barriers, and if jbd gets an error on a barrier write, it will disable again | |
1563 | with a warning. Write barriers enforce proper on-disk ordering of journal | |
1564 | commits, making volatile disk write caches safe to use, at some performance | |
1565 | penalty. If your disks are battery-backed in one way or another, disabling | |
1566 | barriers may safely improve performance. The mount options "barrier" and | |
1567 | "nobarrier" can also be used to enable or disable barriers, for consistency | |
1568 | with other ext4 mount options. | |
1569 | ||
1570 | The ext4 filesystem enables write barriers by default. | |
1571 | .TP | |
6934547d | 1572 | .BI inode_readahead_blks= n |
60a2a323 KZ |
1573 | This tuning parameter controls the maximum number of inode table blocks that |
1574 | ext4's inode table readahead algorithm will pre-read into the buffer cache. | |
6934547d | 1575 | The value must be a power of 2. The default value is 32 blocks. |
60a2a323 KZ |
1576 | .TP |
1577 | .BI stripe= n | |
1578 | Number of filesystem blocks that mballoc will try to use for allocation size | |
1579 | and alignment. For RAID5/6 systems this should be the number of data disks * | |
1580 | RAID chunk size in filesystem blocks. | |
1581 | .TP | |
1582 | .BR delalloc | |
1583 | Deferring block allocation until write-out time. | |
1584 | .TP | |
1585 | .BR nodelalloc | |
1586 | Disable delayed allocation. Blocks are allocated when data is copied from user | |
1587 | to page cache. | |
1588 | .TP | |
1589 | .BI max_batch_time= usec | |
1590 | Maximum amount of time ext4 should wait for additional filesystem operations to | |
1591 | be batch together with a synchronous write operation. Since a synchronous | |
1592 | write operation is going to force a commit and then a wait for the I/O | |
1593 | complete, it doesn't cost much, and can be a huge throughput win, we wait for a | |
1594 | small amount of time to see if any other transactions can piggyback on the | |
1595 | synchronous write. The algorithm used is designed to automatically tune for | |
1596 | the speed of the disk, by measuring the amount of time (on average) that it | |
1597 | takes to finish committing a transaction. Call this time the "commit time". | |
1598 | If the time that the transaction has been running is less than the commit time, | |
1599 | ext4 will try sleeping for the commit time to see if other operations will join | |
1600 | the transaction. The commit time is capped by the max_batch_time, which | |
1601 | defaults to 15000us (15ms). This optimization can be turned off entirely by | |
1602 | setting max_batch_time to 0. | |
1603 | .TP | |
1604 | .BI min_batch_time= usec | |
1605 | This parameter sets the commit time (as described above) to be at least | |
1606 | min_batch_time. It defaults to zero microseconds. Increasing this parameter | |
1607 | may improve the throughput of multi-threaded, synchronous workloads on very | |
1608 | fast disks, at the cost of increasing latency. | |
1609 | .TP | |
1610 | .BI journal_ioprio= prio | |
f036b4c7 | 1611 | The I/O priority (from 0 to 7, where 0 is the highest priority) which should be |
60a2a323 KZ |
1612 | used for I/O operations submitted by kjournald2 during a commit operation. |
1613 | This defaults to 3, which is a slightly higher priority than the default I/O | |
1614 | priority. | |
1615 | .TP | |
1616 | .BR abort | |
1617 | Simulate the effects of calling ext4_abort() for | |
1618 | debugging purposes. This is normally used while | |
1619 | remounting a filesystem which is already mounted. | |
1620 | .TP | |
1621 | .BR auto_da_alloc | noauto_da_alloc | |
1622 | Many broken applications don't use fsync() when | |
1623 | replacing existing files via patterns such as | |
1624 | ||
1625 | fd = open("foo.new")/write(fd,..)/close(fd)/ rename("foo.new", "foo") | |
1626 | ||
1627 | or worse yet | |
1628 | ||
1629 | fd = open("foo", O_TRUNC)/write(fd,..)/close(fd). | |
1630 | ||
1631 | If auto_da_alloc is enabled, ext4 will detect the replace-via-rename and | |
1632 | replace-via-truncate patterns and force that any delayed allocation blocks are | |
1633 | allocated such that at the next journal commit, in the default data=ordered | |
1634 | mode, the data blocks of the new file are forced to disk before the rename() | |
1635 | operation is committed. This provides roughly the same level of guarantees as | |
1636 | ext3, and avoids the "zero-length" problem that can happen when a system | |
1637 | crashes before the delayed allocation blocks are forced to disk. | |
1638 | .TP | |
1639 | .BR discard / nodiscard | |
1640 | Controls whether ext4 should issue discard/TRIM commands to the underlying | |
1641 | block device when blocks are freed. This is useful for SSD devices and | |
1642 | sparse/thinly-provisioned LUNs, but it is off by default until sufficient | |
1643 | testing has been done. | |
1644 | .TP | |
1645 | .BR nouid32 | |
1646 | Disables 32-bit UIDs and GIDs. This is for | |
1647 | interoperability with older kernels which only | |
1648 | store and expect 16-bit values. | |
1649 | .TP | |
1650 | .BR resize | |
1651 | Allows to resize filesystem to the end of the last | |
1652 | existing block group, further resize has to be done | |
1653 | with resize2fs either online, or offline. It can be | |
1654 | used only with conjunction with remount. | |
1655 | .TP | |
1656 | .BR block_validity / noblock_validity | |
1657 | This options allows to enables/disables the in-kernel facility for tracking | |
1658 | filesystem metadata blocks within internal data structures. This allows multi- | |
1659 | block allocator and other routines to quickly locate extents which might | |
1660 | overlap with filesystem metadata blocks. This option is intended for debugging | |
1661 | purposes and since it negatively affects the performance, it is off by default. | |
1662 | .TP | |
1663 | .BR dioread_lock / dioread_nolock | |
1664 | Controls whether or not ext4 should use the DIO read locking. If the | |
1665 | dioread_nolock option is specified ext4 will allocate uninitialized extent | |
1666 | before buffer write and convert the extent to initialized after IO completes. | |
1667 | This approach allows ext4 code to avoid using inode mutex, which improves | |
1668 | scalability on high speed storages. However this does not work with data | |
1669 | journaling and dioread_nolock option will be ignored with kernel warning. | |
1670 | Note that dioread_nolock code path is only used for extent-based files. | |
1671 | Because of the restrictions this options comprises it is off by default | |
1672 | (e.g. dioread_lock). | |
1673 | .TP | |
1674 | .BR i_version | |
1675 | Enable 64-bit inode version support. This option is off by default. | |
1676 | ||
1677 | .SH "Mount options for fat" | |
1678 | (Note: | |
1679 | .I fat | |
1680 | is not a separate filesystem, but a common part of the | |
1681 | .IR msdos , | |
1682 | .I umsdos | |
1683 | and | |
1684 | .I vfat | |
1685 | filesystems.) | |
1686 | .TP | |
1687 | .BR blocksize= { 512 | 1024 | 2048 } | |
1688 | Set blocksize (default 512). This option is obsolete. | |
1689 | .TP | |
1690 | \fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP | |
1691 | Set the owner and group of all files. | |
1692 | (Default: the uid and gid of the current process.) | |
1693 | .TP | |
1694 | .BI umask= value | |
1695 | Set the umask (the bitmask of the permissions that are | |
1696 | .B not | |
1697 | present). The default is the umask of the current process. | |
1698 | The value is given in octal. | |
1699 | .TP | |
1700 | .BI dmask= value | |
1701 | Set the umask applied to directories only. | |
1702 | The default is the umask of the current process. | |
1703 | The value is given in octal. | |
1704 | .\" Present since Linux 2.5.43. | |
1705 | .TP | |
1706 | .BI fmask= value | |
1707 | Set the umask applied to regular files only. | |
1708 | The default is the umask of the current process. | |
1709 | The value is given in octal. | |
1710 | .\" Present since Linux 2.5.43. | |
1711 | .TP | |
1712 | .BI allow_utime= value | |
1713 | This option controls the permission check of mtime/atime. | |
1714 | .RS | |
1715 | .TP | |
1716 | .B 20 | |
1717 | If current process is in group of file's group ID, you can change timestamp. | |
1718 | .TP | |
1719 | .B 2 | |
1720 | Other users can change timestamp. | |
1721 | .PP | |
1722 | The default is set from `dmask' option. (If the directory is writable, | |
8323d9fd | 1723 | .BR utime (2) |
60a2a323 KZ |
1724 | is also allowed. I.e. ~dmask & 022) |
1725 | ||
1726 | Normally | |
8323d9fd | 1727 | .BR utime (2) |
60a2a323 KZ |
1728 | checks current process is owner of the file, or it has |
1729 | CAP_FOWNER capability. But FAT filesystem doesn't have uid/gid on disk, so | |
f036b4c7 | 1730 | normal check is too inflexible. With this option you can relax it. |
60a2a323 KZ |
1731 | .RE |
1732 | .TP | |
1733 | .BI check= value | |
1734 | Three different levels of pickyness can be chosen: | |
1735 | .RS | |
1736 | .TP | |
1737 | .BR r [ elaxed ] | |
1738 | Upper and lower case are accepted and equivalent, long name parts are | |
1739 | truncated (e.g. | |
1740 | .I verylongname.foobar | |
1741 | becomes | |
1742 | .IR verylong.foo ), | |
1743 | leading and embedded spaces are accepted in each name part (name and extension). | |
1744 | .TP | |
1745 | .BR n [ ormal ] | |
1746 | Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are | |
1747 | rejected. This is the default. | |
1748 | .TP | |
1749 | .BR s [ trict ] | |
1750 | Like "normal", but names may not contain long parts and special characters | |
1751 | that are sometimes used on Linux, but are not accepted by MS-DOS are | |
1752 | rejected. (+, =, spaces, etc.) | |
1753 | .RE | |
1754 | .TP | |
1755 | .BI codepage= value | |
1756 | Sets the codepage for converting to shortname characters on FAT | |
1757 | and VFAT filesystems. By default, codepage 437 is used. | |
1758 | .TP | |
1759 | .BR conv= {b [ inary ]| t [ ext ]| a [ uto ]} | |
1760 | The | |
1761 | .I fat | |
1762 | filesystem can perform CRLF<-->NL (MS-DOS text format to UNIX text | |
1763 | format) conversion in the kernel. The following conversion modes are | |
1764 | available: | |
1765 | .RS | |
1766 | .TP | |
1767 | .B binary | |
1768 | no translation is performed. This is the default. | |
1769 | .TP | |
1770 | .B text | |
1771 | CRLF<-->NL translation is performed on all files. | |
1772 | .TP | |
1773 | .B auto | |
1774 | CRLF<-->NL translation is performed on all files that don't have a | |
1775 | "well-known binary" extension. The list of known extensions can be found at | |
1776 | the beginning of | |
1777 | .I fs/fat/misc.c | |
1778 | (as of 2.0, the list is: exe, com, bin, app, sys, drv, ovl, ovr, obj, | |
1779 | lib, dll, pif, arc, zip, lha, lzh, zoo, tar, z, arj, tz, taz, tzp, tpz, | |
1780 | gz, tgz, deb, gif, bmp, tif, gl, jpg, pcx, tfm, vf, gf, pk, pxl, dvi). | |
1781 | .PP | |
1782 | Programs that do computed lseeks won't like in-kernel text conversion. | |
1783 | Several people have had their data ruined by this translation. Beware! | |
1784 | ||
1785 | For filesystems mounted in binary mode, a conversion tool | |
1786 | (fromdos/todos) is available. This option is obsolete. | |
1787 | .RE | |
1788 | .TP | |
1789 | .BI cvf_format= module | |
1790 | Forces the driver to use the CVF (Compressed Volume File) module | |
1791 | .RI cvf_ module | |
1792 | instead of auto-detection. If the kernel supports kmod, the | |
1793 | cvf_format=xxx option also controls on-demand CVF module loading. | |
1794 | This option is obsolete. | |
1795 | .TP | |
1796 | .BI cvf_option= option | |
1797 | Option passed to the CVF module. This option is obsolete. | |
1798 | .TP | |
1799 | .B debug | |
1800 | Turn on the | |
1801 | .I debug | |
1802 | flag. A version string and a list of filesystem parameters will be | |
1803 | printed (these data are also printed if the parameters appear to be | |
1804 | inconsistent). | |
1805 | .TP | |
ec34526a SM |
1806 | .B discard |
1807 | If set, causes discard/TRIM commands to be issued to the block device | |
1808 | when blocks are freed. This is useful for SSD devices and | |
f036b4c7 | 1809 | sparse/thinly-provisioned LUNs. |
ec34526a | 1810 | .TP |
60a2a323 KZ |
1811 | .BR fat= {12 | 16 | 32 } |
1812 | Specify a 12, 16 or 32 bit fat. This overrides | |
1813 | the automatic FAT type detection routine. Use with caution! | |
1814 | .TP | |
1815 | .BI iocharset= value | |
1816 | Character set to use for converting between 8 bit characters | |
1817 | and 16 bit Unicode characters. The default is iso8859-1. | |
1818 | Long filenames are stored on disk in Unicode format. | |
1819 | .TP | |
ec34526a SM |
1820 | .B nfs |
1821 | If set, enables in-memory indexing of directory inodes to reduce the | |
1822 | frequency of ESTALE errors in NFS client operations. Useful only when | |
1823 | the filesystem is exported via NFS. | |
1824 | .TP | |
60a2a323 KZ |
1825 | .BI tz=UTC |
1826 | This option disables the conversion of timestamps | |
1827 | between local time (as used by Windows on FAT) and UTC | |
1828 | (which Linux uses internally). This is particularly | |
1829 | useful when mounting devices (like digital cameras) | |
1830 | that are set to UTC in order to avoid the pitfalls of | |
1831 | local time. | |
1832 | .TP | |
1833 | .B quiet | |
1834 | Turn on the | |
1835 | .I quiet | |
1836 | flag. Attempts to chown or chmod files do not return errors, | |
1837 | although they fail. Use with caution! | |
1838 | .TP | |
1839 | .B showexec | |
1840 | If set, the execute permission bits of the file will be allowed only if | |
1841 | the extension part of the name is .EXE, .COM, or .BAT. Not set by default. | |
1842 | .TP | |
1843 | .B sys_immutable | |
1844 | If set, ATTR_SYS attribute on FAT is handled as IMMUTABLE flag on Linux. | |
1845 | Not set by default. | |
1846 | .TP | |
1847 | .B flush | |
1848 | If set, the filesystem will try to flush to disk more early than normal. | |
1849 | Not set by default. | |
1850 | .TP | |
1851 | .B usefree | |
1852 | Use the "free clusters" value stored on FSINFO. It'll | |
1853 | be used to determine number of free clusters without | |
1854 | scanning disk. But it's not used by default, because | |
1855 | recent Windows don't update it correctly in some | |
1856 | case. If you are sure the "free clusters" on FSINFO is | |
1857 | correct, by this option you can avoid scanning disk. | |
1858 | .TP | |
1859 | .BR dots ", " nodots ", " dotsOK= [ yes | no ] | |
1860 | Various misguided attempts to force Unix or DOS conventions | |
1861 | onto a FAT filesystem. | |
1862 | ||
1863 | .SH "Mount options for hfs" | |
1864 | .TP | |
1865 | .BI creator= cccc ", type=" cccc | |
1866 | Set the creator/type values as shown by the MacOS finder | |
1867 | used for creating new files. Default values: '????'. | |
1868 | .TP | |
1869 | .BI uid= n ", gid=" n | |
1870 | Set the owner and group of all files. | |
1871 | (Default: the uid and gid of the current process.) | |
1872 | .TP | |
1873 | .BI dir_umask= n ", file_umask=" n ", umask=" n | |
1874 | Set the umask used for all directories, all regular files, or all | |
1875 | files and directories. Defaults to the umask of the current process. | |
1876 | .TP | |
1877 | .BI session= n | |
1878 | Select the CDROM session to mount. | |
1879 | Defaults to leaving that decision to the CDROM driver. | |
1880 | This option will fail with anything but a CDROM as underlying device. | |
1881 | .TP | |
1882 | .BI part= n | |
1883 | Select partition number n from the device. | |
1884 | Only makes sense for CDROMs. | |
1885 | Defaults to not parsing the partition table at all. | |
1886 | .TP | |
1887 | .B quiet | |
1888 | Don't complain about invalid mount options. | |
1889 | ||
1890 | .SH "Mount options for hpfs" | |
1891 | .TP | |
1892 | \fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP | |
1893 | Set the owner and group of all files. (Default: the uid and gid | |
1894 | of the current process.) | |
1895 | .TP | |
1896 | .BI umask= value | |
1897 | Set the umask (the bitmask of the permissions that are | |
1898 | .B not | |
1899 | present). The default is the umask of the current process. | |
1900 | The value is given in octal. | |
1901 | .TP | |
1902 | .BR case= { lower | asis } | |
1903 | Convert all files names to lower case, or leave them. | |
1904 | (Default: | |
1905 | .BR case=lower .) | |
1906 | .TP | |
1907 | .BR conv= { binary | text | auto } | |
1908 | For | |
1909 | .BR conv=text , | |
1910 | delete some random CRs (in particular, all followed by NL) | |
1911 | when reading a file. | |
1912 | For | |
1913 | .BR conv=auto , | |
1914 | choose more or less at random between | |
1915 | .BR conv=binary " and " conv=text . | |
1916 | For | |
1917 | .BR conv=binary , | |
1918 | just read what is in the file. This is the default. | |
1919 | .TP | |
1920 | .B nocheck | |
1921 | Do not abort mounting when certain consistency checks fail. | |
1922 | ||
1923 | .SH "Mount options for iso9660" | |
1924 | ISO 9660 is a standard describing a filesystem structure to be used | |
1925 | on CD-ROMs. (This filesystem type is also seen on some DVDs. See also the | |
1926 | .I udf | |
1927 | filesystem.) | |
1928 | ||
1929 | Normal | |
1930 | .I iso9660 | |
1931 | filenames appear in a 8.3 format (i.e., DOS-like restrictions on filename | |
1932 | length), and in addition all characters are in upper case. Also there is | |
1933 | no field for file ownership, protection, number of links, provision for | |
1934 | block/character devices, etc. | |
1935 | ||
1936 | Rock Ridge is an extension to iso9660 that provides all of these UNIX-like | |
1937 | features. Basically there are extensions to each directory record that | |
1938 | supply all of the additional information, and when Rock Ridge is in use, | |
1939 | the filesystem is indistinguishable from a normal UNIX filesystem (except | |
1940 | that it is read-only, of course). | |
1941 | .TP | |
1942 | .B norock | |
1943 | Disable the use of Rock Ridge extensions, even if available. Cf.\& | |
1944 | .BR map . | |
1945 | .TP | |
1946 | .B nojoliet | |
1947 | Disable the use of Microsoft Joliet extensions, even if available. Cf.\& | |
1948 | .BR map . | |
1949 | .TP | |
1950 | .BR check= { r [ elaxed ]| s [ trict ]} | |
1951 | With | |
1952 | .BR check=relaxed , | |
1953 | a filename is first converted to lower case before doing the lookup. | |
1954 | This is probably only meaningful together with | |
1955 | .B norock | |
1956 | and | |
1957 | .BR map=normal . | |
1958 | (Default: | |
1959 | .BR check=strict .) | |
1960 | .TP | |
1961 | \fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP | |
1962 | Give all files in the filesystem the indicated user or group id, | |
1963 | possibly overriding the information found in the Rock Ridge extensions. | |
1964 | (Default: | |
1965 | .BR uid=0,gid=0 .) | |
1966 | .TP | |
1967 | .BR map= { n [ ormal ]| o [ ff ]| a [ corn ]} | |
1968 | For non-Rock Ridge volumes, normal name translation maps upper | |
1969 | to lower case ASCII, drops a trailing `;1', and converts `;' to `.'. | |
1970 | With | |
1971 | .B map=off | |
1972 | no name translation is done. See | |
1973 | .BR norock . | |
1974 | (Default: | |
1975 | .BR map=normal .) | |
1976 | .B map=acorn | |
1977 | is like | |
1978 | .BR map=normal | |
1979 | but also apply Acorn extensions if present. | |
1980 | .TP | |
1981 | .BI mode= value | |
1982 | For non-Rock Ridge volumes, give all files the indicated mode. | |
1983 | (Default: read permission for everybody.) | |
1984 | Since Linux 2.1.37 one no longer needs to specify the mode in | |
1985 | decimal. (Octal is indicated by a leading 0.) | |
1986 | .TP | |
1987 | .B unhide | |
1988 | Also show hidden and associated files. | |
1989 | (If the ordinary files and the associated or hidden files have | |
1990 | the same filenames, this may make the ordinary files inaccessible.) | |
1991 | .TP | |
1992 | .BR block= { 512 | 1024 | 2048 } | |
1993 | Set the block size to the indicated value. | |
1994 | (Default: | |
1995 | .BR block=1024 .) | |
1996 | .TP | |
1997 | .BR conv= { a [ uto ]| b [ inary ]| m [ text ]| t [ ext ]} | |
1998 | (Default: | |
1999 | .BR conv=binary .) | |
2000 | Since Linux 1.3.54 this option has no effect anymore. | |
2001 | (And non-binary settings used to be very dangerous, | |
2002 | possibly leading to silent data corruption.) | |
2003 | .TP | |
2004 | .B cruft | |
2005 | If the high byte of the file length contains other garbage, | |
2006 | set this mount option to ignore the high order bits of the file length. | |
2007 | This implies that a file cannot be larger than 16MB. | |
2008 | .TP | |
2009 | .BI session= x | |
2010 | Select number of session on multisession CD. (Since 2.3.4.) | |
2011 | .TP | |
2012 | .BI sbsector= xxx | |
2013 | Session begins from sector xxx. (Since 2.3.4.) | |
2014 | .LP | |
2015 | The following options are the same as for vfat and specifying them only makes | |
2016 | sense when using discs encoded using Microsoft's Joliet extensions. | |
2017 | .TP | |
2018 | .BI iocharset= value | |
2019 | Character set to use for converting 16 bit Unicode characters on CD | |
2020 | to 8 bit characters. The default is iso8859-1. | |
2021 | .TP | |
2022 | .B utf8 | |
2023 | Convert 16 bit Unicode characters on CD to UTF-8. | |
2024 | ||
2025 | .SH "Mount options for jfs" | |
2026 | .TP | |
2027 | .BI iocharset= name | |
2028 | Character set to use for converting from Unicode to ASCII. The default is | |
2029 | to do no conversion. Use | |
2030 | .B iocharset=utf8 | |
2031 | for UTF8 translations. This requires CONFIG_NLS_UTF8 to be set in | |
2032 | the kernel | |
2033 | .I ".config" | |
2034 | file. | |
2035 | .TP | |
2036 | .BI resize= value | |
2037 | Resize the volume to | |
2038 | .I value | |
2039 | blocks. JFS only supports growing a volume, not shrinking it. This option | |
2040 | is only valid during a remount, when the volume is mounted read-write. The | |
2041 | .B resize | |
2042 | keyword with no value will grow the volume to the full size of the partition. | |
2043 | .TP | |
2044 | .B nointegrity | |
2045 | Do not write to the journal. The primary use of this option is to allow | |
2046 | for higher performance when restoring a volume from backup media. The | |
f036b4c7 | 2047 | integrity of the volume is not guaranteed if the system abnormally ends. |
60a2a323 KZ |
2048 | .TP |
2049 | .B integrity | |
2050 | Default. Commit metadata changes to the journal. Use this option to remount | |
2051 | a volume where the | |
2052 | .B nointegrity | |
2053 | option was previously specified in order to restore normal behavior. | |
2054 | .TP | |
2055 | .BR errors= { continue | remount-ro | panic } | |
2056 | Define the behaviour when an error is encountered. | |
2057 | (Either ignore errors and just mark the filesystem erroneous and continue, | |
2058 | or remount the filesystem read-only, or panic and halt the system.) | |
2059 | .TP | |
2060 | .BR noquota | quota | usrquota | grpquota | |
2061 | These options are accepted but ignored. | |
2062 | ||
2063 | .SH "Mount options for minix" | |
2064 | None. | |
2065 | ||
2066 | .SH "Mount options for msdos" | |
2067 | See mount options for fat. | |
2068 | If the | |
2069 | .I msdos | |
2070 | filesystem detects an inconsistency, it reports an error and sets the file | |
2071 | system read-only. The filesystem can be made writable again by remounting | |
2072 | it. | |
2073 | ||
2074 | .SH "Mount options for ncpfs" | |
2075 | Just like | |
2076 | .IR nfs ", the " ncpfs | |
2077 | implementation expects a binary argument (a | |
2078 | .IR "struct ncp_mount_data" ) | |
2079 | to the mount system call. This argument is constructed by | |
2080 | .BR ncpmount (8) | |
2081 | and the current version of | |
2082 | .B mount | |
2083 | (2.12) does not know anything about ncpfs. | |
2084 | ||
2085 | .SH "Mount options for nfs and nfs4" | |
2086 | See the options section of the | |
2087 | .BR nfs (5) | |
2088 | man page (nfs-utils package must be installed). | |
2089 | ||
2090 | The | |
2091 | .IR nfs " and " nfs4 | |
2092 | implementation expects a binary argument (a | |
2093 | .IR "struct nfs_mount_data" ) | |
2094 | to the mount system call. This argument is constructed by | |
2095 | .BR mount.nfs (8) | |
2096 | and the current version of | |
2097 | .B mount | |
2098 | (2.13) does not know anything about nfs and nfs4. | |
2099 | ||
2100 | .SH "Mount options for ntfs" | |
2101 | .TP | |
2102 | .BI iocharset= name | |
2103 | Character set to use when returning file names. | |
2104 | Unlike VFAT, NTFS suppresses names that contain | |
2105 | nonconvertible characters. Deprecated. | |
2106 | .\" since 2.5.11 | |
2107 | .TP | |
2108 | .BI nls= name | |
2109 | New name for the option earlier called | |
2110 | .IR iocharset . | |
2111 | .\" since 2.5.11 | |
2112 | .TP | |
2113 | .BR utf8 | |
2114 | Use UTF-8 for converting file names. | |
2115 | .TP | |
2116 | .BR uni_xlate= { 0 | 1 | 2 } | |
2117 | For 0 (or `no' or `false'), do not use escape sequences | |
2118 | for unknown Unicode characters. | |
2119 | For 1 (or `yes' or `true') or 2, use vfat-style 4-byte escape sequences | |
2120 | starting with ":". Here 2 give a little-endian encoding | |
2121 | and 1 a byteswapped bigendian encoding. | |
2122 | .TP | |
2123 | .B posix=[0|1] | |
2124 | If enabled (posix=1), the filesystem distinguishes between | |
2125 | upper and lower case. The 8.3 alias names are presented as | |
2126 | hard links instead of being suppressed. This option is obsolete. | |
2127 | .TP | |
2128 | \fBuid=\fP\fIvalue\fP, \fBgid=\fP\fIvalue\fP and \fBumask=\fP\fIvalue\fP | |
2129 | Set the file permission on the filesystem. | |
2130 | The umask value is given in octal. | |
2131 | By default, the files are owned by root and not readable by somebody else. | |
2132 | ||
2133 | .SH "Mount options for proc" | |
2134 | .TP | |
2135 | \fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP | |
2136 | These options are recognized, but have no effect as far as I can see. | |
2137 | ||
2138 | .SH "Mount options for ramfs" | |
2139 | Ramfs is a memory based filesystem. Mount it and you have it. Unmount it | |
2140 | and it is gone. Present since Linux 2.3.99pre4. | |
2141 | There are no mount options. | |
2142 | ||
2143 | .SH "Mount options for reiserfs" | |
2144 | Reiserfs is a journaling filesystem. | |
2145 | .TP | |
2146 | .BR conv | |
2147 | Instructs version 3.6 reiserfs software to mount a version 3.5 filesystem, | |
2148 | using the 3.6 format for newly created objects. This filesystem will no | |
2149 | longer be compatible with reiserfs 3.5 tools. | |
2150 | .TP | |
2151 | .BR hash= { rupasov | tea | r5 | detect } | |
2152 | Choose which hash function reiserfs will use to find files within directories. | |
2153 | .RS | |
2154 | .TP | |
2155 | .B rupasov | |
2156 | A hash invented by Yury Yu. Rupasov. It is fast and preserves locality, | |
2157 | mapping lexicographically close file names to close hash values. | |
2158 | This option should not be used, as it causes a high probability of hash | |
2159 | collisions. | |
2160 | .TP | |
2161 | .B tea | |
2162 | A Davis-Meyer function implemented by Jeremy Fitzhardinge. | |
2163 | It uses hash permuting bits in the name. It gets high randomness | |
2164 | and, therefore, low probability of hash collisions at some CPU cost. | |
2165 | This may be used if EHASHCOLLISION errors are experienced with the r5 hash. | |
2166 | .TP | |
2167 | .B r5 | |
2168 | A modified version of the rupasov hash. It is used by default and is | |
2169 | the best choice unless the filesystem has huge directories and | |
2170 | unusual file-name patterns. | |
2171 | .TP | |
2172 | .B detect | |
2173 | Instructs | |
2174 | .IR mount | |
2175 | to detect which hash function is in use by examining | |
2176 | the filesystem being mounted, and to write this information into | |
2177 | the reiserfs superblock. This is only useful on the first mount of | |
2178 | an old format filesystem. | |
2179 | .RE | |
2180 | .TP | |
2181 | .BR hashed_relocation | |
2182 | Tunes the block allocator. This may provide performance improvements | |
2183 | in some situations. | |
2184 | .TP | |
2185 | .BR no_unhashed_relocation | |
2186 | Tunes the block allocator. This may provide performance improvements | |
2187 | in some situations. | |
2188 | .TP | |
2189 | .BR noborder | |
2190 | Disable the border allocator algorithm invented by Yury Yu. Rupasov. | |
2191 | This may provide performance improvements in some situations. | |
2192 | .TP | |
2193 | .BR nolog | |
f036b4c7 | 2194 | Disable journaling. This will provide slight performance improvements in |
60a2a323 | 2195 | some situations at the cost of losing reiserfs's fast recovery from crashes. |
f036b4c7 MF |
2196 | Even with this option turned on, reiserfs still performs all journaling |
2197 | operations, save for actual writes into its journaling area. Implementation | |
60a2a323 KZ |
2198 | of |
2199 | .IR nolog | |
2200 | is a work in progress. | |
2201 | .TP | |
2202 | .BR notail | |
2203 | By default, reiserfs stores small files and `file tails' directly into its | |
2204 | tree. This confuses some utilities such as | |
2205 | .BR LILO (8). | |
2206 | This option is used to disable packing of files into the tree. | |
2207 | .TP | |
2208 | .BR replayonly | |
2209 | Replay the transactions which are in the journal, but do not actually | |
2210 | mount the filesystem. Mainly used by | |
2211 | .IR reiserfsck . | |
2212 | .TP | |
2213 | .BI resize= number | |
2214 | A remount option which permits online expansion of reiserfs partitions. | |
2215 | Instructs reiserfs to assume that the device has | |
2216 | .I number | |
2217 | blocks. | |
2218 | This option is designed for use with devices which are under logical | |
2219 | volume management (LVM). | |
2220 | There is a special | |
2221 | .I resizer | |
2222 | utility which can be obtained from | |
2223 | .IR ftp://ftp.namesys.com/pub/reiserfsprogs . | |
2224 | .TP | |
2225 | .BR user_xattr | |
2226 | Enable Extended User Attributes. See the | |
2227 | .BR attr (5) | |
2228 | manual page. | |
2229 | .TP | |
2230 | .BR acl | |
2231 | Enable POSIX Access Control Lists. See the | |
2232 | .BR acl (5) | |
2233 | manual page. | |
2234 | .TP | |
2235 | .BR barrier=none " / " barrier=flush " | |
2236 | This enables/disables the use of write barriers in the journaling code. | |
2237 | barrier=none disables it, barrier=flush enables it. Write barriers enforce | |
2238 | proper on-disk ordering of journal commits, making volatile disk write caches | |
2239 | safe to use, at some performance penalty. The reiserfs filesystem does not | |
2240 | enable write barriers by default. Be sure to enable barriers unless your disks | |
2241 | are battery-backed one way or another. Otherwise you risk filesystem | |
2242 | corruption in case of power failure. | |
2243 | ||
2244 | .SH "Mount options for romfs" | |
2245 | None. | |
2246 | ||
2247 | .SH "Mount options for squashfs" | |
2248 | None. | |
2249 | ||
2250 | .SH "Mount options for smbfs" | |
2251 | Just like | |
2252 | .IR nfs ", the " smbfs | |
2253 | implementation expects a binary argument (a | |
2254 | .IR "struct smb_mount_data" ) | |
2255 | to the mount system call. This argument is constructed by | |
2256 | .BR smbmount (8) | |
2257 | and the current version of | |
2258 | .B mount | |
2259 | (2.12) does not know anything about smbfs. | |
2260 | ||
2261 | .SH "Mount options for sysv" | |
2262 | None. | |
2263 | ||
2264 | .SH "Mount options for tmpfs" | |
2265 | .TP | |
2266 | .BI size= nbytes | |
2267 | Override default maximum size of the filesystem. | |
2268 | The size is given in bytes, and rounded up to entire pages. | |
2269 | The default is half of the memory. The size parameter also accepts a suffix % | |
2270 | to limit this tmpfs instance to that percentage of your physical RAM: | |
2271 | the default, when neither size nor nr_blocks is specified, is size=50% | |
2272 | .TP | |
2273 | .B nr_blocks= | |
2274 | The same as size, but in blocks of PAGE_CACHE_SIZE | |
2275 | .TP | |
2276 | .B nr_inodes= | |
2277 | The maximum number of inodes for this instance. The default | |
2278 | is half of the number of your physical RAM pages, or (on a | |
2279 | machine with highmem) the number of lowmem RAM pages, | |
2280 | whichever is the lower. | |
2281 | .PP | |
2282 | The tmpfs mount options for sizing ( | |
2283 | .BR size , | |
2284 | .BR nr_blocks , | |
2285 | and | |
2286 | .BR nr_inodes ) | |
2287 | accept a suffix | |
2288 | .BR k , | |
2289 | .B m | |
2290 | or | |
2291 | .B g | |
2292 | for Ki, Mi, Gi (binary kilo, mega and giga) and can be changed on remount. | |
2293 | ||
2294 | .TP | |
2295 | .B mode= | |
2296 | Set initial permissions of the root directory. | |
2297 | .TP | |
2298 | .B uid= | |
2299 | The user id. | |
2300 | .TP | |
2301 | .B gid= | |
2302 | The group id. | |
2303 | .TP | |
2304 | .B mpol=[default|prefer:Node|bind:NodeList|interleave|interleave:NodeList] | |
2305 | Set the NUMA memory allocation policy for all files in that | |
2306 | instance (if the kernel CONFIG_NUMA is enabled) - which can be adjusted on the | |
2307 | fly via 'mount -o remount ...' | |
2308 | .RS | |
2309 | .TP | |
2310 | .B default | |
2311 | prefers to allocate memory from the local node | |
2312 | .TP | |
2313 | .B prefer:Node | |
2314 | prefers to allocate memory from the given Node | |
2315 | .TP | |
2316 | .B bind:NodeList | |
2317 | allocates memory only from nodes in NodeList | |
2318 | .TP | |
2319 | .B interleave | |
2320 | prefers to allocate from each node in turn | |
2321 | .TP | |
2322 | .B interleave:NodeList | |
2323 | allocates from each node of NodeList in turn. | |
2324 | .PP | |
2325 | The NodeList format is a comma-separated list of decimal numbers and ranges, a | |
2326 | range being two hyphen-separated decimal numbers, the smallest and largest node | |
2327 | numbers in the range. For example, mpol=bind:0-3,5,7,9-15 | |
2328 | ||
2329 | Note that trying to mount a tmpfs with an mpol option will fail if the | |
2330 | running kernel does not support NUMA; and will fail if its nodelist | |
2331 | specifies a node which is not online. If your system relies on that | |
2332 | tmpfs being mounted, but from time to time runs a kernel built without | |
2333 | NUMA capability (perhaps a safe recovery kernel), or with fewer nodes | |
2334 | online, then it is advisable to omit the mpol option from automatic | |
2335 | mount options. It can be added later, when the tmpfs is already mounted | |
2336 | on MountPoint, by 'mount -o remount,mpol=Policy:NodeList MountPoint'. | |
2337 | ||
2338 | .SH "Mount options for ubifs" | |
2339 | UBIFS is a flash file system which works on top of UBI volumes. Note that | |
2340 | .B | |
2341 | atime | |
2342 | is not supported and is always turned off. | |
2343 | .TP | |
2344 | The device name may be specified as | |
2345 | .RS | |
2346 | .B ubiX_Y | |
2347 | UBI device number | |
2348 | .BR X , | |
2349 | volume number | |
2350 | .B Y | |
2351 | .TP | |
2352 | .B ubiY | |
2353 | UBI device number | |
2354 | .BR 0 , | |
2355 | volume number | |
2356 | .B Y | |
2357 | .TP | |
2358 | .B ubiX:NAME | |
2359 | UBI device number | |
2360 | .BR X , | |
2361 | volume with name | |
2362 | .B NAME | |
2363 | .TP | |
2364 | .B ubi:NAME | |
2365 | UBI device number | |
2366 | .BR 0 , | |
2367 | volume with name | |
2368 | .B NAME | |
2369 | .RE | |
2370 | Alternative | |
2371 | .B ! | |
2372 | separator may be used instead of | |
2373 | .BR : . | |
2374 | .TP | |
2375 | The following mount options are available: | |
2376 | .TP | |
2377 | .BR bulk_read | |
2378 | Enable bulk-read. VFS read-ahead is disabled because it slows down the file | |
2379 | system. Bulk-Read is an internal optimization. Some flashes may read faster if | |
2380 | the data are read at one go, rather than at several read requests. For | |
2381 | example, OneNAND can do "read-while-load" if it reads more than one NAND page. | |
2382 | .TP | |
2383 | .BR no_bulk_read | |
2384 | Do not bulk-read. This is the default. | |
2385 | .TP | |
2386 | .BR chk_data_crc | |
2387 | Check data CRC-32 checksums. This is the default. | |
2388 | .TP | |
2389 | .BR no_chk_data_crc. | |
2390 | Do not check data CRC-32 checksums. With this option, the filesystem does not | |
2391 | check CRC-32 checksum for data, but it does check it for the internal indexing | |
2392 | information. This option only affects reading, not writing. CRC-32 is always | |
2393 | calculated when writing the data. | |
2394 | .TP | |
2395 | .BR compr= { none | lzo | zlib } | |
2396 | Select the default compressor which is used when new files are written. It is | |
2397 | still possible to read compressed files if mounted with the | |
2398 | .B none | |
2399 | option. | |
2400 | ||
2401 | .SH "Mount options for udf" | |
2402 | udf is the "Universal Disk Format" filesystem defined by the Optical | |
2403 | Storage Technology Association, and is often used for DVD-ROM. | |
2404 | See also | |
2405 | .IR iso9660 . | |
2406 | .TP | |
2407 | .B gid= | |
2408 | Set the default group. | |
2409 | .TP | |
2410 | .B umask= | |
2411 | Set the default umask. | |
2412 | The value is given in octal. | |
2413 | .TP | |
2414 | .B uid= | |
2415 | Set the default user. | |
2416 | .TP | |
2417 | .B unhide | |
2418 | Show otherwise hidden files. | |
2419 | .TP | |
2420 | .B undelete | |
2421 | Show deleted files in lists. | |
2422 | .TP | |
2423 | .B nostrict | |
2424 | Unset strict conformance. | |
2425 | .\" .TP | |
2426 | .\" .B utf8 | |
2427 | .\" (unused). | |
2428 | .TP | |
2429 | .B iocharset | |
2430 | Set the NLS character set. | |
2431 | .TP | |
2432 | .B bs= | |
2433 | Set the block size. (May not work unless 2048.) | |
2434 | .TP | |
2435 | .B novrs | |
2436 | Skip volume sequence recognition. | |
2437 | .TP | |
2438 | .B session= | |
2439 | Set the CDROM session counting from 0. Default: last session. | |
2440 | .TP | |
2441 | .B anchor= | |
2442 | Override standard anchor location. Default: 256. | |
2443 | .TP | |
2444 | .B volume= | |
2445 | Override the VolumeDesc location. (unused) | |
2446 | .TP | |
2447 | .B partition= | |
2448 | Override the PartitionDesc location. (unused) | |
2449 | .TP | |
2450 | .B lastblock= | |
2451 | Set the last block of the filesystem. | |
2452 | .TP | |
2453 | .B fileset= | |
2454 | Override the fileset block location. (unused) | |
2455 | .TP | |
2456 | .B rootdir= | |
2457 | Override the root directory location. (unused) | |
2458 | ||
2459 | .SH "Mount options for ufs" | |
2460 | .TP | |
2461 | .BI ufstype= value | |
2462 | UFS is a filesystem widely used in different operating systems. | |
2463 | The problem are differences among implementations. Features of some | |
2464 | implementations are undocumented, so its hard to recognize the | |
2465 | type of ufs automatically. | |
2466 | That's why the user must specify the type of ufs by mount option. | |
2467 | Possible values are: | |
2468 | .RS | |
2469 | .TP | |
2470 | .B old | |
2471 | Old format of ufs, this is the default, read only. | |
2472 | (Don't forget to give the \-r option.) | |
2473 | .TP | |
2474 | .B 44bsd | |
2475 | For filesystems created by a BSD-like system (NetBSD,FreeBSD,OpenBSD). | |
2476 | .TP | |
2477 | .B ufs2 | |
2478 | Used in FreeBSD 5.x supported as read-write. | |
2479 | .TP | |
2480 | .B 5xbsd | |
2481 | Synonym for ufs2. | |
2482 | .TP | |
2483 | .B sun | |
2484 | For filesystems created by SunOS or Solaris on Sparc. | |
2485 | .TP | |
2486 | .B sunx86 | |
2487 | For filesystems created by Solaris on x86. | |
2488 | .TP | |
2489 | .B hp | |
2490 | For filesystems created by HP-UX, read-only. | |
2491 | .TP | |
2492 | .B nextstep | |
2493 | For filesystems created by NeXTStep (on NeXT station) (currently read only). | |
2494 | .TP | |
2495 | .B nextstep-cd | |
2496 | For NextStep CDROMs (block_size == 2048), read-only. | |
2497 | .TP | |
2498 | .B openstep | |
2499 | For filesystems created by OpenStep (currently read only). | |
2500 | The same filesystem type is also used by Mac OS X. | |
2501 | .RE | |
2502 | ||
2503 | .TP | |
2504 | .BI onerror= value | |
2505 | Set behaviour on error: | |
2506 | .RS | |
2507 | .TP | |
2508 | .B panic | |
2509 | If an error is encountered, cause a kernel panic. | |
2510 | .TP | |
2511 | .RB [ lock | umount | repair ] | |
2512 | These mount options don't do anything at present; | |
2513 | when an error is encountered only a console message is printed. | |
2514 | .RE | |
2515 | ||
2516 | .SH "Mount options for umsdos" | |
2517 | See mount options for msdos. | |
2518 | The | |
2519 | .B dotsOK | |
2520 | option is explicitly killed by | |
2521 | .IR umsdos . | |
2522 | ||
2523 | .SH "Mount options for vfat" | |
2524 | First of all, the mount options for | |
2525 | .I fat | |
2526 | are recognized. | |
2527 | The | |
2528 | .B dotsOK | |
2529 | option is explicitly killed by | |
2530 | .IR vfat . | |
2531 | Furthermore, there are | |
2532 | .TP | |
2533 | .B uni_xlate | |
2534 | Translate unhandled Unicode characters to special escaped sequences. | |
2535 | This lets you backup and restore filenames that are created with any | |
2536 | Unicode characters. Without this option, a '?' is used when no | |
2537 | translation is possible. The escape character is ':' because it is | |
2538 | otherwise illegal on the vfat filesystem. The escape sequence | |
2539 | that gets used, where u is the unicode character, | |
2540 | is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12). | |
2541 | .TP | |
2542 | .B posix | |
2543 | Allow two files with names that only differ in case. | |
2544 | This option is obsolete. | |
2545 | .TP | |
2546 | .B nonumtail | |
2547 | First try to make a short name without sequence number, | |
2548 | before trying | |
2549 | .IR name~num.ext . | |
2550 | .TP | |
2551 | .B utf8 | |
2552 | UTF8 is the filesystem safe 8-bit encoding of Unicode that is used by the | |
2553 | console. It can be enabled for the filesystem with this option or disabled | |
2554 | with utf8=0, utf8=no or utf8=false. If `uni_xlate' gets set, UTF8 gets | |
2555 | disabled. | |
2556 | .TP | |
2557 | .BR shortname= { lower | win95 | winnt | mixed } | |
2558 | ||
2559 | Defines the behaviour for creation and display of filenames which fit into | |
2560 | 8.3 characters. If a long name for a file exists, it will always be | |
2561 | preferred display. There are four modes: | |
2562 | : | |
2563 | .RS | |
2564 | .TP | |
2565 | .I lower | |
2566 | Force the short name to lower case upon display; store a long name when | |
2567 | the short name is not all upper case. | |
2568 | .TP | |
2569 | .I win95 | |
2570 | Force the short name to upper case upon display; store a long name when | |
2571 | the short name is not all upper case. | |
2572 | .TP | |
2573 | .I winnt | |
2574 | Display the shortname as is; store a long name when the short name is | |
2575 | not all lower case or all upper case. | |
2576 | .TP | |
2577 | .I mixed | |
2578 | Display the short name as is; store a long name when the short name is not | |
2579 | all upper case. This mode is the default since Linux 2.6.32. | |
2580 | .RE | |
2581 | ||
2582 | ||
2583 | .SH "Mount options for usbfs" | |
2584 | .TP | |
2585 | \fBdevuid=\fP\fIuid\fP and \fBdevgid=\fP\fIgid\fP and \fBdevmode=\fP\fImode\fP | |
2586 | Set the owner and group and mode of the device files in the usbfs filesystem | |
2587 | (default: uid=gid=0, mode=0644). The mode is given in octal. | |
2588 | .TP | |
2589 | \fBbusuid=\fP\fIuid\fP and \fBbusgid=\fP\fIgid\fP and \fBbusmode=\fP\fImode\fP | |
2590 | Set the owner and group and mode of the bus directories in the usbfs | |
2591 | filesystem (default: uid=gid=0, mode=0555). The mode is given in octal. | |
2592 | .TP | |
2593 | \fBlistuid=\fP\fIuid\fP and \fBlistgid=\fP\fIgid\fP and \fBlistmode=\fP\fImode\fP | |
2594 | Set the owner and group and mode of the file | |
2595 | .I devices | |
2596 | (default: uid=gid=0, mode=0444). The mode is given in octal. | |
2597 | ||
2598 | .SH "Mount options for xenix" | |
2599 | None. | |
2600 | ||
2601 | .SH "Mount options for xfs" | |
2602 | .TP | |
5d3da4a2 | 2603 | .BR allocsize=size |
60a2a323 KZ |
2604 | Sets the buffered I/O end-of-file preallocation size when |
2605 | doing delayed allocation writeout (default size is 64KiB). | |
2606 | Valid values for this option are page size (typically 4KiB) | |
2607 | through to 1GiB, inclusive, in power-of-2 increments. | |
5d3da4a2 KZ |
2608 | .sp |
2609 | The default behaviour is for dynamic end-of-file | |
2610 | preallocation size, which uses a set of heuristics to | |
2611 | optimise the preallocation size based on the current | |
2612 | allocation patterns within the file and the access patterns | |
2613 | to the file. Specifying a fixed allocsize value turns off | |
2614 | the dynamic behaviour. | |
60a2a323 KZ |
2615 | .TP |
2616 | .BR attr2 | noattr2 | |
5d3da4a2 KZ |
2617 | The options enable/disable an "opportunistic" improvement to |
2618 | be made in the way inline extended attributes are stored | |
2619 | on-disk. When the new form is used for the first time when | |
2620 | attr2 is selected (either when setting or removing extended | |
2621 | attributes) the on-disk superblock feature bit field will be | |
2622 | updated to reflect this format being in use. | |
2623 | .sp | |
2624 | The default behaviour is determined by the on-disk feature | |
2625 | bit indicating that attr2 behaviour is active. If either | |
2626 | mount option it set, then that becomes the new default used | |
2627 | by the filesystem. | |
2628 | .sp | |
2629 | CRC enabled filesystems always use the attr2 format, and so | |
2630 | will reject the noattr2 mount option if it is set. | |
2631 | .TP | |
2632 | .BR barrier | nobarrier | |
2633 | Enables/disables the use of block layer write barriers for | |
2634 | writes into the journal and for data integrity operations. | |
2635 | This allows for drive level write caching to be enabled, for | |
2636 | devices that support write barriers. | |
2637 | .TP | |
2638 | .BR discard | nodiscard | |
2639 | Enable/disable the issuing of commands to let the block | |
2640 | device reclaim space freed by the filesystem. This is | |
2641 | useful for SSD devices, thinly provisioned LUNs and virtual | |
2642 | machine images, but may have a performance impact. | |
2643 | .sp | |
2644 | Note: It is currently recommended that you use the fstrim | |
2645 | application to discard unused blocks rather than the discard | |
2646 | mount option because the performance impact of this option | |
2647 | is quite severe. | |
2648 | .TP | |
2649 | .BR grpid | bsdgroups | nogrpid | sysvgroups | |
2650 | These options define what group ID a newly created file | |
2651 | gets. When grpid is set, it takes the group ID of the | |
2652 | directory in which it is created; otherwise it takes the | |
2653 | fsgid of the current process, unless the directory has the | |
2654 | setgid bit set, in which case it takes the gid from the | |
2655 | parent directory, and also gets the setgid bit set if it is | |
2656 | a directory itself. | |
2657 | .TP | |
2658 | .BR filestreams | |
2659 | Make the data allocator use the filestreams allocation mode | |
2660 | across the entire filesystem rather than just on directories | |
2661 | configured to use it. | |
2662 | .TP | |
2663 | .BP ikeep | noikeep | |
2664 | When ikeep is specified, XFS does not delete empty inode | |
2665 | clusters and keeps them around on disk. When noikeep is | |
2666 | specified, empty inode clusters are returned to the free | |
2667 | space pool. | |
2668 | .TP | |
2669 | .BR inode32 | inode64 | |
2670 | When inode32 is specified, it indicates that XFS limits | |
2671 | inode creation to locations which will not result in inode | |
2672 | numbers with more than 32 bits of significance. | |
2673 | .sp | |
2674 | When inode64 is specified, it indicates that XFS is allowed | |
2675 | to create inodes at any location in the filesystem, | |
2676 | including those which will result in inode numbers occupying | |
2677 | more than 32 bits of significance. | |
2678 | .sp | |
2679 | inode32 is provided for backwards compatibility with older | |
2680 | systems and applications, since 64 bits inode numbers might | |
2681 | cause problems for some applications that cannot handle | |
2682 | large inode numbers. If applications are in use which do | |
2683 | not handle inode numbers bigger than 32 bits, the inode32 | |
2684 | option should be specified. | |
2685 | .TP | |
2686 | .BR largeio | nolargeio | |
2687 | If "nolargeio" is specified, the optimal I/O reported in | |
2688 | st_blksize by stat(2) will be as small as possible to allow | |
2689 | user applications to avoid inefficient read/modify/write | |
2690 | I/O. This is typically the page size of the machine, as | |
2691 | this is the granularity of the page cache. | |
2692 | .sp | |
2693 | If "largeio" specified, a filesystem that was created with a | |
2694 | "swidth" specified will return the "swidth" value (in bytes) | |
2695 | in st_blksize. If the filesystem does not have a "swidth" | |
2696 | specified but does specify an "allocsize" then "allocsize" | |
2697 | (in bytes) will be returned instead. Otherwise the behaviour | |
2698 | is the same as if "nolargeio" was specified. | |
2699 | .TP | |
2700 | .BR logbufs=value | |
2701 | Set the number of in-memory log buffers. Valid numbers | |
2702 | range from 2-8 inclusive. | |
2703 | .sp | |
2704 | The default value is 8 buffers. | |
2705 | .sp | |
2706 | If the memory cost of 8 log buffers is too high on small | |
2707 | systems, then it may be reduced at some cost to performance | |
2708 | on metadata intensive workloads. The logbsize option below | |
2709 | controls the size of each buffer and so is also relevent to | |
2710 | this case. | |
2711 | .TP | |
2712 | .BR logbsize=value | |
2713 | Set the size of each in-memory log buffer. The size may be | |
2714 | specified in bytes, or in kilobytes with a "k" suffix. | |
2715 | Valid sizes for version 1 and version 2 logs are 16384 (16k) | |
2716 | and 32768 (32k). Valid sizes for version 2 logs also | |
2717 | include 65536 (64k), 131072 (128k) and 262144 (256k). The | |
2718 | logbsize must be an integer multiple of the log | |
2719 | stripe unit configured at mkfs time. | |
2720 | .sp | |
64e6c3bb | 2721 | The default value for version 1 logs is 32768, while the |
5d3da4a2 | 2722 | default value for version 2 logs is MAX(32768, log_sunit). |
60a2a323 | 2723 | .TP |
5d3da4a2 | 2724 | .BR logdev=device and rtdev=device |
60a2a323 | 2725 | Use an external log (metadata journal) and/or real-time device. |
5d3da4a2 KZ |
2726 | An XFS filesystem has up to three parts: a data section, a log |
2727 | section, and a real-time section. The real-time section is | |
2728 | optional, and the log section can be separate from the data | |
2729 | section or contained within it. | |
2730 | .TP | |
2731 | .BR noalign | |
2732 | Data allocations will not be aligned at stripe unit | |
2733 | boundaries. This is only relevant to filesystems created | |
2734 | with non-zero data alignment parameters (sunit, swidth) by | |
2735 | mkfs. | |
2736 | .TP | |
2737 | .BR norecovery | |
60a2a323 KZ |
2738 | The filesystem will be mounted without running log recovery. |
2739 | If the filesystem was not cleanly unmounted, it is likely to | |
5d3da4a2 | 2740 | be inconsistent when mounted in "norecovery" mode. |
60a2a323 | 2741 | Some files or directories may not be accessible because of this. |
5d3da4a2 KZ |
2742 | Filesystems mounted "norecovery" must be mounted read-only or |
2743 | the mount will fail. | |
2744 | .TP | |
2745 | .BR nouuid | |
2746 | Don't check for double mounted file systems using the file | |
2747 | system uuid. This is useful to mount LVM snapshot volumes, | |
2748 | and often used in combination with "norecovery" for mounting | |
2749 | read-only snapshots. | |
2750 | .TP | |
2751 | .BR noquota | |
2752 | Forcibly turns off all quota accounting and enforcement | |
2753 | within the filesystem. | |
60a2a323 | 2754 | .TP |
5d3da4a2 | 2755 | .BR uquota/usrquota/uqnoenforce/quota |
60a2a323 | 2756 | User disk quota accounting enabled, and limits (optionally) |
5d3da4a2 | 2757 | enforced. Refer to xfs_quota(8) for further details. |
60a2a323 | 2758 | .TP |
5d3da4a2 | 2759 | .BR gquota/grpquota/gqnoenforce |
60a2a323 | 2760 | Group disk quota accounting enabled and limits (optionally) |
5d3da4a2 | 2761 | enforced. Refer to xfs_quota(8) for further details. |
60a2a323 | 2762 | .TP |
5d3da4a2 | 2763 | .BR pquota/prjquota/pqnoenforce |
60a2a323 | 2764 | Project disk quota accounting enabled and limits (optionally) |
5d3da4a2 | 2765 | enforced. Refer to xfs_quota(8) for further details. |
60a2a323 | 2766 | .TP |
5d3da4a2 KZ |
2767 | .BR sunit=value " and " swidth=value |
2768 | Used to specify the stripe unit and width for a RAID device | |
2769 | or a stripe volume. "value" must be specified in 512-byte | |
2770 | block units. These options are only relevant to filesystems | |
2771 | that were created with non-zero data alignment parameters. | |
2772 | .sp | |
2773 | The sunit and swidth parameters specified must be compatible | |
2774 | with the existing filesystem alignment characteristics. In | |
2775 | general, that means the only valid changes to sunit are | |
2776 | increasing it by a power-of-2 multiple. Valid swidth values | |
2777 | are any integer multiple of a valid sunit value. | |
2778 | .sp | |
2779 | Typically the only time these mount options are necessary if | |
2780 | after an underlying RAID device has had it's geometry | |
2781 | modified, such as adding a new disk to a RAID5 lun and | |
2782 | reshaping it. | |
2783 | .TP | |
2784 | .BR swalloc | |
60a2a323 KZ |
2785 | Data allocations will be rounded up to stripe width boundaries |
2786 | when the current end of file is being extended and the file | |
2787 | size is larger than the stripe width size. | |
5d3da4a2 KZ |
2788 | .TP |
2789 | .BR wsync | |
2790 | When specified, all filesystem namespace operations are | |
2791 | executed synchronously. This ensures that when the namespace | |
2792 | operation (create, unlink, etc) completes, the change to the | |
2793 | namespace is on stable storage. This is useful in HA setups | |
2794 | where failover must not result in clients seeing | |
2795 | inconsistent namespace presentation during or after a | |
2796 | failover event. | |
60a2a323 KZ |
2797 | |
2798 | .SH "Mount options for xiafs" | |
2799 | None. Although nothing is wrong with xiafs, it is not used much, | |
2800 | and is not maintained. Probably one shouldn't use it. | |
2801 | Since Linux version 2.1.21 xiafs is no longer part of the kernel source. | |
2802 | ||
2803 | .SH "THE LOOP DEVICE" | |
2804 | One further possible type is a mount via the loop device. For example, | |
2805 | the command | |
2806 | .RS | |
2807 | .sp | |
2808 | .B "mount /tmp/disk.img /mnt -t vfat -o loop=/dev/loop" | |
2809 | .sp | |
2810 | .RE | |
2811 | will set up the loop device | |
2812 | .I /dev/loop3 | |
2813 | to correspond to the file | |
2814 | .IR /tmp/disk.img , | |
2815 | and then mount this device on | |
2816 | .IR /mnt . | |
2817 | ||
2818 | If no explicit loop device is mentioned | |
2819 | (but just an option `\fB\-o loop\fP' is given), then | |
2820 | .B mount | |
2821 | will try to find some unused loop device and use that, for example | |
2822 | .RS | |
2823 | .sp | |
2824 | .B "mount /tmp/disk.img /mnt -o loop" | |
2825 | .sp | |
2826 | .RE | |
2827 | The mount command | |
2828 | .B automatically | |
2829 | creates a loop device from a regular file if a filesystem type is | |
2830 | not specified or the filesystem is known for libblkid, for example: | |
2831 | .RS | |
2832 | .sp | |
2833 | .B "mount /tmp/disk.img /mnt" | |
2834 | .sp | |
2835 | .B "mount -t ext3 /tmp/disk.img /mnt" | |
2836 | .sp | |
2837 | .RE | |
2838 | This type of mount knows about four options, namely | |
5cf05c71 | 2839 | .BR loop ", " offset " and " sizelimit " , |
60a2a323 KZ |
2840 | that are really options to |
2841 | .BR \%losetup (8). | |
2842 | (These options can be used in addition to those specific | |
2843 | to the filesystem type.) | |
2844 | ||
2845 | Since Linux 2.6.25 is supported auto-destruction of loop devices and | |
2846 | then any loop device allocated by | |
2847 | .B mount | |
2848 | will be freed by | |
2849 | .B umount | |
2850 | independently on | |
2851 | .IR /etc/mtab . | |
2852 | ||
2853 | You can also free a loop device by hand, using `losetup -d' or `umount -d`. | |
2854 | ||
2855 | .SH RETURN CODES | |
2856 | .B mount | |
2857 | has the following return codes (the bits can be ORed): | |
2858 | .TP | |
2859 | .BR 0 | |
2860 | success | |
2861 | .TP | |
2862 | .BR 1 | |
2863 | incorrect invocation or permissions | |
2864 | .TP | |
2865 | .BR 2 | |
2866 | system error (out of memory, cannot fork, no more loop devices) | |
2867 | .TP | |
2868 | .BR 4 | |
2869 | internal | |
2870 | .B mount | |
2871 | bug | |
2872 | .TP | |
2873 | .BR 8 | |
2874 | user interrupt | |
2875 | .TP | |
2876 | .BR 16 | |
2877 | problems writing or locking /etc/mtab | |
2878 | .TP | |
2879 | .BR 32 | |
2880 | mount failure | |
2881 | .TP | |
2882 | .BR 64 | |
2883 | some mount succeeded | |
16b73aae KZ |
2884 | .RE |
2885 | ||
2886 | The command mount -a returns 0 (all success), 32 (all failed) or 64 (some | |
2887 | failed, some success). | |
60a2a323 | 2888 | |
00963eac | 2889 | .SH "EXTERNAL HELPERS" |
60a2a323 KZ |
2890 | The syntax of external mount helpers is: |
2891 | ||
2892 | .RS | |
2893 | .BI /sbin/mount. <suffix> | |
2894 | .I spec dir | |
2895 | .RB [ \-sfnv ] | |
2896 | .RB [ \-o | |
2897 | .IR options ] | |
2898 | .RB [ \-t | |
2899 | .IR type.subtype ] | |
2900 | .RE | |
2901 | ||
2902 | where the <type> is filesystem type and \-sfnvo options have same meaning like | |
2903 | standard mount options. The \-t option is used for filesystems with subtypes | |
2904 | support (for example /sbin/mount.fuse -t fuse.sshfs). | |
2905 | ||
00963eac KZ |
2906 | The command mount does not pass mount options |
2907 | .BR unbindable , | |
2908 | .BR runbindable , | |
2909 | .BR private , | |
2910 | .BR rprivate , | |
2911 | .BR slave , | |
2912 | .BR rslave , | |
2913 | .BR shared , | |
2914 | .BR rshared , | |
2915 | .BR auto , | |
2916 | .BR noauto , | |
2917 | .BR comment , | |
2918 | .BR x-*, | |
2919 | .BR loop , | |
2920 | .BR offset | |
2921 | and | |
2922 | .BR sizelimit | |
2923 | to mount.<suffix> helpers. The all others options are | |
2924 | used in comma delimited list as argument for the option -o. | |
2925 | ||
60a2a323 KZ |
2926 | .SH FILES |
2927 | .TP 18n | |
2928 | .I /etc/fstab | |
2929 | filesystem table | |
2930 | .TP | |
60a2a323 KZ |
2931 | .I /etc/mtab |
2932 | table of mounted filesystems | |
2933 | .TP | |
2934 | .I /etc/mtab~ | |
2935 | lock file | |
2936 | .TP | |
2937 | .I /etc/mtab.tmp | |
2938 | temporary file | |
2939 | .TP | |
2940 | .I /etc/filesystems | |
2941 | a list of filesystem types to try | |
2942 | .SH ENVIRONMENT | |
2943 | .IP LIBMOUNT_FSTAB=<path> | |
2944 | overrides the default location of the fstab file | |
2945 | .IP LIBMOUNT_MTAB=<path> | |
2946 | overrides the default location of the mtab file | |
2947 | .IP LIBMOUNT_DEBUG=0xffff | |
2948 | enables debug output | |
2949 | .SH "SEE ALSO" | |
2950 | .BR mount (2), | |
2951 | .BR umount (2), | |
2952 | .BR fstab (5), | |
2953 | .BR umount (8), | |
2954 | .BR swapon (8), | |
2955 | .BR findmnt (8), | |
2956 | .BR nfs (5), | |
2957 | .BR xfs (5), | |
2958 | .BR e2label (8), | |
2959 | .BR xfs_admin (8), | |
2960 | .BR mountd (8), | |
2961 | .BR nfsd (8), | |
2962 | .BR mke2fs (8), | |
2963 | .BR tune2fs (8), | |
2964 | .BR losetup (8) | |
2965 | .SH BUGS | |
2966 | It is possible for a corrupted filesystem to cause a crash. | |
2967 | .PP | |
2968 | Some Linux filesystems don't support | |
2969 | .B "\-o sync and \-o dirsync" | |
2970 | (the ext2, ext3, fat and vfat filesystems | |
2971 | .I do | |
2972 | support synchronous updates (a la BSD) when mounted with the | |
2973 | .B sync | |
2974 | option). | |
2975 | .PP | |
2976 | The | |
2977 | .B "\-o remount" | |
2978 | may not be able to change mount parameters (all | |
2979 | .IR ext2fs -specific | |
2980 | parameters, except | |
2981 | .BR sb , | |
2982 | are changeable with a remount, for example, but you can't change | |
2983 | .B gid | |
2984 | or | |
2985 | .B umask | |
2986 | for the | |
2987 | .IR fatfs ). | |
2988 | .PP | |
2989 | It is possible that files | |
2990 | .IR /etc/mtab | |
2991 | and | |
2992 | .IR /proc/mounts | |
2993 | don't match. The first file is based only on the mount command options, but the | |
2994 | content of the second file also depends on the kernel and others settings (e.g. | |
2995 | remote NFS server. In particular case the mount command may reports unreliable | |
2996 | information about a NFS mount point and the /proc/mounts file usually contains | |
2997 | more reliable information.) | |
2998 | .PP | |
2999 | Checking files on NFS filesystem referenced by file descriptors (i.e. the | |
3000 | .BR fcntl | |
3001 | and | |
3002 | .BR ioctl | |
3003 | families of functions) may lead to inconsistent result due to the lack of | |
3004 | consistency check in kernel even if noac is used. | |
293714c0 JM |
3005 | .PP |
3006 | The | |
3007 | .B loop | |
3008 | option with the | |
3009 | .B offset | |
3010 | or | |
3011 | .B sizelimit | |
3012 | options used may fail when using older kernels if the | |
3013 | .B mount | |
3014 | command can't confirm that the size of the block device has been configured | |
3015 | as requested. This situation can be worked around by using | |
3016 | the | |
3017 | .B losetup | |
3018 | command manually before calling | |
3019 | .B mount | |
3020 | with the configured loop device. | |
60a2a323 KZ |
3021 | .SH HISTORY |
3022 | A | |
3023 | .B mount | |
3024 | command existed in Version 5 AT&T UNIX. | |
3025 | .SH AUTHORS | |
3026 | .nf | |
3027 | Karel Zak <kzak@redhat.com> | |
3028 | .fi | |
3029 | .SH AVAILABILITY | |
3030 | The mount command is part of the util-linux package and is available from | |
3031 | ftp://ftp.kernel.org/pub/linux/utils/util-linux/. | |
3032 |