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