teach manpages about largefile's demise
[unleashed.git] / share / man / man8 / mount.8
blobb2032a1d60a1ad6c4634e8e616f6b33060df5378
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 8 "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_points...\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_points...\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(8) 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.
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-o\fR\fR
192 .sp .6
193 .RS 4n
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
199 ignored.
201 The following options are supported:
203 .ne 2
205 \fB\fBdevices | nodevices\fR\fR
207 .sp .6
208 .RS 4n
209 Allow or disallow the opening of device-special files. The default is
210 \fBdevices\fR.
212 If you use \fBnosuid\fR in conjunction with \fBdevices\fR, the behavior is
213 equivalent to that of \fBnosuid\fR.
217 .ne 2
219 \fB\fBexec | noexec\fR\fR
221 .sp .6
222 .RS 4n
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.
229 .ne 2
231 \fB\fBloop\fR\fR
233 .sp .6
234 .RS 4n
235 Ignored for compatibility.
239 .ne 2
241 \fB\fBnbmand | nonbmand\fR\fR
243 .sp .6
244 .RS 4n
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:
256 .in +2
259 /usr
260 /etc
261 /var
262 /proc
263 /dev
264 /devices
265 /system/contract
266 /system/object
267 /etc/mnttab
268 /etc/dfs/sharetab
270 .in -2
273 Do not use the \fBremount\fR option to change the \fBnbmand\fR disposition of
274 the file system.
278 .ne 2
280 \fB\fBro | rw\fR\fR
282 .sp .6
283 .RS 4n
284 Specify read-only or read-write. The default is \fBrw\fR.
288 .ne 2
290 \fB\fBsetuid | nosetuid\fR\fR
292 .sp .6
293 .RS 4n
294 Allow or disallow \fBsetuid\fR or \fBsetgid\fR execution. The default is
295 \fBsetuid\fR.
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.
310 .ne 2
312 \fB\fBsuid | nosuid\fR\fR
314 .sp .6
315 .RS 4n
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
327 holes.
333 .ne 2
335 \fB\fB-O\fR\fR
337 .sp .6
338 .RS 4n
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".
346 .ne 2
348 \fB\fB-r\fR\fR
350 .sp .6
351 .RS 4n
352 Mount the file system read-only.
357 .SH EXAMPLES
359 \fBExample 1 \fRMounting and Unmounting a DVD Image Directly
362 The following commands mount and unmount a DVD image.
365 .in +2
367 # \fBmount -F hsfs /images/solaris.iso /mnt/solaris-image\fR
368 # \fBumount /mnt/solaris-image\fR
370 .in -2
373 .SH FILES
374 .ne 2
376 \fB\fB/etc/mnttab\fR\fR
378 .sp .6
379 .RS 4n
380 Table of mounted file systems.
384 .ne 2
386 \fB\fB/etc/default/fs\fR\fR
388 .sp .6
389 .RS 4n
390 Default local file system type. Default values can be set for the following
391 flags in \fB/etc/default/fs\fR. For example: \fBLOCAL=ufs\fR
393 .ne 2
395 \fB\fBLOCAL:\fR\fR
397 .sp .6
398 .RS 4n
399 The default partition for a command if no \fIFSType\fR is specified.
405 .ne 2
407 \fB\fB/etc/vfstab\fR\fR
409 .sp .6
410 .RS 4n
411 List of default parameters for each file system.
414 .SH SEE ALSO
416 \fBlofiadm\fR(8), \fBmount_hsfs\fR(8), \fBmount_nfs\fR(8),
417 \fBmount_pcfs\fR(8),  \fBmount_smbfs\fR(8), \fBmount_tmpfs\fR(8),
418 \fBmount_udfs\fR(8), \fBmount_ufs\fR(8), \fBmountall\fR(8),
419 \fBumountall\fR(8), \fBfcntl\fR(2), \fBmmap\fR(2), \fBmnttab\fR(4),
420 \fBvfstab\fR(4), \fBattributes\fR(5),
421 \fBprivileges\fR(5), \fBlofs\fR(7FS), \fBpcfs\fR(7FS)
422 .SH NOTES
424 If the directory on which a file system is to be mounted is a symbolic link,
425 the file system is mounted on the directory to which the symbolic link refers,
426 rather than on top of the symbolic link itself.