6324 Add an `ndp' tool for manipulating the neighbors table
[illumos-gate.git] / usr / src / man / man1m / mount.1m
blob06c4f10269e6325b84b6a4e618eafdfc7c8d44e4
1 '\" te
2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
3 .\" Copyright 2015 Nexenta Systems, Inc. All rights reserved.
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.
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.
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]
7 .TH MOUNT 1M "Sep 8, 2015"
8 .SH NAME
9 mount, umount \- mount or unmount file systems and remote resources
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBmount\fR [\fB-p\fR | \fB-v\fR]
14 .fi
16 .LP
17 .nf
18 \fBmount\fR [\fB-F\fR \fIFSType\fR] [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR]
19      [\fB-O\fR] \fIspecial\fR | \fImount_point\fR
20 .fi
22 .LP
23 .nf
24 \fBmount\fR [\fB-F\fR \fIFSType\fR] [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR]
25      [\fB-O\fR] \fIspecial\fR \fImount_point\fR
26 .fi
28 .LP
29 .nf
30 \fBmount\fR \fB-a\fR [\fB-F\fR \fIFSType\fR] [\fB-V\fR] [\fIcurrent_options\fR]
31      [\fB-o\fR \fIspecific_options\fR] [\fImount_point\fR]...
32 .fi
34 .LP
35 .nf
36 \fBumount\fR [\fB-f\fR] [\fB-V\fR] [\fB-o\fR \fIspecific_options\fR] \fIspecial\fR | \fImount_point\fR
37 .fi
39 .LP
40 .nf
41 \fBumount\fR \fB-a\fR [\fB-f\fR] [\fB-V\fR] [\fB-o\fR \fIspecific_options\fR] [\fImount_point\fR]...
42 .fi
44 .SH DESCRIPTION
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 .LP
51 \fBumount\fR unmounts a currently mounted file system, which may be specified
52 either as a \fImount_point\fR or as \fIspecial\fR, the device on which the file
53 system resides.
54 .LP
55 The table of currently mounted file systems can be found by examining the
56 mounted file system information file. This is provided by a file system that is
57 usually mounted on \fB/etc/mnttab\fR. The mounted file system information is
58 described in \fBmnttab\fR(4). Mounting a file system adds an entry to the mount
59 table; a \fBumount\fR removes an entry from the table.
60 .LP
61 When invoked with both the \fIspecial\fR and \fImount_point\fR arguments and
62 the \fB-F\fR option, \fBmount\fR validates all arguments except for
63 \fIspecial\fR and invokes the appropriate \fIFSType\fR-specific \fBmount\fR
64 module. If invoked with no arguments, \fBmount\fR lists all the mounted file
65 systems recorded in the mount table, \fB/etc/mnttab\fR. If invoked with a
66 partial argument list (with only one of \fIspecial\fR or \fImount_point\fR, or
67 with both \fIspecial\fR or \fImount_point\fR specified but not \fIFSType\fR),
68 \fBmount\fR will search \fB/etc/vfstab\fR for an entry that will supply the
69 missing arguments. If no entry is found, and the special argument starts with
70 \fB/\fR, the default local file system type specified in \fB/etc/default/fs\fR
71 will be used. Otherwise the default remote file system type will be used. The
72 default remote file system type is determined by the first entry in the
73 \fB/etc/dfs/fstypes\fR file. After filling in missing arguments, \fBmount\fR
74 will invoke the \fIFSType\fR-specific \fBmount\fR module.
75 .LP
76 For file system types that support it, a file can be mounted directly as a file
77 system by specifying the full path to the file as the special argument.  In
78 such a case, the \fBnosuid\fR option is enforced. If specific file system
79 support for such loopback file mounts is not present, you can still use
80 \fBlofiadm\fR(1M) to mount a file system image. In this case, no special
81 options are enforced.
82 .LP
83 Only a user with sufficient privilege (at least \fBPRIV_SYS_MOUNT\fR) can mount
84 or unmount file systems using \fBmount\fR and \fBumount\fR. However, any user
85 can use \fBmount\fR to list mounted file systems and resources.
86 .SH OPTIONS
87 .ne 2
88 .na
89 \fB\fB-F\fR \fIFSType\fR\fR
90 .ad
91 .sp .6
92 .RS 4n
93 Used to specify the \fIFSType\fR on which to operate. The \fIFSType\fR must be
94 specified or must be determinable from \fB/etc/vfstab\fR, or by consulting
95 \fB/etc/default/fs\fR or \fB/etc/dfs/fstypes\fR.
96 .RE
98 .sp
99 .ne 2
101 \fB\fB-a\fR [ \fImount_points\fR. . . ]\fR
103 .sp .6
104 .RS 4n
105 Perform mount or umount operations in parallel, when possible.
107 If mount points are not specified, \fBmount\fR will mount all file systems
108 whose \fB/etc/vfstab\fR "mount at boot" field is \fByes\fR. If mount points are
109 specified, then \fB/etc/vfstab\fR "mount at boot" field will be ignored.
111 If mount points are specified, \fBumount\fR will only \fBumount\fR those mount
112 points. If none is specified, then \fBumount\fR will attempt to \fBunmount\fR
113 all file systems in \fB/etc/mnttab\fR, with the exception of certain system
114 required file systems: \fB/\fR, \fB/usr\fR, \fB/var\fR, \fB/var/adm\fR,
115 \fB/var/run\fR, \fB/proc\fR, \fB/dev/fd\fR and \fB/tmp\fR.
119 .ne 2
121 \fB\fB-f\fR\fR
123 .sp .6
124 .RS 4n
125 Forcibly unmount a file system.
127 Without this option, \fBumount\fR does not allow a file system to be unmounted
128 if a file on the file system is busy. Using this option can cause data loss for
129 open files; programs which access files after the file system has been
130 unmounted will get an error (\fBEIO\fR).
134 .ne 2
136 \fB\fB-p\fR\fR
138 .sp .6
139 .RS 4n
140 Print the list of mounted file systems in the \fB/etc/vfstab\fR format. Must be
141 the only option specified. See \fBBUGS\fR.
145 .ne 2
147 \fB\fB-v\fR\fR
149 .sp .6
150 .RS 4n
151 Print the list of mounted file systems in verbose format. Must be the only
152 option specified.
156 .ne 2
158 \fB\fB-V\fR\fR
160 .sp .6
161 .RS 4n
162 Echo the complete command line, but do not execute the command. \fBumount\fR
163 generates a command line by using the options and arguments provided by the
164 user and adding to them information derived from \fB/etc/mnttab\fR. This option
165 should be used to verify and validate the command line.
169 .ne 2
171 \fB\fIgeneric_options\fR\fR
173 .sp .6
174 .RS 4n
175 Options that are commonly supported by most \fIFSType\fR-specific command
176 modules. The following options are available:
178 .ne 2
180 \fB\fB-m\fR\fR
182 .sp .6
183 .RS 4n
184 Mount the file system without making an entry in \fB/etc/mnttab\fR.
188 .ne 2
190 \fB\fB-g\fR\fR
192 .sp .6
193 .RS 4n
194 Globally mount the file system. On a clustered system, this globally mounts the
195 file system on all nodes of the cluster. On a non-clustered system this has no
196 effect.
200 .ne 2
202 \fB\fB-o\fR\fR
204 .sp .6
205 .RS 4n
206 Specify \fIFSType\fR-specific options in a comma separated (without spaces)
207 list of suboptions and keyword-attribute pairs for interpretation by the
208 \fIFSType\fR-specific module of the command. (See \fBmount_ufs\fR(1M).) When
209 you use \fB-o\fR with a file system that has an entry in \fB/etc/vfstab\fR, any
210 \fBmount\fR options entered for that file system in \fB/etc/vfstab\fR are
211 ignored.
213 The following options are supported:
215 .ne 2
217 \fB\fBdevices | nodevices\fR\fR
219 .sp .6
220 .RS 4n
221 Allow or disallow the opening of device-special files. The default is
222 \fBdevices\fR.
224 If you use \fBnosuid\fR in conjunction with \fBdevices\fR, the behavior is
225 equivalent to that of \fBnosuid\fR.
229 .ne 2
231 \fB\fBexec | noexec\fR\fR
233 .sp .6
234 .RS 4n
235 Allow or disallow executing programs in the file system. Allow or disallow
236 \fBmmap\fR(2) with \fBPROT_EXEC\fR for files within the file system. The
237 default is \fBexec\fR.
241 .ne 2
243 \fB\fBloop\fR\fR
245 .sp .6
246 .RS 4n
247 Ignored for compatibility.
251 .ne 2
253 \fB\fBnbmand | nonbmand\fR\fR
255 .sp .6
256 .RS 4n
257 Allow or disallow non-blocking mandatory locking semantics on this file system.
258 Non-blocking mandatory locking is disallowed by default.
260 If the file system is mounted with the \fBnbmand\fR option, then applications
261 can use the \fBfcntl\fR(2) interface to place non-blocking mandatory locks on
262 files and the system enforces those semantics. If you enable this option, it
263 can cause standards conformant applications to see unexpected errors.
265 To avoid the possibility of obtaining mandatory locks on system files, do not
266 use the \fBnbmand\fR option with the following file systems:
268 .in +2
271 /usr
272 /etc
273 /var
274 /proc
275 /dev
276 /devices
277 /system/contract
278 /system/object
279 /etc/mnttab
280 /etc/dfs/sharetab
282 .in -2
285 Do not use the \fBremount\fR option to change the \fBnbmand\fR disposition of
286 the file system. The \fBnbmand\fR option is mutually exclusive of the global
287 option. See \fB-g\fR.
291 .ne 2
293 \fB\fBro | rw\fR\fR
295 .sp .6
296 .RS 4n
297 Specify read-only or read-write. The default is \fBrw\fR.
301 .ne 2
303 \fB\fBsetuid | nosetuid\fR\fR
305 .sp .6
306 .RS 4n
307 Allow or disallow \fBsetuid\fR or \fBsetgid\fR execution. The default is
308 \fBsetuid\fR.
310 If you specify \fBsetuid\fR in conjunction with \fBnosuid\fR, the behavior is
311 the same as \fBnosuid\fR.
313 \fBnosuid\fR is equivalent to \fBnosetuid\fR and \fBnodevices\fR. When
314 \fBsuid\fR or \fBnosuid\fR is combined with \fBsetuid\fR or \fBnosetuid\fR and
315 \fBdevices\fR or \fBnodevices\fR, the most restrictive options take effect.
317 This option is highly recommended whenever the file system is shared by way of
318 NFS with the \fBroot=\fR option. Without it, NFS clients could add \fBsetuid\fR
319 programs to the server or create devices that could open security holes.
323 .ne 2
325 \fB\fBsuid | nosuid\fR\fR
327 .sp .6
328 .RS 4n
329 Allow or disallow \fBsetuid\fR or \fBsetgid\fR execution. The default is
330 \fBsuid\fR. This option also allows or disallows opening any device-special
331 entries that appear within the filesystem.
333 \fBnosuid\fR is equivalent to \fBnosetuid\fR and \fBnodevices\fR. When
334 \fBsuid\fR or \fBnosuid\fR is combined with \fBsetuid\fR or \fBnosetuid\fR and
335 \fBdevices\fR or \fBnodevices\fR, the most restrictive options take effect.
337 This option is highly recommended whenever the file system is shared using NFS
338 with the \fBroot=\fIoption\fR\fR, because, without it, NFS clients could add
339 \fBsetuid\fR programs to the server, or create devices that could open security
340 holes.
346 .ne 2
348 \fB\fB-O\fR\fR
350 .sp .6
351 .RS 4n
352 Overlay mount. Allow the file system to be mounted over an existing mount
353 point, making the underlying file system inaccessible. If a mount is attempted
354 on a pre-existing mount point without setting this flag, the mount will fail,
355 producing the error "device busy".
359 .ne 2
361 \fB\fB-r\fR\fR
363 .sp .6
364 .RS 4n
365 Mount the file system read-only.
370 .SH EXAMPLES
372 \fBExample 1 \fRMounting and Unmounting a DVD Image Directly
375 The following commands mount and unmount a DVD image.
378 .in +2
380 # \fBmount -F hsfs /images/solaris.iso /mnt/solaris-image\fR
381 # \fBumount /mnt/solaris-image\fR
383 .in -2
386 .SH USAGE
388 See \fBlargefile\fR(5) for the description of the behavior of \fBmount\fR and
389 \fBumount\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
390 bytes).
391 .SH FILES
392 .ne 2
394 \fB\fB/etc/mnttab\fR\fR
396 .sp .6
397 .RS 4n
398 Table of mounted file systems.
402 .ne 2
404 \fB\fB/etc/default/fs\fR\fR
406 .sp .6
407 .RS 4n
408 Default local file system type. Default values can be set for the following
409 flags in \fB/etc/default/fs\fR. For example: \fBLOCAL=ufs\fR
411 .ne 2
413 \fB\fBLOCAL:\fR\fR
415 .sp .6
416 .RS 4n
417 The default partition for a command if no \fIFSType\fR is specified.
423 .ne 2
425 \fB\fB/etc/vfstab\fR\fR
427 .sp .6
428 .RS 4n
429 List of default parameters for each file system.
432 .SH SEE ALSO
434 \fBlofiadm\fR(1M), \fBmount_hsfs\fR(1M), \fBmount_nfs\fR(1M),
435 \fBmount_pcfs\fR(1M),  \fBmount_smbfs\fR(1M), \fBmount_tmpfs\fR(1M),
436 \fBmount_udfs\fR(1M), \fBmount_ufs\fR(1M), \fBmountall\fR(1M),
437 \fBumountall\fR(1M), \fBfcntl\fR(2), \fBmmap\fR(2), \fBmnttab\fR(4),
438 \fBvfstab\fR(4), \fBattributes\fR(5), \fBlargefile\fR(5),
439 \fBprivileges\fR(5), \fBlofs\fR(7FS), \fBpcfs\fR(7FS)
440 .SH NOTES
442 If the directory on which a file system is to be mounted is a symbolic link,
443 the file system is mounted on the directory to which the symbolic link refers,
444 rather than on top of the symbolic link itself.