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