3557 dumpvp_size is not updated correctly when a dump zvol's size is changed
[unleashed.git] / usr / src / man / man1m / mount.1m
blobff6e079bae503dd188e747320a63c3a8077c1dd9
1 '\" te
2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
3 .\" 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 .\" 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 .\" 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 .SH NAME
8 mount, umount \- mount or unmount file systems and remote resources
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBmount\fR [\fB-p\fR | \fB-v\fR]
13 .fi
15 .LP
16 .nf
17 \fBmount\fR [\fB-F\fR \fIFSType\fR] [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR]
18      [\fB-O\fR] \fIspecial\fR | \fImount_point\fR
19 .fi
21 .LP
22 .nf
23 \fBmount\fR [\fB-F\fR \fIFSType\fR] [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR]
24      [\fB-O\fR] \fIspecial\fR \fImount_point\fR
25 .fi
27 .LP
28 .nf
29 \fBmount\fR \fB-a\fR [\fB-F\fR \fIFSType\fR] [\fB-V\fR] [\fIcurrent_options\fR]
30      [\fB-o\fR \fIspecific_options\fR] [\fImount_point\fR]...
31 .fi
33 .LP
34 .nf
35 \fBumount\fR [\fB-f\fR] [\fB-V\fR] [\fB-o\fR \fIspecific_options\fR] \fIspecial\fR | \fImount_point\fR
36 .fi
38 .LP
39 .nf
40 \fBumount\fR \fB-a\fR [\fB-f\fR] [\fB-V\fR] [\fB-o\fR \fIspecific_options\fR] [\fImount_point\fR]...
41 .fi
43 .SH DESCRIPTION
44 .sp
45 .LP
46 \fBmount\fR attaches a file system to the file system hierarchy at the
47 \fImount_point\fR, which is the pathname of a directory. If \fImount_point\fR
48 has any contents prior to the \fBmount\fR operation, these are hidden until the
49 file system is unmounted.
50 .sp
51 .LP
52 \fBumount\fR unmounts a currently mounted file system, which may be specified
53 either as a \fImount_point\fR or as \fIspecial\fR, the device on which the file
54 system resides.
55 .sp
56 .LP
57 The table of currently mounted file systems can be found by examining the
58 mounted file system information file. This is provided by a file system that is
59 usually mounted on \fB/etc/mnttab\fR. The mounted file system information is
60 described in \fBmnttab\fR(4). Mounting a file system adds an entry to the mount
61 table; a \fBumount\fR removes an entry from the table.
62 .sp
63 .LP
64 When invoked with both the \fIspecial\fR and \fImount_point\fR arguments and
65 the \fB-F\fR option, \fBmount\fR validates all arguments except for
66 \fIspecial\fR and invokes the appropriate \fIFSType\fR-specific \fBmount\fR
67 module. If invoked with no arguments, \fBmount\fR lists all the mounted file
68 systems recorded in the mount table, \fB/etc/mnttab\fR. If invoked with a
69 partial argument list (with only one of \fIspecial\fR or \fImount_point\fR, or
70 with both \fIspecial\fR or \fImount_point\fR specified but not \fIFSType\fR),
71 \fBmount\fR will search \fB/etc/vfstab\fR for an entry that will supply the
72 missing arguments. If no entry is found, and the special argument starts with
73 \fB/\fR, the default local file system type specified in \fB/etc/default/fs\fR
74 will be used. Otherwise the default remote file system type will be used. The
75 default remote file system type is determined by the first entry in the
76 \fB/etc/dfs/fstypes\fR file. After filling in missing arguments, \fBmount\fR
77 will invoke the \fIFSType\fR-specific \fBmount\fR module.
78 .sp
79 .LP
80 For file system types that support it, a file can be mounted directly as a file
81 system by specifying the full path to the file as the special argument.  In
82 such a case, the \fBnosuid\fR option is enforced. If specific file system
83 support for such loopback file mounts is not present, you can still use
84 \fBlofiadm\fR(1M) to mount a file system image. In this case, no special
85 options are enforced.
86 .sp
87 .LP
88 Only a user with sufficient privilege (at least \fBPRIV_SYS_MOUNT\fR) can mount
89 or unmount file systems using \fBmount\fR and \fBumount\fR. However, any user
90 can use \fBmount\fR to list mounted file systems and resources.
91 .SH OPTIONS
92 .sp
93 .ne 2
94 .na
95 \fB\fB-F\fR \fIFSType\fR\fR
96 .ad
97 .sp .6
98 .RS 4n
99 Used to specify the \fIFSType\fR on which to operate. The \fIFSType\fR must be
100 specified or must be determinable from \fB/etc/vfstab\fR, or by consulting
101 \fB/etc/default/fs\fR or \fB/etc/dfs/fstypes\fR.
105 .ne 2
107 \fB\fB-a\fR [ \fImount_points\fR. . . ]\fR
109 .sp .6
110 .RS 4n
111 Perform mount or umount operations in parallel, when possible.
113 If mount points are not specified, \fBmount\fR will mount all file systems
114 whose \fB/etc/vfstab\fR "mount at boot" field is \fByes\fR. If mount points are
115 specified, then \fB/etc/vfstab\fR "mount at boot" field will be ignored.
117 If mount points are specified, \fBumount\fR will only \fBumount\fR those mount
118 points. If none is specified, then \fBumount\fR will attempt to \fBunmount\fR
119 all file systems in \fB/etc/mnttab\fR, with the exception of certain system
120 required file systems: \fB/\fR, \fB/usr\fR, \fB/var\fR, \fB/var/adm\fR,
121 \fB/var/run\fR, \fB/proc\fR, \fB/dev/fd\fR and \fB/tmp\fR.
125 .ne 2
127 \fB\fB-f\fR\fR
129 .sp .6
130 .RS 4n
131 Forcibly unmount a file system.
133 Without this option, \fBumount\fR does not allow a file system to be unmounted
134 if a file on the file system is busy. Using this option can cause data loss for
135 open files; programs which access files after the file system has been
136 unmounted will get an error (\fBEIO\fR).
140 .ne 2
142 \fB\fB-p\fR\fR
144 .sp .6
145 .RS 4n
146 Print the list of mounted file systems in the \fB/etc/vfstab\fR format. Must be
147 the only option specified. See \fBBUGS\fR.
151 .ne 2
153 \fB\fB-v\fR\fR
155 .sp .6
156 .RS 4n
157 Print the list of mounted file systems in verbose format. Must be the only
158 option specified.
162 .ne 2
164 \fB\fB-V\fR\fR
166 .sp .6
167 .RS 4n
168 Echo the complete command line, but do not execute the command. \fBumount\fR
169 generates a command line by using the options and arguments provided by the
170 user and adding to them information derived from \fB/etc/mnttab\fR. This option
171 should be used to verify and validate the command line.
175 .ne 2
177 \fB\fIgeneric_options\fR\fR
179 .sp .6
180 .RS 4n
181 Options that are commonly supported by most \fIFSType\fR-specific command
182 modules. The following options are available:
184 .ne 2
186 \fB\fB-m\fR\fR
188 .sp .6
189 .RS 4n
190 Mount the file system without making an entry in \fB/etc/mnttab\fR.
194 .ne 2
196 \fB\fB-g\fR\fR
198 .sp .6
199 .RS 4n
200 Globally mount the file system. On a clustered system, this globally mounts the
201 file system on all nodes of the cluster. On a non-clustered system this has no
202 effect.
206 .ne 2
208 \fB\fB-o\fR\fR
210 .sp .6
211 .RS 4n
212 Specify \fIFSType\fR-specific options in a comma separated (without spaces)
213 list of suboptions and keyword-attribute pairs for interpretation by the
214 \fIFSType\fR-specific module of the command. (See \fBmount_ufs\fR(1M).) When
215 you use \fB-o\fR with a file system that has an entry in \fB/etc/vfstab\fR, any
216 \fBmount\fR options entered for that file system in \fB/etc/vfstab\fR are
217 ignored.
219 The following options are supported:
221 .ne 2
223 \fB\fBdevices | nodevices\fR\fR
225 .sp .6
226 .RS 4n
227 Allow or disallow the opening of device-special files. The default is
228 \fBdevices\fR.
230 If you use \fBnosuid\fR in conjunction with \fBdevices\fR, the behavior is
231 equivalent to that of \fBnosuid\fR.
235 .ne 2
237 \fB\fBexec | noexec\fR\fR
239 .sp .6
240 .RS 4n
241 Allow or disallow executing programs in the file system. Allow or disallow
242 \fBmmap\fR(2) with \fBPROT_EXEC\fR for files within the file system. The
243 default is \fBexec\fR.
247 .ne 2
249 \fB\fBloop\fR\fR
251 .sp .6
252 .RS 4n
253 Ignored for compatibility.
257 .ne 2
259 \fB\fBnbmand | nonbmand\fR\fR
261 .sp .6
262 .RS 4n
263 Allow or disallow non-blocking mandatory locking semantics on this file system.
264 Non-blocking mandatory locking is disallowed by default.
266 If the file system is mounted with the \fBnbmand\fR option, then applications
267 can use the \fBfcntl\fR(2) interface to place non-blocking mandatory locks on
268 files and the system enforces those semantics. If you enable this option, it
269 can cause standards conformant applications to see unexpected errors.
271 To avoid the possibility of obtaining mandatory locks on system files, do not
272 use the \fBnbmand\fR option with the following file systems:
274 .in +2
277 /usr
278 /etc
279 /var
280 /proc
281 /dev
282 /devices
283 /system/contract
284 /system/object
285 /etc/mnttab
286 /etc/dfs/sharetab
288 .in -2
291 Do not use the \fBremount\fR option to change the \fBnbmand\fR disposition of
292 the file system. The \fBnbmand\fR option is mutually exclusive of the global
293 option. See \fB-g\fR.
297 .ne 2
299 \fB\fBro | rw\fR\fR
301 .sp .6
302 .RS 4n
303 Specify read-only or read-write. The default is \fBrw\fR.
307 .ne 2
309 \fB\fBsetuid | nosetuid\fR\fR
311 .sp .6
312 .RS 4n
313 Allow or disallow \fBsetuid\fR or \fBsetgid\fR execution. The default is
314 \fBsetuid\fR.
316 If you specify \fBsetuid\fR in conjunction with \fBnosuid\fR, the behavior is
317 the same as \fBnosuid\fR.
319 \fBnosuid\fR is equivalent to \fBnosetuid\fR and \fBnodevices\fR. When
320 \fBsuid\fR or \fBnosuid\fR is combined with \fBsetuid\fR or \fBnosetuid\fR and
321 \fBdevices\fR or \fBnodevices\fR, the most restrictive options take effect.
323 This option is highly recommended whenever the file system is shared by way of
324 NFS with the \fBroot=\fR option. Without it, NFS clients could add \fBsetuid\fR
325 programs to the server or create devices that could open security holes.
329 .ne 2
331 \fB\fBsuid | nosuid\fR\fR
333 .sp .6
334 .RS 4n
335 Allow or disallow \fBsetuid\fR or \fBsetgid\fR execution. The default is
336 \fBsuid\fR. This option also allows or disallows opening any device-special
337 entries that appear within the filesystem.
339 \fBnosuid\fR is equivalent to \fBnosetuid\fR and \fBnodevices\fR. When
340 \fBsuid\fR or \fBnosuid\fR is combined with \fBsetuid\fR or \fBnosetuid\fR and
341 \fBdevices\fR or \fBnodevices\fR, the most restrictive options take effect.
343 This option is highly recommended whenever the file system is shared using NFS
344 with the \fBroot=\fIoption\fR\fR, because, without it, NFS clients could add
345 \fBsetuid\fR programs to the server, or create devices that could open security
346 holes.
352 .ne 2
354 \fB\fB-O\fR\fR
356 .sp .6
357 .RS 4n
358 Overlay mount. Allow the file system to be mounted over an existing mount
359 point, making the underlying file system inaccessible. If a mount is attempted
360 on a pre-existing mount point without setting this flag, the mount will fail,
361 producing the error "device busy".
365 .ne 2
367 \fB\fB-r\fR\fR
369 .sp .6
370 .RS 4n
371 Mount the file system read-only.
376 .SH EXAMPLES
378 \fBExample 1 \fRMounting and Unmounting a DVD Image Directly
381 The following commands mount and unmount a DVD image.
384 .in +2
386 # \fBmount -F hsfs /images/solaris.iso /mnt/solaris-image\fR
387 # \fBumount /mnt/solaris-image\fR
389 .in -2
392 .SH USAGE
395 See \fBlargefile\fR(5) for the description of the behavior of \fBmount\fR and
396 \fBumount\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
397 bytes).
398 .SH FILES
400 .ne 2
402 \fB\fB/etc/mnttab\fR\fR
404 .sp .6
405 .RS 4n
406 Table of mounted file systems.
410 .ne 2
412 \fB\fB/etc/default/fs\fR\fR
414 .sp .6
415 .RS 4n
416 Default local file system type. Default values can be set for the following
417 flags in \fB/etc/default/fs\fR. For example: \fBLOCAL=ufs\fR
419 .ne 2
421 \fB\fBLOCAL:\fR\fR
423 .sp .6
424 .RS 4n
425 The default partition for a command if no \fIFSType\fR is specified.
431 .ne 2
433 \fB\fB/etc/vfstab\fR\fR
435 .sp .6
436 .RS 4n
437 List of default parameters for each file system.
440 .SH SEE ALSO
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),
448 \fBprivileges\fR(5), \fBlofs\fR(7FS), \fBpcfs\fR(7FS)
449 .SH NOTES
452 If the directory on which a file system is to be mounted is a symbolic link,
453 the file system is mounted on the directory to which the symbolic link refers,
454 rather than on top of the symbolic link itself.
455 .SH BUGS
458 The \fBmount\fR \fB-p\fR output is incorrect for \fBcachefs\fR.