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