nfsd Daemon

Purpose

Services client requests for file system operations.

Syntax

/usr/sbin/nfsd [ -a | -p { tcp | udp } ] [ -c max_connections ] [ -gp on | off ] [ -gpx count ] [ -gpbypass ] [ -w max_write_size ] [ -r max_read_size ] [ -root directory ] [ -public directory ] nservers

/usr/sbin/nfsd -getnodes

/usr/sbin/nfsd -getreplicas

Description

The nfsd daemon runs on a server and handles client requests for file system operations.

Each daemon handles one request at a time. Assign the maximum number of threads based on the load you expect the server to handle.

The nfsd daemon is started and stopped with the following System Resource Controller (SRC) commands:

startsrc -s nfsd
stopsrc -s nfsd

To change the number of daemons started with the SRC commands, use the chnfs command. To change the parameters of an SRC controlled daemon, use the chssys command.

Note: If the number of nfsd daemons is not sufficient to serve the client, a nonidempotent operation error is returned to the client. For example, if the client removes a directory, an ENOENT error is returned even though the directory on the server is removed.

Flags

Item Description
-a Specifies UDP and TCP transport will be serviced.
-c max_connections Specifies the maximum number of TCP connections allowed at the NFS server.
-gp on|off Controls the NFSv4 Grace Period enablement. The possible values are on or off. If no -gp option is specified, the grace period is disabled by default.
-gpbypass Controls the NFSv4 Grace Period bypass. When this option is specified, the grace period will be bypassed regardless of how the -gp option is specified.
-gpx count Controls the NFSv4 Grace Period automatic extension. The count parameter specifies the total number of automatic extensions allowed for the grace period. If no -gpx option is specified, the number of allowed automatic extensions defaults to 1. A single extension cannot extend the grace period for more than the length of the NFSv4 lease period. The NFSv4 subsystem uses runtime metrics (such as the time of the last successful NFSv4 reclaim operation) to detect reclamation of the state in progress, and extends the grace period for a length of time up to the duration of the given number of iterations.
nservers Specifies the maximum number of concurrent requests that the NFS server can handle. This concurrency is achieved by dynamic management of threads within the NFS server, up to the maximum. The default maximum is 3891. The chnfs, chssys, or nfso command is used to change the maximum. Changing the maximum setting from the default is not recommended as this may limit server performance.
-p tcp or -p udp Transports both UDP and TCP to the NFS clients (default). You can only specify UDP or TCP. For example, if -p tcp is used, the NFS server only accepts NFS client requests using the TCP protocol.
-r max_read_size Specifies for NFS Version 3, the maximum size allowed for file read requests. The default and maximum allowed is 64K.
-w max_write_size Specifies for NFS Version 3, the maximum size allowed for file write requests. The default and maximum allowed is 64K.
-root directory Specifies the directory which should be the root node the NFS version 4 exported filesystem. By default, the root node is /. If the root node is set to something other than /, use chnfs -r to reset the node to /. This flag may be used while nfsd is running to change the root node, but only if no filesystems are currently exported. This flag might be removed in a future release. Use chnfs -r instead.
-public directory Specifies the directory which should be the public node of the NFS version 4 exported filesystem. By default, the public node is the same as the root node. This flag may be use while nfsd is running to change the public node. The public node must be a descendant of the root node. This flag might be removed in a future release. Use chnfs -p instead.
-getnodes Prints the current root and public nodes for the NFS version 4 server. This option will not cause the NFS server daemon to start.
-getreplicas Prints the current replication enablement mode. If replicas have been specified for the nfsroot, they will be displayed.

Examples

  1. To start nfsd daemons using an src command, enter:
    startsrc -s nfsd
    In this example, the startsrc -s nfsd entry starts the number of daemons specified in the script.
  2. To change the number of daemons running on your system, enter:
    chssys -s nfsd -a 6
    In this example, the chssys command changes the number of nfsd daemons running on your system to 6.