xref: /freebsd/usr.sbin/mountd/mountd.8 (revision 5521ff5a4d1929056e7ffc982fac3341ca54df7c)
1.\" Copyright (c) 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.\"     @(#)mountd.8	8.4 (Berkeley) 4/28/95
33.\" $FreeBSD$
34.\"
35.Dd April 28, 1995
36.Dt MOUNTD 8
37.Os
38.Sh NAME
39.Nm mountd
40.Nd service remote
41.Tn NFS
42mount requests
43.Sh SYNOPSIS
44.Nm
45.Op Fl 2dlnr
46.Op Ar exportsfile
47.Sh DESCRIPTION
48.Nm Mountd
49is the server for
50.Tn NFS
51mount requests from other client machines.
52It listens for service requests at the port indicated in the
53.Tn NFS
54server specification; see
55.%T "Network File System Protocol Specification" ,
56RFC1094, Appendix A and
57.%T "NFS: Network File System Version 3 Protocol Specification" ,
58Appendix I.
59.Pp
60The following options are available:
61.Bl -tag -width indent
62.It Fl 2
63Allow the administrator to force clients to use only the
64version 2
65.Tn NFS
66protocol to mount filesystems from this server.
67.It Fl d
68Output debugging information.
69.It Fl l
70Cause all succeeded
71.Nm
72requests to be logged.
73.It Fl n
74Allow non-root mount requests to be served.
75This should only be specified if there are clients such as PC's,
76that require it.
77It will automatically clear the vfs.nfs.nfs_privport sysctl flag, which
78controls if the kernel will accept NFS requests from reserved ports only.
79.It Fl r
80Allow mount RPCs requests for regular files to be served.
81Although this seems to violate the mount protocol specification,
82some diskless workstations do mount requests for
83their swapfiles and expect them to be regular files.
84Since a regular file cannot be specified in
85.Pa /etc/exports ,
86the entire file system in which the swapfiles resides
87will have to be exported with the
88.Fl alldirs
89flag.
90.It Ar exportsfile
91Specify an alternate location
92for the exports file.
93.El
94.Pp
95When
96.Nm
97is started,
98it loads the export host addresses and options into the kernel
99using the
100.Xr mount 2
101system call.
102After changing the exports file,
103a hangup signal should be sent to the
104.Nm
105daemon
106to get it to reload the export information.
107After sending the SIGHUP
108(kill \-s HUP `cat /var/run/mountd.pid`),
109check the syslog output to see if
110.Nm
111logged any parsing
112errors in the exports file.
113.Pp
114If
115.Nm
116detects that the running kernel does not include
117.Tn NFS
118support, it will attempt to load a loadable kernel module containing
119.Tn NFS
120code, using
121.Xr kldload 8
122by way of
123.Xr vfsload 3 .
124If this fails, or no
125.Tn NFS
126KLD was available,
127.Nm
128exits with an error.
129.Sh FILES
130.Bl -tag -width /var/run/mountd.pid -compact
131.It Pa /etc/exports
132the list of exported filesystems
133.It Pa /var/run/mountd.pid
134the pid of the currently running mountd
135.It Pa /var/db/mountdtab
136the current list of remote mounted filesystems
137.El
138.Sh SEE ALSO
139.Xr nfsstat 1 ,
140.Xr exports 5 ,
141.Xr kldload 8 ,
142.Xr nfsd 8 ,
143.Xr rpcbind 8 ,
144.Xr showmount 8
145.Sh HISTORY
146The
147.Nm
148utility first appeared in
149.Bx 4.4 .
150