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