Deleted Added
full compact
mount.8 (28658) mount.8 (28671)
1.\" Copyright (c) 1980, 1989, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
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. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)mount.8 8.8 (Berkeley) 6/16/94
1.\" Copyright (c) 1980, 1989, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
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. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)mount.8 8.8 (Berkeley) 6/16/94
33.\" $Id: mount.8,v 1.16 1997/08/24 02:27:08 steve Exp $
33.\" $Id: mount.8,v 1.17 1997/08/24 17:51:12 joerg Exp $
34.\"
35.Dd June 16, 1994
36.Dt MOUNT 8
37.Os BSD 4
38.Sh NAME
39.Nm mount
40.Nd mount file systems
41.Sh SYNOPSIS
42.Nm mount
43.Op Fl adfpruvw
44.Op Fl t Ar ufs | lfs | external_type
45.Nm mount
46.Op Fl dfpruvw
47.Ar special | node
48.Nm mount
49.Op Fl dfpruvw
50.Op Fl o Ar options
51.Op Fl t Ar ufs | lfs | external_type
52.Ar special node
53.Sh DESCRIPTION
54The
55.Nm
56command
57calls the
58.Xr mount 2
59system call to prepare and graft a
60.Ar "special device"
61or the remote node (rhost:path) on to the file system tree at the point
62.Ar node .
63If either
64.Ar special
65or
66.Ar node
67are not provided, the appropriate information is taken from the
68.Xr fstab 5
69file.
70.Pp
71The system maintains a list of currently mounted file systems.
72If no arguments are given to
73.Nm mount ,
74this list is printed.
75.Pp
76The options are as follows:
77.Bl -tag -width indent
78.It Fl a
79All the filesystems described in
80.Xr fstab 5
81are mounted.
34.\"
35.Dd June 16, 1994
36.Dt MOUNT 8
37.Os BSD 4
38.Sh NAME
39.Nm mount
40.Nd mount file systems
41.Sh SYNOPSIS
42.Nm mount
43.Op Fl adfpruvw
44.Op Fl t Ar ufs | lfs | external_type
45.Nm mount
46.Op Fl dfpruvw
47.Ar special | node
48.Nm mount
49.Op Fl dfpruvw
50.Op Fl o Ar options
51.Op Fl t Ar ufs | lfs | external_type
52.Ar special node
53.Sh DESCRIPTION
54The
55.Nm
56command
57calls the
58.Xr mount 2
59system call to prepare and graft a
60.Ar "special device"
61or the remote node (rhost:path) on to the file system tree at the point
62.Ar node .
63If either
64.Ar special
65or
66.Ar node
67are not provided, the appropriate information is taken from the
68.Xr fstab 5
69file.
70.Pp
71The system maintains a list of currently mounted file systems.
72If no arguments are given to
73.Nm mount ,
74this list is printed.
75.Pp
76The options are as follows:
77.Bl -tag -width indent
78.It Fl a
79All the filesystems described in
80.Xr fstab 5
81are mounted.
82Exceptions are those marked as ``noauto'' or are excluded by the
82Exceptions are those marked as ``noauto'', excluded by the
83.Fl t
83.Fl t
84flag (see below).
84flag (see below), or if they are already mounted (except the
85root filesystem which is always remounted to preserve
86traditional single user mode behavior).
85.It Fl d
86Causes everything to be done except for the actual system call.
87This option is useful in conjunction with the
88.Fl v
89flag to
90determine what the
91.Nm
92command is trying to do.
93.It Fl f
94Forces the revocation of write access when trying to downgrade
95a filesystem mount status from read-write to read-only. Also
96forces the R/W mount of an unclean filesystem (dangerous; use with
97caution).
98.It Fl o
99Options are specified with a
100.Fl o
101flag followed by a comma separated string of options.
102The following options are available:
103.Bl -tag -width indent
104.It async
105All
106.Tn I/O
107to the file system should be done asynchronously.
108This is a
109.Em dangerous
110flag to set,
111and should not be used unless you are prepared to recreate the file
112system should your system crash.
113.It force
114The same as
115.Fl f ;
116forces the revocation of write access when trying to downgrade
117a filesystem mount status from read-write to read-only. Also
118forces the R/W mount of an unclean filesystem (dangerous; use with caution).
119.It noatime
120Do not update the file access time when reading from a file. This option
121is useful on filesystems where there are large numbers of files and
122performance is more critical than updating the file access time (which is
123rarely ever important). This option is currently only supported on local
124filesystems.
125.It noauto
126This filesystem should be skipped when mount is run with the
127.Fl a
128flag.
129.It nodev
130Do not interpret character or block special devices on the file system.
131This option is useful for a server that has file systems containing
132special devices for architectures other than its own.
133.It noexec
134Do not allow execution of any binaries on the mounted file system.
135This option is useful for a server that has file systems containing
136binaries for architectures other than its own.
137.It nosuid
138Do not allow set-user-identifier or set-group-identifier bits to take effect.
139Note: this option is worthless if a public available suid or sgid
140wrapper like
141.Xr suidperl 1
142is installed on your system.
143.It rdonly
144The same as
145.Fl r ;
146mount the file system read-only (even the super-user may not write it).
147.It sync
148All
149.Tn I/O
150to the file system should be done synchronously.
151.It update
152The same as
153.Fl u ;
154indicate that the status of an already mounted file system should be changed.
155.It union
156Causes the namespace at the mount point to appear as the union
157of the mounted filesystem root and the existing directory.
158Lookups will be done in the mounted filesystem first.
159If those operations fail due to a non-existent file the underlying
160directory is then accessed.
161All creates are done in the mounted filesystem.
162.El
163.Pp
164Any additional options specific to a filesystem type that is not
165one of the internally known types (see the
166.Fl t
167option) may be passed as a comma separated list; these options are
168distinguished by a leading
169.Dq \&-
170(dash).
171Options that take a value are specified using the syntax -option=value.
172For example, the
173.Nm
174command:
175.Bd -literal -offset indent
176mount -t mfs -o nosuid,-N,-s=4000 /dev/dk0b /tmp
177.Ed
178.Pp
179causes
180.Nm
181to execute the equivalent of:
182.Bd -literal -offset indent
183/sbin/mount_mfs -o nosuid -N -s 4000 /dev/dk0b /tmp
184.Ed
185.It Fl p
186Print mount information in fstab format. Implies also the
187.Fl v
188option.
189.It Fl r
190The file system is to be mounted read-only.
191Mount the file system read-only (even the super-user may not write it).
192The same as the
193.Dq rdonly
194argument to the
195.Fl o
196option.
197.It Fl t Ar "ufs \\*(Ba lfs \\*(Ba external type"
198The argument following the
199.Fl t
200is used to indicate the file system type.
201The type
202.Ar ufs
203is the default.
204The
205.Fl t
206option can be used
207to indicate that the actions should only be taken on
208filesystems of the specified type.
209More than one type may be specified in a comma separated list.
210The list of filesystem types can be prefixed with
211.Dq no
212to specify the filesystem types for which action should
213.Em not
214be taken.
215For example, the
216.Nm
217command:
218.Bd -literal -offset indent
219mount -a -t nonfs,mfs
220.Ed
221.Pp
222mounts all filesystems except those of type
223.Tn NFS
224and
225.Tn MFS .
226.Pp
227If the type is not one of the internally known types,
228.Nm
229will attempt to execute a program in
230.Pa /sbin/mount_ Ns Em XXX
231where
232.Em XXX
233is replaced by the type name.
234For example, nfs filesystems are mounted by the program
235.Pa /sbin/mount_nfs .
236.Pp
237Most filesystems will be dynamically loaded by their mount programs
238if not already present in the kernel, using the
239.Xr vfsload 3
240subroutine. Because this mechanism requires writable temporary space,
241the filesystem type containing
242.Pa /tmp
243must be compiled into the kernel, and the filesystems containing
244.Pa /tmp
245and
246.Pa /usr/bin/ld
247must be listed in
248.Pa /etc/fstab
249before any filesystems which might be dynamically loaded.
250.It Fl u
251The
252.Fl u
253flag indicates that the status of an already mounted file
254system should be changed.
255Any of the options discussed above (the
256.Fl o
257option)
258may be changed;
259also a file system can be changed from read-only to read-write
260or vice versa.
261An attempt to change from read-write to read-only will fail if any
262files on the filesystem are currently open for writing unless the
263.Fl f
264flag is also specified.
265The set of options is determined by first extracting the options
266for the file system from the
267.Xr fstab 5
268table,
269then applying any options specified by the
270.Fl o
271argument,
272and finally applying the
273.Fl r
274or
275.Fl w
276option.
277.It Fl v
278Verbose mode.
279.It Fl w
280The file system object is to be read and write.
281.Pp
282The options specific to NFS filesystems are described in the
283.Xr mount_nfs 8
284manual page.
285.Sh DIAGNOSTICS
286Various, most of them are self-explanatory.
287.Pp
288.Dl XXXXX filesystem is not available
289.Pp
290The kernel doesn't support the respective filesystem type. Note that
291support for a particular filesystem might be provided either on a static
292(kernel compile-time), or dynamic basis (loaded as a kernel module by
293.Xr modload 8 ).
294Normally,
295.Nm
296or its subprocesses attempt to dynamically load a filesystem module if
297it hasn't been configured statically, using
298.Xr vfsload 3 .
299In this case, the above error message can also mean that you didn't
300have permission to load the module.
301.Sh FILES
302.Bl -tag -width /etc/fstab -compact
303.It Pa /etc/fstab
304file system table
305.El
306.Sh SEE ALSO
307.Xr mount 2 ,
308.Xr vfsload 3 ,
309.Xr fstab 5 ,
310.Xr mount_cd9660 8 ,
311.Xr mount_fdesc 8 ,
312.Xr mount_kernfs 8 ,
313.Xr mount_lfs 8 ,
314.Xr mount_mfs 8 ,
315.Xr mount_msdos 8 ,
316.Xr mount_nfs 8 ,
317.Xr mount_null 8 ,
318.Xr mount_portal 8 ,
319.Xr mount_procfs 8 ,
320.Xr mount_umap 8 ,
321.Xr mount_union 8 ,
322.Xr umount 8
323.Sh BUGS
324It is possible for a corrupted file system to cause a crash.
325.Sh HISTORY
326A
327.Nm
328command appeared in
329.At v1 .
87.It Fl d
88Causes everything to be done except for the actual system call.
89This option is useful in conjunction with the
90.Fl v
91flag to
92determine what the
93.Nm
94command is trying to do.
95.It Fl f
96Forces the revocation of write access when trying to downgrade
97a filesystem mount status from read-write to read-only. Also
98forces the R/W mount of an unclean filesystem (dangerous; use with
99caution).
100.It Fl o
101Options are specified with a
102.Fl o
103flag followed by a comma separated string of options.
104The following options are available:
105.Bl -tag -width indent
106.It async
107All
108.Tn I/O
109to the file system should be done asynchronously.
110This is a
111.Em dangerous
112flag to set,
113and should not be used unless you are prepared to recreate the file
114system should your system crash.
115.It force
116The same as
117.Fl f ;
118forces the revocation of write access when trying to downgrade
119a filesystem mount status from read-write to read-only. Also
120forces the R/W mount of an unclean filesystem (dangerous; use with caution).
121.It noatime
122Do not update the file access time when reading from a file. This option
123is useful on filesystems where there are large numbers of files and
124performance is more critical than updating the file access time (which is
125rarely ever important). This option is currently only supported on local
126filesystems.
127.It noauto
128This filesystem should be skipped when mount is run with the
129.Fl a
130flag.
131.It nodev
132Do not interpret character or block special devices on the file system.
133This option is useful for a server that has file systems containing
134special devices for architectures other than its own.
135.It noexec
136Do not allow execution of any binaries on the mounted file system.
137This option is useful for a server that has file systems containing
138binaries for architectures other than its own.
139.It nosuid
140Do not allow set-user-identifier or set-group-identifier bits to take effect.
141Note: this option is worthless if a public available suid or sgid
142wrapper like
143.Xr suidperl 1
144is installed on your system.
145.It rdonly
146The same as
147.Fl r ;
148mount the file system read-only (even the super-user may not write it).
149.It sync
150All
151.Tn I/O
152to the file system should be done synchronously.
153.It update
154The same as
155.Fl u ;
156indicate that the status of an already mounted file system should be changed.
157.It union
158Causes the namespace at the mount point to appear as the union
159of the mounted filesystem root and the existing directory.
160Lookups will be done in the mounted filesystem first.
161If those operations fail due to a non-existent file the underlying
162directory is then accessed.
163All creates are done in the mounted filesystem.
164.El
165.Pp
166Any additional options specific to a filesystem type that is not
167one of the internally known types (see the
168.Fl t
169option) may be passed as a comma separated list; these options are
170distinguished by a leading
171.Dq \&-
172(dash).
173Options that take a value are specified using the syntax -option=value.
174For example, the
175.Nm
176command:
177.Bd -literal -offset indent
178mount -t mfs -o nosuid,-N,-s=4000 /dev/dk0b /tmp
179.Ed
180.Pp
181causes
182.Nm
183to execute the equivalent of:
184.Bd -literal -offset indent
185/sbin/mount_mfs -o nosuid -N -s 4000 /dev/dk0b /tmp
186.Ed
187.It Fl p
188Print mount information in fstab format. Implies also the
189.Fl v
190option.
191.It Fl r
192The file system is to be mounted read-only.
193Mount the file system read-only (even the super-user may not write it).
194The same as the
195.Dq rdonly
196argument to the
197.Fl o
198option.
199.It Fl t Ar "ufs \\*(Ba lfs \\*(Ba external type"
200The argument following the
201.Fl t
202is used to indicate the file system type.
203The type
204.Ar ufs
205is the default.
206The
207.Fl t
208option can be used
209to indicate that the actions should only be taken on
210filesystems of the specified type.
211More than one type may be specified in a comma separated list.
212The list of filesystem types can be prefixed with
213.Dq no
214to specify the filesystem types for which action should
215.Em not
216be taken.
217For example, the
218.Nm
219command:
220.Bd -literal -offset indent
221mount -a -t nonfs,mfs
222.Ed
223.Pp
224mounts all filesystems except those of type
225.Tn NFS
226and
227.Tn MFS .
228.Pp
229If the type is not one of the internally known types,
230.Nm
231will attempt to execute a program in
232.Pa /sbin/mount_ Ns Em XXX
233where
234.Em XXX
235is replaced by the type name.
236For example, nfs filesystems are mounted by the program
237.Pa /sbin/mount_nfs .
238.Pp
239Most filesystems will be dynamically loaded by their mount programs
240if not already present in the kernel, using the
241.Xr vfsload 3
242subroutine. Because this mechanism requires writable temporary space,
243the filesystem type containing
244.Pa /tmp
245must be compiled into the kernel, and the filesystems containing
246.Pa /tmp
247and
248.Pa /usr/bin/ld
249must be listed in
250.Pa /etc/fstab
251before any filesystems which might be dynamically loaded.
252.It Fl u
253The
254.Fl u
255flag indicates that the status of an already mounted file
256system should be changed.
257Any of the options discussed above (the
258.Fl o
259option)
260may be changed;
261also a file system can be changed from read-only to read-write
262or vice versa.
263An attempt to change from read-write to read-only will fail if any
264files on the filesystem are currently open for writing unless the
265.Fl f
266flag is also specified.
267The set of options is determined by first extracting the options
268for the file system from the
269.Xr fstab 5
270table,
271then applying any options specified by the
272.Fl o
273argument,
274and finally applying the
275.Fl r
276or
277.Fl w
278option.
279.It Fl v
280Verbose mode.
281.It Fl w
282The file system object is to be read and write.
283.Pp
284The options specific to NFS filesystems are described in the
285.Xr mount_nfs 8
286manual page.
287.Sh DIAGNOSTICS
288Various, most of them are self-explanatory.
289.Pp
290.Dl XXXXX filesystem is not available
291.Pp
292The kernel doesn't support the respective filesystem type. Note that
293support for a particular filesystem might be provided either on a static
294(kernel compile-time), or dynamic basis (loaded as a kernel module by
295.Xr modload 8 ).
296Normally,
297.Nm
298or its subprocesses attempt to dynamically load a filesystem module if
299it hasn't been configured statically, using
300.Xr vfsload 3 .
301In this case, the above error message can also mean that you didn't
302have permission to load the module.
303.Sh FILES
304.Bl -tag -width /etc/fstab -compact
305.It Pa /etc/fstab
306file system table
307.El
308.Sh SEE ALSO
309.Xr mount 2 ,
310.Xr vfsload 3 ,
311.Xr fstab 5 ,
312.Xr mount_cd9660 8 ,
313.Xr mount_fdesc 8 ,
314.Xr mount_kernfs 8 ,
315.Xr mount_lfs 8 ,
316.Xr mount_mfs 8 ,
317.Xr mount_msdos 8 ,
318.Xr mount_nfs 8 ,
319.Xr mount_null 8 ,
320.Xr mount_portal 8 ,
321.Xr mount_procfs 8 ,
322.Xr mount_umap 8 ,
323.Xr mount_union 8 ,
324.Xr umount 8
325.Sh BUGS
326It is possible for a corrupted file system to cause a crash.
327.Sh HISTORY
328A
329.Nm
330command appeared in
331.At v1 .