rpc.nfsd(8)

โœจ rpc.nfsd โ€” the NFS server process, bestie edition โœจ

okay so this is the manual page for rpc.nfsd(8), from the System Manager's Manual, and we're gonna go through it together, no stress ๐Ÿ’–

๐ŸŒธ SYNOPSIS ๐ŸŒธ

/usr/sbin/rpc.nfsd [options] nproc

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So rpc.nfsd is the program that implements the user level part of the NFS service. The actual heavy lifting? That's the nfsd kernel module, bestie. The user space program is just the vibe-setter โ€” it tells the kernel service what sort of sockets to listen on, which NFS versions it should support, and how many kernel threads it should use. That's it, that's the whole job ๐Ÿซถ

And the rpc.mountd server? It's the ancillary service that handles all the mount requests coming in from NFS clients. The supporting cast, the best friend of the main character, if you will ๐Ÿ’…


โœจ OPTIONS โœจ

  • -d or --debug โ€” turns on logging of debugging messages. we love to see everything ๐Ÿ‘€
  • -H or --host hostname โ€” pick a specific hostname (or address) that NFS requests will be accepted on. by default, rpc.nfsd will accept NFS requests on all known network addresses. heads up though: lockd (which does the file locking services for NFS) may still accept requests on all known network addresses. that might change in future releases of the Linux Kernel, so stay tuned. you can use this option multiple times to listen on more than one interface ๐Ÿ’ซ
  • -S or --scope scope โ€” NFSv4.1 and later require the server to report a "scope", which the clients use to detect if two connections are to the same server. by default, Linux NFSD uses the host name as the scope.

and like, this is particularly important for high-availability configurations โ€” you have to make sure all potential server nodes report the same server scope, or it's giving chaos ๐Ÿ˜ญ

  • -p or --port port โ€” specify a different port to listen on for NFS requests. by default, rpc.nfsd will listen on port 2049.
  • -r or --rdma โ€” says that NFS requests on the standard RDMA port ("nfsrdma", port 20049) should be honored ๐Ÿ”ฅ
  • --rdma=port โ€” listen for RDMA requests on an alternate port. can be a number, or a name listed in /etc/services.
  • -N or --no-nfs-version vers โ€” use this to request that rpc.nfsd does not offer certain versions of NFS. the current version of rpc.nfsd can support major NFS versions 3, 4, and the minor versions 4.0, 4.1 and 4.2.
  • -s or --syslog โ€” by default, rpc.nfsd logs error messages (and debug messages, if enabled) to stderr. this option makes rpc.nfsd log these messages to syslog instead. but note: errors encountered during option processing will still be logged to stderr regardless of this option. no escaping that one ๐Ÿซ 
  • -t or --tcp โ€” tells the kernel nfs server to open and listen on a TCP socket. this is the default.
  • -T or --no-tcp โ€” tells the kernel nfs server not to open and listen on a TCP socket.
  • -u or --udp โ€” tells the kernel nfs server to open and listen on a UDP socket.
  • -U or --no-udp โ€” tells the kernel nfs server not to open and listen on a UDP socket. this is the default.
  • -V or --nfs-version vers โ€” use this to request that rpc.nfsd does offer certain versions of NFS. the current version of rpc.nfsd can support major NFS versions 3, 4, and the minor versions 4.0, 4.1 and 4.2.
  • -L or --lease-time seconds โ€” set the lease-time used for NFSv4. this is basically how often clients need to confirm their state with the server. valid range is from 10 to 3600 seconds โฐ
  • -G or --grace-time seconds โ€” set the grace-time used for NFSv4 and NLM (for NFSv2 and NFSv3). new file open requests (NFSv4) and new file locks (NLM) will not be allowed until after this time has passed โ€” it's giving the clients room to recover their state, periodt.
  • nproc โ€” specify the number of NFS server threads. by default, eight threads are started. but for optimum performance you should use several threads. the actual figure depends on the number of NFS clients and the work load they create, but a useful starting point is eight threads. you can check the effects of modifying that number with the nfsstat(8) program ๐Ÿ‘‘
IMPORTANT NOTE, bestie, listen up ๐Ÿ’€ โ€” if the NFS server is already running, then the options for specifying host, port, and protocol will be ignored. the number of processes given will be the only option considered, and the number of active nfsd processes will be increased or decreased to match this number. in particular, rpc.nfsd 0 will stop all threads and thus close any open connections. yes, really. zero means zero ๐Ÿ™ˆ

๐ŸŽ€ CONFIGURATION FILE ๐ŸŽ€

Many of the options you can set on the command line can also be controlled through values set in the [nfsd] section of the /etc/nfs.conf configuration file. the values recognized include:

  • threads โ€” the number of threads to start.
  • host โ€” a host name, or comma separated list of host names, that rpc.nfsd will listen on. use of the --host option replaces all host names listed here.
  • scope โ€” set the server scope.
  • grace-time โ€” the grace time, for both NFSv4 and NLM, in seconds.
  • lease-time โ€” the lease time for NFSv4, in seconds.
  • port โ€” set the port for TCP/UDP to bind to.
  • rdma โ€” enable RDMA port (with "on" or "yes" etc) on the standard port ("nfsrdma", port 20049).
  • rdma-port โ€” set an alternate RDMA port.
  • UDP โ€” enable (with "on" or "yes" etc) or disable ("off", "no") UDP support.
  • TCP โ€” enable or disable TCP support.
  • vers3
  • vers4 โ€” enable or disable all NFSv4 versions. all versions are normally enabled by default.
  • vers4.1
  • vers4.2 โ€” setting these to "off" or similar will disable the selected minor versions. setting to "on" will enable them. the default values are determined by the kernel, and usually minor versions default to being enabled once the implementation is sufficiently complete โœจ

๐Ÿ’œ NOTES ๐Ÿ’œ

If the program is built with TI-RPC support, it will enable any protocol and address family combinations that are marked visible in the netconfig database. iykyk ๐ŸŒˆ


๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

nfsd(7), rpc.mountd(8), exports(5), exportfs(8), nfs.conf(5), rpc.rquotad(8), nfsstat(8), netconfig(5).


๐ŸŒŸ AUTHOR ๐ŸŒŸ

Olaf Kirch, Bill Hawes, H. J. Lu, G. Allan Morris III, and a host of others. legends, all of them, fr fr ๐Ÿ’–


and that's the whole page, bestie!! this one's from the System Manager's Manual and it's dated 20 Feb 2014 โ€” rpc.nfsd(8), forever iconic, no cap ๐ŸŽ€โœจ๐Ÿ’…

๐Ÿ“ฆ where this page comes from