Print this page
6198 Let's EOL cachefs
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1m/mount.1m
+++ new/usr/src/man/man1m/mount.1m
1 1 '\" te
2 2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
3 +.\" Copyright 2015 Nexenta Systems, Inc. All rights reserved.
3 4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 -.TH MOUNT 1M "May 29, 2008"
7 +.TH MOUNT 1M "Sep 8, 2015"
7 8 .SH NAME
8 9 mount, umount \- mount or unmount file systems and remote resources
9 10 .SH SYNOPSIS
10 11 .LP
11 12 .nf
12 13 \fBmount\fR [\fB-p\fR | \fB-v\fR]
13 14 .fi
14 15
15 16 .LP
16 17 .nf
17 18 \fBmount\fR [\fB-F\fR \fIFSType\fR] [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR]
18 19 [\fB-O\fR] \fIspecial\fR | \fImount_point\fR
19 20 .fi
20 21
21 22 .LP
22 23 .nf
23 24 \fBmount\fR [\fB-F\fR \fIFSType\fR] [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR]
24 25 [\fB-O\fR] \fIspecial\fR \fImount_point\fR
25 26 .fi
26 27
27 28 .LP
28 29 .nf
29 30 \fBmount\fR \fB-a\fR [\fB-F\fR \fIFSType\fR] [\fB-V\fR] [\fIcurrent_options\fR]
30 31 [\fB-o\fR \fIspecific_options\fR] [\fImount_point\fR]...
31 32 .fi
32 33
33 34 .LP
34 35 .nf
35 36 \fBumount\fR [\fB-f\fR] [\fB-V\fR] [\fB-o\fR \fIspecific_options\fR] \fIspecial\fR | \fImount_point\fR
36 37 .fi
37 38
38 39 .LP
39 40 .nf
40 41 \fBumount\fR \fB-a\fR [\fB-f\fR] [\fB-V\fR] [\fB-o\fR \fIspecific_options\fR] [\fImount_point\fR]...
41 42 .fi
42 43
43 44 .SH DESCRIPTION
44 45 .sp
45 46 .LP
46 47 \fBmount\fR attaches a file system to the file system hierarchy at the
47 48 \fImount_point\fR, which is the pathname of a directory. If \fImount_point\fR
48 49 has any contents prior to the \fBmount\fR operation, these are hidden until the
49 50 file system is unmounted.
50 51 .sp
51 52 .LP
52 53 \fBumount\fR unmounts a currently mounted file system, which may be specified
53 54 either as a \fImount_point\fR or as \fIspecial\fR, the device on which the file
54 55 system resides.
55 56 .sp
56 57 .LP
57 58 The table of currently mounted file systems can be found by examining the
58 59 mounted file system information file. This is provided by a file system that is
59 60 usually mounted on \fB/etc/mnttab\fR. The mounted file system information is
60 61 described in \fBmnttab\fR(4). Mounting a file system adds an entry to the mount
61 62 table; a \fBumount\fR removes an entry from the table.
62 63 .sp
63 64 .LP
64 65 When invoked with both the \fIspecial\fR and \fImount_point\fR arguments and
65 66 the \fB-F\fR option, \fBmount\fR validates all arguments except for
66 67 \fIspecial\fR and invokes the appropriate \fIFSType\fR-specific \fBmount\fR
67 68 module. If invoked with no arguments, \fBmount\fR lists all the mounted file
68 69 systems recorded in the mount table, \fB/etc/mnttab\fR. If invoked with a
69 70 partial argument list (with only one of \fIspecial\fR or \fImount_point\fR, or
70 71 with both \fIspecial\fR or \fImount_point\fR specified but not \fIFSType\fR),
71 72 \fBmount\fR will search \fB/etc/vfstab\fR for an entry that will supply the
72 73 missing arguments. If no entry is found, and the special argument starts with
73 74 \fB/\fR, the default local file system type specified in \fB/etc/default/fs\fR
74 75 will be used. Otherwise the default remote file system type will be used. The
75 76 default remote file system type is determined by the first entry in the
76 77 \fB/etc/dfs/fstypes\fR file. After filling in missing arguments, \fBmount\fR
77 78 will invoke the \fIFSType\fR-specific \fBmount\fR module.
78 79 .sp
79 80 .LP
80 81 For file system types that support it, a file can be mounted directly as a file
81 82 system by specifying the full path to the file as the special argument. In
82 83 such a case, the \fBnosuid\fR option is enforced. If specific file system
83 84 support for such loopback file mounts is not present, you can still use
84 85 \fBlofiadm\fR(1M) to mount a file system image. In this case, no special
85 86 options are enforced.
86 87 .sp
87 88 .LP
88 89 Only a user with sufficient privilege (at least \fBPRIV_SYS_MOUNT\fR) can mount
89 90 or unmount file systems using \fBmount\fR and \fBumount\fR. However, any user
90 91 can use \fBmount\fR to list mounted file systems and resources.
91 92 .SH OPTIONS
92 93 .sp
93 94 .ne 2
94 95 .na
95 96 \fB\fB-F\fR \fIFSType\fR\fR
96 97 .ad
97 98 .sp .6
98 99 .RS 4n
99 100 Used to specify the \fIFSType\fR on which to operate. The \fIFSType\fR must be
100 101 specified or must be determinable from \fB/etc/vfstab\fR, or by consulting
101 102 \fB/etc/default/fs\fR or \fB/etc/dfs/fstypes\fR.
102 103 .RE
103 104
104 105 .sp
105 106 .ne 2
106 107 .na
107 108 \fB\fB-a\fR [ \fImount_points\fR. . . ]\fR
108 109 .ad
109 110 .sp .6
110 111 .RS 4n
111 112 Perform mount or umount operations in parallel, when possible.
112 113 .sp
113 114 If mount points are not specified, \fBmount\fR will mount all file systems
114 115 whose \fB/etc/vfstab\fR "mount at boot" field is \fByes\fR. If mount points are
115 116 specified, then \fB/etc/vfstab\fR "mount at boot" field will be ignored.
116 117 .sp
117 118 If mount points are specified, \fBumount\fR will only \fBumount\fR those mount
118 119 points. If none is specified, then \fBumount\fR will attempt to \fBunmount\fR
119 120 all file systems in \fB/etc/mnttab\fR, with the exception of certain system
120 121 required file systems: \fB/\fR, \fB/usr\fR, \fB/var\fR, \fB/var/adm\fR,
121 122 \fB/var/run\fR, \fB/proc\fR, \fB/dev/fd\fR and \fB/tmp\fR.
122 123 .RE
123 124
124 125 .sp
125 126 .ne 2
126 127 .na
127 128 \fB\fB-f\fR\fR
128 129 .ad
129 130 .sp .6
130 131 .RS 4n
131 132 Forcibly unmount a file system.
132 133 .sp
133 134 Without this option, \fBumount\fR does not allow a file system to be unmounted
134 135 if a file on the file system is busy. Using this option can cause data loss for
135 136 open files; programs which access files after the file system has been
136 137 unmounted will get an error (\fBEIO\fR).
137 138 .RE
138 139
139 140 .sp
140 141 .ne 2
141 142 .na
142 143 \fB\fB-p\fR\fR
143 144 .ad
144 145 .sp .6
145 146 .RS 4n
146 147 Print the list of mounted file systems in the \fB/etc/vfstab\fR format. Must be
147 148 the only option specified. See \fBBUGS\fR.
148 149 .RE
149 150
150 151 .sp
151 152 .ne 2
152 153 .na
153 154 \fB\fB-v\fR\fR
154 155 .ad
155 156 .sp .6
156 157 .RS 4n
157 158 Print the list of mounted file systems in verbose format. Must be the only
158 159 option specified.
159 160 .RE
160 161
161 162 .sp
162 163 .ne 2
163 164 .na
164 165 \fB\fB-V\fR\fR
165 166 .ad
166 167 .sp .6
167 168 .RS 4n
168 169 Echo the complete command line, but do not execute the command. \fBumount\fR
169 170 generates a command line by using the options and arguments provided by the
170 171 user and adding to them information derived from \fB/etc/mnttab\fR. This option
171 172 should be used to verify and validate the command line.
172 173 .RE
173 174
174 175 .sp
175 176 .ne 2
176 177 .na
177 178 \fB\fIgeneric_options\fR\fR
178 179 .ad
179 180 .sp .6
180 181 .RS 4n
181 182 Options that are commonly supported by most \fIFSType\fR-specific command
182 183 modules. The following options are available:
183 184 .sp
184 185 .ne 2
185 186 .na
186 187 \fB\fB-m\fR\fR
187 188 .ad
188 189 .sp .6
189 190 .RS 4n
190 191 Mount the file system without making an entry in \fB/etc/mnttab\fR.
191 192 .RE
192 193
193 194 .sp
194 195 .ne 2
195 196 .na
196 197 \fB\fB-g\fR\fR
197 198 .ad
198 199 .sp .6
199 200 .RS 4n
200 201 Globally mount the file system. On a clustered system, this globally mounts the
201 202 file system on all nodes of the cluster. On a non-clustered system this has no
202 203 effect.
203 204 .RE
204 205
205 206 .sp
206 207 .ne 2
207 208 .na
208 209 \fB\fB-o\fR\fR
209 210 .ad
210 211 .sp .6
211 212 .RS 4n
212 213 Specify \fIFSType\fR-specific options in a comma separated (without spaces)
213 214 list of suboptions and keyword-attribute pairs for interpretation by the
214 215 \fIFSType\fR-specific module of the command. (See \fBmount_ufs\fR(1M).) When
215 216 you use \fB-o\fR with a file system that has an entry in \fB/etc/vfstab\fR, any
216 217 \fBmount\fR options entered for that file system in \fB/etc/vfstab\fR are
217 218 ignored.
218 219 .sp
219 220 The following options are supported:
220 221 .sp
221 222 .ne 2
222 223 .na
223 224 \fB\fBdevices | nodevices\fR\fR
224 225 .ad
225 226 .sp .6
226 227 .RS 4n
227 228 Allow or disallow the opening of device-special files. The default is
228 229 \fBdevices\fR.
229 230 .sp
230 231 If you use \fBnosuid\fR in conjunction with \fBdevices\fR, the behavior is
231 232 equivalent to that of \fBnosuid\fR.
232 233 .RE
233 234
234 235 .sp
235 236 .ne 2
236 237 .na
237 238 \fB\fBexec | noexec\fR\fR
238 239 .ad
239 240 .sp .6
240 241 .RS 4n
241 242 Allow or disallow executing programs in the file system. Allow or disallow
242 243 \fBmmap\fR(2) with \fBPROT_EXEC\fR for files within the file system. The
243 244 default is \fBexec\fR.
244 245 .RE
245 246
246 247 .sp
247 248 .ne 2
248 249 .na
249 250 \fB\fBloop\fR\fR
250 251 .ad
251 252 .sp .6
252 253 .RS 4n
253 254 Ignored for compatibility.
254 255 .RE
255 256
256 257 .sp
257 258 .ne 2
258 259 .na
259 260 \fB\fBnbmand | nonbmand\fR\fR
260 261 .ad
261 262 .sp .6
262 263 .RS 4n
263 264 Allow or disallow non-blocking mandatory locking semantics on this file system.
264 265 Non-blocking mandatory locking is disallowed by default.
265 266 .sp
266 267 If the file system is mounted with the \fBnbmand\fR option, then applications
267 268 can use the \fBfcntl\fR(2) interface to place non-blocking mandatory locks on
268 269 files and the system enforces those semantics. If you enable this option, it
269 270 can cause standards conformant applications to see unexpected errors.
270 271 .sp
271 272 To avoid the possibility of obtaining mandatory locks on system files, do not
272 273 use the \fBnbmand\fR option with the following file systems:
273 274 .sp
274 275 .in +2
275 276 .nf
276 277 /
277 278 /usr
278 279 /etc
279 280 /var
280 281 /proc
281 282 /dev
282 283 /devices
283 284 /system/contract
284 285 /system/object
285 286 /etc/mnttab
286 287 /etc/dfs/sharetab
287 288 .fi
288 289 .in -2
289 290 .sp
290 291
291 292 Do not use the \fBremount\fR option to change the \fBnbmand\fR disposition of
292 293 the file system. The \fBnbmand\fR option is mutually exclusive of the global
293 294 option. See \fB-g\fR.
294 295 .RE
295 296
296 297 .sp
297 298 .ne 2
298 299 .na
299 300 \fB\fBro | rw\fR\fR
300 301 .ad
301 302 .sp .6
302 303 .RS 4n
303 304 Specify read-only or read-write. The default is \fBrw\fR.
304 305 .RE
305 306
306 307 .sp
307 308 .ne 2
308 309 .na
309 310 \fB\fBsetuid | nosetuid\fR\fR
310 311 .ad
311 312 .sp .6
312 313 .RS 4n
313 314 Allow or disallow \fBsetuid\fR or \fBsetgid\fR execution. The default is
314 315 \fBsetuid\fR.
315 316 .sp
316 317 If you specify \fBsetuid\fR in conjunction with \fBnosuid\fR, the behavior is
317 318 the same as \fBnosuid\fR.
318 319 .sp
319 320 \fBnosuid\fR is equivalent to \fBnosetuid\fR and \fBnodevices\fR. When
320 321 \fBsuid\fR or \fBnosuid\fR is combined with \fBsetuid\fR or \fBnosetuid\fR and
321 322 \fBdevices\fR or \fBnodevices\fR, the most restrictive options take effect.
322 323 .sp
323 324 This option is highly recommended whenever the file system is shared by way of
324 325 NFS with the \fBroot=\fR option. Without it, NFS clients could add \fBsetuid\fR
325 326 programs to the server or create devices that could open security holes.
326 327 .RE
327 328
328 329 .sp
329 330 .ne 2
330 331 .na
331 332 \fB\fBsuid | nosuid\fR\fR
332 333 .ad
333 334 .sp .6
334 335 .RS 4n
335 336 Allow or disallow \fBsetuid\fR or \fBsetgid\fR execution. The default is
336 337 \fBsuid\fR. This option also allows or disallows opening any device-special
337 338 entries that appear within the filesystem.
338 339 .sp
339 340 \fBnosuid\fR is equivalent to \fBnosetuid\fR and \fBnodevices\fR. When
340 341 \fBsuid\fR or \fBnosuid\fR is combined with \fBsetuid\fR or \fBnosetuid\fR and
341 342 \fBdevices\fR or \fBnodevices\fR, the most restrictive options take effect.
342 343 .sp
343 344 This option is highly recommended whenever the file system is shared using NFS
344 345 with the \fBroot=\fIoption\fR\fR, because, without it, NFS clients could add
345 346 \fBsetuid\fR programs to the server, or create devices that could open security
346 347 holes.
347 348 .RE
348 349
349 350 .RE
350 351
351 352 .sp
352 353 .ne 2
353 354 .na
354 355 \fB\fB-O\fR\fR
355 356 .ad
356 357 .sp .6
357 358 .RS 4n
358 359 Overlay mount. Allow the file system to be mounted over an existing mount
359 360 point, making the underlying file system inaccessible. If a mount is attempted
360 361 on a pre-existing mount point without setting this flag, the mount will fail,
361 362 producing the error "device busy".
362 363 .RE
363 364
364 365 .sp
365 366 .ne 2
366 367 .na
367 368 \fB\fB-r\fR\fR
368 369 .ad
369 370 .sp .6
370 371 .RS 4n
371 372 Mount the file system read-only.
372 373 .RE
373 374
374 375 .RE
375 376
376 377 .SH EXAMPLES
377 378 .LP
378 379 \fBExample 1 \fRMounting and Unmounting a DVD Image Directly
379 380 .sp
380 381 .LP
381 382 The following commands mount and unmount a DVD image.
382 383
383 384 .sp
384 385 .in +2
385 386 .nf
386 387 # \fBmount -F hsfs /images/solaris.iso /mnt/solaris-image\fR
387 388 # \fBumount /mnt/solaris-image\fR
388 389 .fi
389 390 .in -2
390 391 .sp
391 392
392 393 .SH USAGE
393 394 .sp
394 395 .LP
395 396 See \fBlargefile\fR(5) for the description of the behavior of \fBmount\fR and
396 397 \fBumount\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
397 398 bytes).
398 399 .SH FILES
399 400 .sp
400 401 .ne 2
401 402 .na
402 403 \fB\fB/etc/mnttab\fR\fR
403 404 .ad
404 405 .sp .6
405 406 .RS 4n
406 407 Table of mounted file systems.
407 408 .RE
408 409
409 410 .sp
410 411 .ne 2
411 412 .na
412 413 \fB\fB/etc/default/fs\fR\fR
413 414 .ad
414 415 .sp .6
415 416 .RS 4n
416 417 Default local file system type. Default values can be set for the following
417 418 flags in \fB/etc/default/fs\fR. For example: \fBLOCAL=ufs\fR
418 419 .sp
419 420 .ne 2
420 421 .na
421 422 \fB\fBLOCAL:\fR\fR
422 423 .ad
423 424 .sp .6
424 425 .RS 4n
425 426 The default partition for a command if no \fIFSType\fR is specified.
426 427 .RE
427 428
428 429 .RE
429 430
430 431 .sp
431 432 .ne 2
432 433 .na
↓ open down ↓ |
416 lines elided |
↑ open up ↑ |
433 434 \fB\fB/etc/vfstab\fR\fR
434 435 .ad
435 436 .sp .6
436 437 .RS 4n
437 438 List of default parameters for each file system.
438 439 .RE
439 440
440 441 .SH SEE ALSO
441 442 .sp
442 443 .LP
443 -\fBlofiadm\fR(1M), \fBmount_cachefs\fR(1M), \fBmount_hsfs\fR(1M),
444 -\fBmount_nfs\fR(1M), \fBmount_pcfs\fR(1M), \fBmount_smbfs\fR(1M),
445 -\fBmount_tmpfs\fR(1M), \fBmount_udfs\fR(1M), \fBmount_ufs\fR(1M),
446 -\fBmountall\fR(1M), \fBumountall\fR(1M), \fBfcntl\fR(2), \fBmmap\fR(2),
447 -\fBmnttab\fR(4), \fBvfstab\fR(4), \fBattributes\fR( 5), \fBlargefile\fR(5),
444 +\fBlofiadm\fR(1M), \fBmount_hsfs\fR(1M), \fBmount_nfs\fR(1M),
445 +\fBmount_pcfs\fR(1M), \fBmount_smbfs\fR(1M), \fBmount_tmpfs\fR(1M),
446 +\fBmount_udfs\fR(1M), \fBmount_ufs\fR(1M), \fBmountall\fR(1M),
447 +\fBumountall\fR(1M), \fBfcntl\fR(2), \fBmmap\fR(2), \fBmnttab\fR(4),
448 +\fBvfstab\fR(4), \fBattributes\fR(5), \fBlargefile\fR(5),
448 449 \fBprivileges\fR(5), \fBlofs\fR(7FS), \fBpcfs\fR(7FS)
449 450 .SH NOTES
450 451 .sp
451 452 .LP
452 453 If the directory on which a file system is to be mounted is a symbolic link,
453 454 the file system is mounted on the directory to which the symbolic link refers,
454 455 rather than on top of the symbolic link itself.
455 -.SH BUGS
456 -.sp
457 -.LP
458 -The \fBmount\fR \fB-p\fR output is incorrect for \fBcachefs\fR.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX