| 1 |
.\" |
| 2 |
.\" nfsd(8) |
| 3 |
.\" |
| 4 |
.\" Copyright (C) 1999 Olaf Kirch <[email protected]> |
| 5 |
.TH rpc.nfsd 8 "20 Feb 2014" |
| 6 |
.SH NAME |
| 7 |
rpc.nfsd \- NFS server process |
| 8 |
.SH SYNOPSIS |
| 9 |
.BI "/usr/sbin/rpc.nfsd [" options "]" " "nproc |
| 10 |
.SH DESCRIPTION |
| 11 |
The |
| 12 |
.B rpc.nfsd |
| 13 |
program implements the user level part of the NFS service. The |
| 14 |
main functionality is handled by the |
| 15 |
.B nfsd |
| 16 |
kernel module. The user space program merely specifies what sort of sockets |
| 17 |
the kernel service should listen on, what NFS versions it should support, and |
| 18 |
how many kernel threads it should use. |
| 19 |
.P |
| 20 |
The |
| 21 |
.B rpc.mountd |
| 22 |
server provides an ancillary service needed to satisfy mount requests |
| 23 |
by NFS clients. |
| 24 |
.SH OPTIONS |
| 25 |
.TP |
| 26 |
.B \-d " or " \-\-debug |
| 27 |
enable logging of debugging messages |
| 28 |
.TP |
| 29 |
.B \-H " or " \-\-host hostname |
| 30 |
specify a particular hostname (or address) that NFS requests will |
| 31 |
be accepted on. By default, |
| 32 |
.B rpc.nfsd |
| 33 |
will accept NFS requests on all known network addresses. |
| 34 |
Note that |
| 35 |
.B lockd |
| 36 |
(which performs file locking services for NFS) may still accept |
| 37 |
request on all known network addresses. This may change in future |
| 38 |
releases of the Linux Kernel. This option can be used multiple times |
| 39 |
to listen to more than one interface. |
| 40 |
.TP |
| 41 |
.B \-S " or " \-\-scope scope |
| 42 |
NFSv4.1 and later require the server to report a "scope" which is used |
| 43 |
by the clients to detect if two connections are to the same server. |
| 44 |
By default Linux NFSD uses the host name as the scope. |
| 45 |
.sp |
| 46 |
It is particularly important for high-availability configurations to ensure |
| 47 |
that all potential server nodes report the same server scope. |
| 48 |
.TP |
| 49 |
.B \-p " or " \-\-port port |
| 50 |
specify a different port to listen on for NFS requests. By default, |
| 51 |
.B rpc.nfsd |
| 52 |
will listen on port 2049. |
| 53 |
.TP |
| 54 |
.B \-r " or " \-\-rdma |
| 55 |
specify that NFS requests on the standard RDMA port ("nfsrdma", port |
| 56 |
20049) should be honored. |
| 57 |
.TP |
| 58 |
.BI \-\-rdma= port |
| 59 |
Listen for RDMA requests on an alternate port - may be a number or a |
| 60 |
name listed in |
| 61 |
.BR /etc/services . |
| 62 |
.TP |
| 63 |
.B \-N " or " \-\-no-nfs-version vers |
| 64 |
This option can be used to request that |
| 65 |
.B rpc.nfsd |
| 66 |
does not offer certain versions of NFS. The current version of |
| 67 |
.B rpc.nfsd |
| 68 |
can support major NFS versions 3,4 and the minor versions 4.0, 4.1 and 4.2. |
| 69 |
.TP |
| 70 |
.B \-s " or " \-\-syslog |
| 71 |
By default, |
| 72 |
.B rpc.nfsd |
| 73 |
logs error messages (and debug messages, if enabled) to stderr. This option makes |
| 74 |
.B rpc.nfsd |
| 75 |
log these messages to syslog instead. Note that errors encountered during |
| 76 |
option processing will still be logged to stderr regardless of this option. |
| 77 |
.TP |
| 78 |
.B \-t " or " \-\-tcp |
| 79 |
Instruct the kernel nfs server to open and listen on a TCP socket. This is the default. |
| 80 |
.TP |
| 81 |
.B \-T " or " \-\-no-tcp |
| 82 |
Instruct the kernel nfs server not to open and listen on a TCP socket. |
| 83 |
.TP |
| 84 |
.B \-u " or " \-\-udp |
| 85 |
Instruct the kernel nfs server to open and listen on a UDP socket. |
| 86 |
.TP |
| 87 |
.B \-U " or " \-\-no-udp |
| 88 |
Instruct the kernel nfs server not to open and listen on a UDP socket. This is the default. |
| 89 |
.TP |
| 90 |
.B \-V " or " \-\-nfs-version vers |
| 91 |
This option can be used to request that |
| 92 |
.B rpc.nfsd |
| 93 |
offer certain versions of NFS. The current version of |
| 94 |
.B rpc.nfsd |
| 95 |
can support major NFS versions 3,4 and the minor versions 4.0, 4.1 and 4.2. |
| 96 |
.TP |
| 97 |
.B \-L " or " \-\-lease-time seconds |
| 98 |
Set the lease-time used for NFSv4. This corresponds to how often |
| 99 |
clients need to confirm their state with the server. Valid range is |
| 100 |
from 10 to 3600 seconds. |
| 101 |
.TP |
| 102 |
.B \-G " or " \-\-grace-time seconds |
| 103 |
Set the grace-time used for NFSv4 and NLM (for NFSv2 and NFSv3). |
| 104 |
New file open requests (NFSv4) and new file locks (NLM) will not be |
| 105 |
allowed until after this time has passed to allow clients to recover state. |
| 106 |
.TP |
| 107 |
.I nproc |
| 108 |
specify the number of NFS server threads. By default, eight |
| 109 |
threads are started. However, for optimum performance several threads |
| 110 |
should be used. The actual figure depends on the number of and the work |
| 111 |
load created by the NFS clients, but a useful starting point is |
| 112 |
eight threads. Effects of modifying that number can be checked using |
| 113 |
the |
| 114 |
.BR nfsstat (8) |
| 115 |
program. |
| 116 |
.P |
| 117 |
Note that if the NFS server is already running, then the options for |
| 118 |
specifying host, port, and protocol will be ignored. The number of |
| 119 |
processes given will be the only option considered, and the number of |
| 120 |
active |
| 121 |
.B nfsd |
| 122 |
processes will be increased or decreased to match this number. |
| 123 |
In particular |
| 124 |
.B rpc.nfsd 0 |
| 125 |
will stop all threads and thus close any open connections. |
| 126 |
|
| 127 |
.SH CONFIGURATION FILE |
| 128 |
Many of the options that can be set on the command line can also be |
| 129 |
controlled through values set in the |
| 130 |
.B [nfsd] |
| 131 |
section of the |
| 132 |
.I /etc/nfs.conf |
| 133 |
configuration file. Values recognized include: |
| 134 |
.TP |
| 135 |
.B threads |
| 136 |
The number of threads to start. |
| 137 |
.TP |
| 138 |
.B host |
| 139 |
A host name, or comma separated list of host names, that |
| 140 |
.I rpc.nfsd |
| 141 |
will listen on. Use of the |
| 142 |
.B --host |
| 143 |
option replaces all host names listed here. |
| 144 |
.TP |
| 145 |
.B scope |
| 146 |
Set the server scope. |
| 147 |
.TP |
| 148 |
.B grace-time |
| 149 |
The grace time, for both NFSv4 and NLM, in seconds. |
| 150 |
.TP |
| 151 |
.B lease-time |
| 152 |
The lease time for NFSv4, in seconds. |
| 153 |
.TP |
| 154 |
.B port |
| 155 |
Set the port for TCP/UDP to bind to. |
| 156 |
.TP |
| 157 |
.B rdma |
| 158 |
Enable RDMA port (with "on" or "yes" etc) on the standard port |
| 159 |
("nfsrdma", port 20049). |
| 160 |
.TP |
| 161 |
.B rdma-port |
| 162 |
Set an alternate RDMA port. |
| 163 |
.TP |
| 164 |
.B UDP |
| 165 |
Enable (with "on" or "yes" etc) or disable ("off", "no") UDP support. |
| 166 |
.TP |
| 167 |
.B TCP |
| 168 |
Enable or disable TCP support. |
| 169 |
.TP |
| 170 |
.B vers3 |
| 171 |
.TP |
| 172 |
.B vers4 |
| 173 |
Enable or disable |
| 174 |
.B all |
| 175 |
NFSv4 versions. All versions are normally enabled |
| 176 |
by default. |
| 177 |
.TP |
| 178 |
.B vers4.1 |
| 179 |
.TP |
| 180 |
.B vers4.2 |
| 181 |
Setting these to "off" or similar will disable the selected minor |
| 182 |
versions. Setting to "on" will enable them. The default values |
| 183 |
are determined by the kernel, and usually minor versions default to |
| 184 |
being enabled once the implementation is sufficiently complete. |
| 185 |
|
| 186 |
.SH NOTES |
| 187 |
If the program is built with TI-RPC support, it will enable any protocol and |
| 188 |
address family combinations that are marked visible in the |
| 189 |
.B netconfig |
| 190 |
database. |
| 191 |
|
| 192 |
.SH SEE ALSO |
| 193 |
.BR nfsd (7), |
| 194 |
.BR rpc.mountd (8), |
| 195 |
.BR exports (5), |
| 196 |
.BR exportfs (8), |
| 197 |
.BR nfs.conf (5), |
| 198 |
.BR rpc.rquotad (8), |
| 199 |
.BR nfsstat (8), |
| 200 |
.BR netconfig(5). |
| 201 |
.SH AUTHOR |
| 202 |
Olaf Kirch, Bill Hawes, H. J. Lu, G. Allan Morris III, |
| 203 |
and a host of others. |