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 8 "Sep 8, 2015"
9 mount, umount \- mount or unmount file systems and remote resources
13 \fBmount\fR [\fB-p\fR | \fB-v\fR]
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
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
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_points...\fR]
36 \fBumount\fR [\fB-f\fR] [\fB-V\fR] [\fB-o\fR \fIspecific_options\fR] \fIspecial\fR | \fImount_point\fR
41 \fBumount\fR \fB-a\fR [\fB-f\fR] [\fB-V\fR] [\fB-o\fR \fIspecific_options\fR] [\fImount_points...\fR]
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.
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
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.
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.
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(8) to mount a file system image. In this case, no special
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.
89 \fB\fB-F\fR \fIFSType\fR\fR
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.
101 \fB\fB-a\fR [ \fImount_points\fR... ]\fR
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.
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).
140 Print the list of mounted file systems in the \fB/etc/vfstab\fR format. Must be
141 the only option specified.
151 Print the list of mounted file systems in verbose format. Must be the only
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.
171 \fB\fIgeneric_options\fR\fR
175 Options that are commonly supported by most \fIFSType\fR-specific command
176 modules. The following options are available:
184 Mount the file system without making an entry in \fB/etc/mnttab\fR.
194 Specify \fIFSType\fR-specific options in a comma separated (without spaces)
195 list of suboptions and keyword-attribute pairs for interpretation by the
196 \fIFSType\fR-specific module of the command. (See \fBmount_ufs\fR(8).) When
197 you use \fB-o\fR with a file system that has an entry in \fB/etc/vfstab\fR, any
198 \fBmount\fR options entered for that file system in \fB/etc/vfstab\fR are
201 The following options are supported:
205 \fB\fBdevices | nodevices\fR\fR
209 Allow or disallow the opening of device-special files. The default is
212 If you use \fBnosuid\fR in conjunction with \fBdevices\fR, the behavior is
213 equivalent to that of \fBnosuid\fR.
219 \fB\fBexec | noexec\fR\fR
223 Allow or disallow executing programs in the file system. Allow or disallow
224 \fBmmap\fR(2) with \fBPROT_EXEC\fR for files within the file system. The
225 default is \fBexec\fR.
235 Ignored for compatibility.
241 \fB\fBnbmand | nonbmand\fR\fR
245 Allow or disallow non-blocking mandatory locking semantics on this file system.
246 Non-blocking mandatory locking is disallowed by default.
248 If the file system is mounted with the \fBnbmand\fR option, then applications
249 can use the \fBfcntl\fR(2) interface to place non-blocking mandatory locks on
250 files and the system enforces those semantics. If you enable this option, it
251 can cause standards conformant applications to see unexpected errors.
253 To avoid the possibility of obtaining mandatory locks on system files, do not
254 use the \fBnbmand\fR option with the following file systems:
273 Do not use the \fBremount\fR option to change the \fBnbmand\fR disposition of
284 Specify read-only or read-write. The default is \fBrw\fR.
290 \fB\fBsetuid | nosetuid\fR\fR
294 Allow or disallow \fBsetuid\fR or \fBsetgid\fR execution. The default is
297 If you specify \fBsetuid\fR in conjunction with \fBnosuid\fR, the behavior is
298 the same as \fBnosuid\fR.
300 \fBnosuid\fR is equivalent to \fBnosetuid\fR and \fBnodevices\fR. When
301 \fBsuid\fR or \fBnosuid\fR is combined with \fBsetuid\fR or \fBnosetuid\fR and
302 \fBdevices\fR or \fBnodevices\fR, the most restrictive options take effect.
304 This option is highly recommended whenever the file system is shared by way of
305 NFS with the \fBroot=\fR option. Without it, NFS clients could add \fBsetuid\fR
306 programs to the server or create devices that could open security holes.
312 \fB\fBsuid | nosuid\fR\fR
316 Allow or disallow \fBsetuid\fR or \fBsetgid\fR execution. The default is
317 \fBsuid\fR. This option also allows or disallows opening any device-special
318 entries that appear within the filesystem.
320 \fBnosuid\fR is equivalent to \fBnosetuid\fR and \fBnodevices\fR. When
321 \fBsuid\fR or \fBnosuid\fR is combined with \fBsetuid\fR or \fBnosetuid\fR and
322 \fBdevices\fR or \fBnodevices\fR, the most restrictive options take effect.
324 This option is highly recommended whenever the file system is shared using NFS
325 with the \fBroot=\fIoption\fR\fR, because, without it, NFS clients could add
326 \fBsetuid\fR programs to the server, or create devices that could open security
339 Overlay mount. Allow the file system to be mounted over an existing mount
340 point, making the underlying file system inaccessible. If a mount is attempted
341 on a pre-existing mount point without setting this flag, the mount will fail,
342 producing the error "device busy".
352 Mount the file system read-only.
359 \fBExample 1 \fRMounting and Unmounting a DVD Image Directly
362 The following commands mount and unmount a DVD image.
367 # \fBmount -F hsfs /images/solaris.iso /mnt/solaris-image\fR
368 # \fBumount /mnt/solaris-image\fR
375 See \fBlargefile\fR(5) for the description of the behavior of \fBmount\fR and
376 \fBumount\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
381 \fB\fB/etc/mnttab\fR\fR
385 Table of mounted file systems.
391 \fB\fB/etc/default/fs\fR\fR
395 Default local file system type. Default values can be set for the following
396 flags in \fB/etc/default/fs\fR. For example: \fBLOCAL=ufs\fR
404 The default partition for a command if no \fIFSType\fR is specified.
412 \fB\fB/etc/vfstab\fR\fR
416 List of default parameters for each file system.
421 \fBlofiadm\fR(8), \fBmount_hsfs\fR(8), \fBmount_nfs\fR(8),
422 \fBmount_pcfs\fR(8), \fBmount_smbfs\fR(8), \fBmount_tmpfs\fR(8),
423 \fBmount_udfs\fR(8), \fBmount_ufs\fR(8), \fBmountall\fR(8),
424 \fBumountall\fR(8), \fBfcntl\fR(2), \fBmmap\fR(2), \fBmnttab\fR(4),
425 \fBvfstab\fR(4), \fBattributes\fR(5), \fBlargefile\fR(5),
426 \fBprivileges\fR(5), \fBlofs\fR(7FS), \fBpcfs\fR(7FS)
429 If the directory on which a file system is to be mounted is a symbolic link,
430 the file system is mounted on the directory to which the symbolic link refers,
431 rather than on top of the symbolic link itself.