xref: /freebsd/usr.sbin/mountd/mountd.8 (revision df7f5d4de4592a8948a25ce01e5bddfbb7ce39dc)
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.\"	$Id: mountd.8,v 1.7 1997/02/22 14:33:02 peter Exp $
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 /sbin/mountd
45.Op Fl nr
46.Op Ar exportsfile
47.Sh DESCRIPTION
48.Xr Mountd
49is the server for
50.Tn NFS
51mount requests from other client machines.
52.Xr Mountd
53listens for service requests at the port indicated in the
54.Tn NFS
55server specification; see
56.%T "Network File System Protocol Specification" ,
57RFC1094, Appendix A and
58.%T "NFS: Network File System Version 3 Protocol Specification" ,
59Appendix I.
60.Pp
61Options and operands available for
62.Nm mountd :
63.Bl -tag -width Ds
64.It Fl n
65The
66.Fl n
67option allows non-root mount requests to be served.
68This should only be specified if there are clients such as PC's,
69that require it.
70.It Fl r
71The
72.Fl r
73option allows mount RPCs requests for regular files to be served.
74Although this seems to violate the mount protocol specification,
75some diskless workstations do mount requests for
76their swapfiles and expect them to be regular files.
77Since a regular file cannot be specified in
78.Pa /etc/exports ,
79the entire file system in which the swapfiles resides
80will have to be exported with the
81.Fl alldirs
82flag.
83.It Ar exportsfile
84The
85.Ar exportsfile
86argument specifies an alternate location
87for the exports file.
88.El
89.Pp
90When mountd is started,
91it loads the export host addresses and options into the kernel
92using the mount(2) system call.
93After changing the exports file,
94a hangup signal should be sent to the mountd daemon
95to get it to reload the export information.
96After sending the SIGHUP
97(kill \-s HUP `cat /var/run/mountd.pid`),
98check the syslog output to see if mountd logged any parsing
99errors in the exports file.
100.Pp
101If
102.Nm mountd
103detects that the running kernel does not include
104.Tn NFS
105support, it will attempt to load a loadable kernel module containing
106.Tn NFS
107code, using
108.Xr modload 8
109by way of
110.Xr vfsload 3 .
111If this fails, or no
112.Tn NFS
113LKM was available,
114.Nm mountd
115exits with an error.
116.Sh FILES
117.Bl -tag -width /var/run/mountd.pid -compact
118.It Pa /etc/exports
119the list of exported filesystems
120.It Pa /var/run/mountd.pid
121the pid of the currently running mountd
122.It Pa /var/db/mountdtab
123the current list of remote mounted filesystems
124.El
125.Sh SEE ALSO
126.Xr nfsstat 1 ,
127.Xr exports 5 ,
128.Xr modload 8 ,
129.Xr nfsd 8 ,
130.Xr portmap 8 ,
131.Xr showmount 8
132.Sh HISTORY
133The
134.Nm mountd
135utility first appeared in
136.Bx 4.4 .
137