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