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.\" 4. 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. 15.\" 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 26.\" SUCH DAMAGE. 27.\" 28.\" @(#)mountd.8 8.4 (Berkeley) 4/28/95 29.\" $FreeBSD$ 30.\" 31.Dd October 20, 2007 32.Dt MOUNTD 8 33.Os 34.Sh NAME 35.Nm mountd 36.Nd service remote 37.Tn NFS 38mount requests 39.Sh SYNOPSIS 40.Nm 41.Op Fl 2delnr 42.Op Fl h Ar bindip 43.Op Fl p Ar port 44.Op Ar exportsfile ... 45.Sh DESCRIPTION 46The 47.Nm 48utility is the server for 49.Tn NFS 50mount requests from other client machines. 51It listens for service requests at the port indicated in the 52.Tn NFS 53server specification; see 54.%T "Network File System Protocol Specification" , 55RFC1094, Appendix A and 56.%T "NFS: Network File System Version 3 Protocol Specification" , 57Appendix I. 58.Pp 59The following options are available: 60.Bl -tag -width indent 61.It Fl 2 62Allow the administrator to force clients to use only the 63version 2 64.Tn NFS 65protocol to mount file systems from this server. 66.It Fl d 67Output debugging information. 68.Nm 69will not detach from the controlling terminal and will print 70debugging messages to stderr. 71.It Fl e 72Forces 73.Nm 74to try and start the experimental server that includes NFSv4 support in it. 75If this flag isn't specified, the experimental server will only be started 76if it is linked into the kernel and the regular one isn't. 77.br 78ie. The kernel is built with the following: 79.Bd -literal -offset indent -compact 80# options NFSSERVER 81options NFSD 82.Ed 83.It Fl h Ar bindip 84Specify specific IP addresses to bind to for TCP and UDP requests. 85This option may be specified multiple times. 86If no 87.Fl h 88option is specified, 89.Nm 90will bind to 91.Dv INADDR_ANY . 92Note that when specifying IP addresses with 93.Fl h , 94.Nm 95will automatically add 96.Li 127.0.0.1 97and if IPv6 is enabled, 98.Li ::1 99to the list. 100.It Fl l 101Cause all succeeded 102.Nm 103requests to be logged. 104.It Fl n 105Allow non-root mount requests to be served. 106This should only be specified if there are clients such as PC's, 107that require it. 108It will automatically clear the vfs.nfsrv.nfs_privport sysctl flag, which 109controls if the kernel will accept NFS requests from reserved ports only. 110.It Fl p Ar port 111Force 112.Nm 113to bind to the specified port, for both 114.Dv AF_INET 115and 116.Dv AF_INET6 117address families. 118This is typically done to ensure that the port which 119.Nm 120binds to is a known quantity which can be used in firewall rulesets. 121If 122.Nm 123cannot bind to this port, an appropriate error will be recorded in 124the system log, and the daemon will then exit. 125.It Fl r 126Allow mount RPCs requests for regular files to be served. 127Although this seems to violate the mount protocol specification, 128some diskless workstations do mount requests for 129their swapfiles and expect them to be regular files. 130Since a regular file cannot be specified in 131.Pa /etc/exports , 132the entire file system in which the swapfiles resides 133will have to be exported with the 134.Fl alldirs 135flag. 136.It Ar exportsfile 137Specify an alternate location 138for the exports file. 139More than one exports file can be specified. 140.El 141.Pp 142When 143.Nm 144is started, 145it loads the export host addresses and options into the kernel 146using the 147.Xr mount 2 148system call. 149After changing the exports file, 150a hangup signal should be sent to the 151.Nm 152daemon 153to get it to reload the export information. 154After sending the SIGHUP 155(kill \-s HUP `cat /var/run/mountd.pid`), 156check the syslog output to see if 157.Nm 158logged any parsing 159errors in the exports file. 160.Pp 161If 162.Nm 163detects that the running kernel does not include 164.Tn NFS 165support, it will attempt to load a loadable kernel module containing 166.Tn NFS 167code, using 168.Xr kldload 2 . 169If this fails, or no 170.Tn NFS 171KLD was available, 172.Nm 173exits with an error. 174.Sh FILES 175.Bl -tag -width /var/run/mountd.pid -compact 176.It Pa /etc/exports 177the list of exported file systems 178.It Pa /var/run/mountd.pid 179the pid of the currently running mountd 180.It Pa /var/db/mountdtab 181the current list of remote mounted file systems 182.El 183.Sh SEE ALSO 184.Xr nfsstat 1 , 185.Xr kldload 2 , 186.Xr nfsv4 4 , 187.Xr exports 5 , 188.Xr nfsd 8 , 189.Xr rpcbind 8 , 190.Xr showmount 8 191.Sh HISTORY 192The 193.Nm 194utility first appeared in 195.Bx 4.4 . 196