1 .\" Copyright (c) 1980, 1989, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" @(#)mount.8 8.8 (Berkeley) 6/16/94
29 .\" $FreeBSD: src/sbin/mount/mount.8,v 1.31.2.12 2003/02/23 21:17:42 trhodes Exp $
36 .Nd mount file systems
45 .Brq Ar special | node
56 system call to prepare and graft a
58 or the remote node (rhost:path) or a HAMMER2 label (@label) on to the
59 file system tree at the point
65 are not provided, the appropriate information is taken from the
69 The system maintains a list of currently mounted file systems.
70 If no arguments are given to
74 The options are as follows:
75 .Bl -tag -width indent
77 All the filesystems described in
80 Exceptions are those marked as
84 flag (see below), or if they are already mounted (except the
85 root filesystem which is always remounted to preserve
86 traditional single user mode behavior).
88 Causes everything to be done except for the actual system call.
89 This option is useful in conjunction with the
94 command is trying to do.
100 Forces the revocation of write access when trying to downgrade
101 a filesystem mount status from read-write to read-only.
103 forces the R/W mount of an unclean filesystem (dangerous; use with
106 Options are specified with a
108 flag followed by a comma separated string of options.
111 prefix is added or removed from a option name, then meaning is negated.
112 In case of conflicting options being specified, the rightmost option
114 The following options are available:
115 .Bl -tag -width indent
119 to the file system should be done asynchronously.
123 and should not be used unless you are prepared to recreate the file
124 system should your system crash.
126 This flag indicates that the file system was mounted by
128 Automounted file systems are automatically unmounted by
133 flag, this is the same as specifying the options currently in effect for
134 the mounted filesystem.
138 forces the revocation of write access when trying to downgrade
139 a filesystem mount status from read-write to read-only.
141 forces the R/W mount of an unclean filesystem (dangerous; use with caution).
145 flag, this is the same as specifying all the options listed in the
147 file for the filesystem.
149 Metadata I/O should be done synchronously, while data I/O should be done
153 Do not update the file access time when reading from a file.
155 is useful on filesystems where there are large numbers of files and
156 performance is more critical than updating the file access time (which is
157 rarely ever important).
158 This option is currently only supported on local filesystems.
160 This filesystem should be skipped when
166 Disable read clustering.
168 Disable write clustering.
170 Do not interpret character or block special devices on the file system.
171 This option is useful for a server that has file systems containing
172 special devices for architectures other than its own.
173 This option is set automatically when the user does not have super-user
176 Do not allow execution of any binaries on the mounted file system.
177 This option is useful for a server that has file systems containing
178 binaries for architectures other than its own.
180 Do not allow set-user-identifier or set-group-identifier bits to take effect.
181 Note: this option is worthless if a public available suid or sgid
184 is installed on your system.
185 It is set automatically when the user does not have super-user privileges.
187 Do not follow symlinks
188 on the mounted file system.
189 .It Cm rdonly , ro , norw
192 mount the file system read-only (even the super-user may not write it).
196 to the file system should be done synchronously.
198 If the device supports TRIM
199 .Va ( kern.cam.da.X.trim_enabled
201 the file system will perform online trim for corresponding block deletions.
204 supports this feature.
206 A directory on the mounted filesystem will respond to the SUID bit
207 being set, by setting the owner of any new files to be the same
208 as the owner of the directory.
209 New directories will inherit the bit from their parents.
210 Execute bits are removed from
211 the file, and it will not be given to root.
213 This feature is designed for use on fileservers serving PC users via
215 It provides security holes for shell users and as
216 such should not be used on shell machines, especially on home directories.
217 This option requires the SUIDDIR
218 option in the kernel to work.
221 filesystems support this option.
224 for more information.
228 indicate that the status of an already mounted file system should be changed.
234 Any additional options specific to a filesystem type that is not
235 one of the internally known types (see the
237 option) may be passed as a comma separated list; these options are
238 distinguished by a leading
241 Options that take a value are specified using the syntax -option=value.
245 .Bd -literal -offset indent
246 mount -t mfs -o nosuid,-N,-s=4000 /dev/da0s0b /tmp
251 to execute the equivalent of:
252 .Bd -literal -offset indent
253 /sbin/mount_mfs -o nosuid -N -s 4000 /dev/da0s0b /tmp
256 Additional options specific to filesystem types
257 which are not internally known
258 (see the description of the
261 may be described in the manual pages for the associated
262 .Pa /sbin/mount_ Ns Sy XXX
265 Print mount information in
268 If fstab is missing or if the freq and passno fields are omitted,
269 the default values as described in
276 The file system is to be mounted read-only.
277 Mount the file system read-only (even the super-user may not write it).
284 The argument following the
286 is used to indicate the file system type.
293 to indicate that the actions should only be taken on
294 filesystems of the specified type.
295 More than one type may be specified in a comma separated list.
296 The list of filesystem types can be prefixed with
298 to specify the filesystem types for which action should
304 .Bd -literal -offset indent
305 mount -a -t nonfs,mfs
308 mounts all filesystems except those of type
313 If the type is not the internally known type,
316 will attempt to execute a program in
317 .Pa /sbin/mount_ Ns Sy XXX
320 is replaced by the type name.
321 For example, nfs filesystems are mounted by the program
322 .Pa /sbin/mount_nfs .
324 Most filesystems will be dynamically loaded by their
327 if not already present in the kernel, using the
330 Because this mechanism requires writable temporary space,
331 the filesystem type containing
333 must be compiled into the kernel, and the filesystems containing
339 before any filesystems which might be dynamically loaded.
343 flag indicates that the status of an already mounted file
344 system should be changed.
345 Any of the options discussed above (the
349 also a file system can be changed from read-only to read-write
351 An attempt to change from read-write to read-only will fail if any
352 files on the filesystem are currently open for writing unless the
354 flag is also specified.
355 The set of options is determined by applying the options specified
358 and finally applying the
366 The file system object is to be read and write.
369 .Bl -tag -width PATH_FSTAB
371 If the environment variable
373 is set all operations are performed against the specified file.
376 .Bl -tag -width /etc/fstab -compact
381 Various, most of them are self-explanatory.
383 .Dl XXXXX filesystem is not available
385 The kernel does not support the respective filesystem type.
387 support for a particular filesystem might be provided either on a static
388 (kernel compile-time), or dynamic basis (loaded as a kernel module by
392 or its subprocesses attempt to dynamically load a filesystem module if
393 it has not been configured statically, using
395 In this case, the above error message can also mean that you did not
396 have permission to load the module.
413 .Xr mount_hammer2 8 ,
435 the permissions on the original mount point determine if
437 is accessible from the mounted file system.
438 The minimum permissions for
439 the mount point for traversal across the mount point in both
440 directions to be possible for all users is 0111 (execute for all).
442 It is possible for a corrupted file system to cause a crash.