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