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