1 .\" Copyright (c) 1989, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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. 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.
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
28 .\" @(#)nfsd.8 8.4 (Berkeley) 3/29/95
42 .Op Fl n Ar num_servers
44 .Op Fl p Ar pnfs_setup
45 .Op Fl m Ar mirror_level
46 .Op Fl V Ar virtual_hostname
47 .Op Fl Fl maxthreads Ar max_threads
48 .Op Fl Fl minthreads Ar min_threads
52 utility runs on a server machine to service
54 requests from client machines.
57 must be running for a machine to operate as a server.
59 Unless otherwise specified, eight servers per CPU for
61 transport are started.
63 The following options are available:
70 without creating any servers.
71 This option can be used along with the
75 options to re-register NFS if the rpcbind server is restarted.
81 without creating any servers.
82 .It Fl V Ar virtual_hostname
83 Specifies a hostname to be used as a principal name, instead of
86 Specifies how many servers to create. This option is equivalent to specifying
90 with their respective arguments to
92 .It Fl Fl maxthreads Ar threads
93 Specifies the maximum servers that will be kept around to service requests.
94 .It Fl Fl minthreads Ar threads
95 Specifies the minimum servers that will be kept around to service requests.
97 Specifies which IP address or hostname to bind to on the local host.
98 This option is recommended when a host has multiple interfaces.
101 options may be specified.
103 Specifies that nfsd should bind to the wildcard IP address.
104 This is the default if no
107 It may also be specified in addition to any
110 Note that NFS/UDP does not operate properly when
111 bound to the wildcard IP address whether you use -a or do not use -h.
112 .It Fl p Ar pnfs_setup
113 Enables pNFS support in the server and specifies the information that the
114 daemon needs to start it.
115 This option can only be used on one server and specifies that this server
116 will be the MetaData Server (MDS) for the pNFS service.
117 This can only be done if there is at least one FreeBSD system configured
118 as a Data Server (DS) for it to use.
122 string is a set of fields separated by ',' characters:
124 Each of these fields specifies one DS.
125 It consists of a server hostname, followed by a ':'
126 and the directory path where the DS's data storage file system is mounted on
128 This can optionally be followed by a '#' and the mds_path, which is the
129 directory path for an exported file system on this MDS.
130 If this is specified, it means that this DS is to be used to store data
131 files for this mds_path file system only.
132 If this optional component does not exist, the DS will be used to store data
133 files for all exported MDS file systems.
134 The DS storage file systems must be mounted on this system before the
136 is started with this option specified.
140 nfsv4-data0:/data0,nfsv4-data1:/data1
142 would specify two DS servers called nfsv4-data0 and nfsv4-data1 that comprise
143 the data storage component of the pNFS service.
144 These two DSs would be used to store data files for all exported file systems
150 are where the data storage servers exported
151 storage directories are mounted on this system (which will act as the MDS).
153 Whereas, for the example:
155 nfsv4-data0:/data0#/export1,nfsv4-data1:/data1#/export2
157 would specify two DSs as above, however nfsv4-data0 will be used to store
160 and nfsv4-data1 will be used to store data files for
164 When using IPv6 addresses for DSs
165 be wary of using link local addresses.
166 The IPv6 address for the DS is sent to the client and there is no scope
168 As such, a link local address may not work for a pNFS client to DS
172 will only use a link local address if it is the only address returned by
175 .It Fl m Ar mirror_level
176 This option is only meaningful when used with the
181 which defines how many of the DSs will
182 have a copy of a file's data storage file.
183 The default of one implies no mirroring of data storage files on the DSs.
186 would normally be set to 2 to enable mirroring, but
187 can be as high as NFSDEV_MAXMIRRORS.
188 There must be at least
190 DSs for each exported file system on the MDS, as specified in the
193 This implies that, for the above example using "#/export1" and "#/export2",
194 mirroring cannot be done.
195 There would need to be two DS entries for each of "#/export1" and "#/export2"
196 in order to support a
200 If mirroring is enabled, the server must use the Flexible File
202 If mirroring is not enabled, the server will use the File layout
203 by default, but this default can be changed to the Flexible File layout if the
205 vfs.nfsd.default_flexfile
216 Ignored; included for backward compatibility.
220 .Dq Li "nfsd -u -t -n 6"
225 transports using six daemons.
227 A server should run enough daemons to handle
228 the maximum level of concurrency from its clients,
229 typically four to six.
233 utility listens for service requests at the port indicated in the
235 server specification; see
236 .%T "Network File System Protocol Specification" ,
238 .%T "NFS: Network File System Version 3 Protocol Specification" ,
240 .%T "Network File System (NFS) Version 4 Protocol" ,
242 .%T "Network File System (NFS) Version 4 Minor Version 1 Protocol" ,
249 is not loaded in the running kernel, it will attempt
250 to load a loadable kernel module containing
258 will exit with an error.
262 is to be run on a host with multiple interfaces or interface aliases, use
265 option is recommended.
266 If you do not use the option NFS may not respond to
267 UDP packets from the same IP address they were sent to.
269 is also recommended when securing NFS exports on a firewalling machine such
270 that the NFS sockets can only be accessed by the inside interface.
274 would then be used to block nfs-related packets that come in on the outside
277 If the server has stopped servicing clients and has generated a console message
279 .Dq Li "nfsd server cache flooded..." ,
280 the value for vfs.nfsd.tcphighwater needs to be increased.
281 This should allow the server to again handle requests without a reboot.
282 Also, you may want to consider decreasing the value for
283 vfs.nfsd.tcpcachetimeo to several minutes (in seconds) instead of 12 hours
286 Unfortunately making vfs.nfsd.tcphighwater too large can result in the mbuf
287 limit being reached, as indicated by a console message
289 .Dq Li "kern.ipc.nmbufs limit reached" .
290 If you cannot find values of the above
292 values that work, you can disable the DRC cache for TCP by setting
293 vfs.nfsd.cachetcp to 0.
297 utility has to be terminated with
299 and cannot be killed with
305 utility needs to ignore these signals in order to stay alive as long
306 as possible during a shutdown, otherwise loopback mounts will
307 not be able to unmount.
311 .Dq Li "kill -USR1 <PID of master nfsd>"
322 .Xr stablerestart 5 ,
333 utility first appeared in
340 is not running, it will service AUTH_SYS requests only. To fix the problem
343 and then restart it, after the
347 If mirroring is enabled via the
349 option and there are Linux clients doing NFSv4.1 mounts, those clients
350 need to be patched to support the
353 the Flexible File layout or the
355 vfs.nfsd.flexlinuxhack
356 must be set to one on the MDS as a workaround.