To support NFS activities, several daemons are started when a system goes into run level 3 or multiuser mode. The mountd and nfsd daemons are run on systems that are NFS servers. The automatic startup of the server daemons depends on the existence of entries that are labeled with the NFS file-system type in /etc/dfs/sharetab. The lockd and statd daemons are run on NFS clients and servers to support NFS file locking.
This daemon handles the mount and unmount requests from the autofs service. The syntax of the command is as follows:
automountd [ -Tnv ] [ -D name=value ]
-T enables tracing.
-n disables browsing on all autofs node.
-v selects to log all status messages to the console.
-D name=value substitutes value for the automount map variable indicated by name.
This daemon supports record-locking operations on NFS files. The lockd daemon manages RPC connections between the client and the server for the Network Lock Manager (NLM) protocol. The daemon is normally started without any options. You can use three options with this command (see the lockd(1M) man page). These options can either be used from the command line or by editing the appropriate string to /etc/default/nfs. Changing /etc/default/nfs makes the change persist through system reboots. This feature is only available in the Solaris 9 release. The only way to make these changes permanent in other releases is to change /etc/init.d/nfs.client.
The LOCKD_GRACE_PERIOD=graceperiod parameter in /etc/default/nfs selects the number of seconds that the clients have to reclaim locks after a server reboot. During this time, the NFS server only processes reclaims of old locks. All other requests for service must wait until the grace period is over. This option affects the NFS server-side response, so it can be changed only on an NFS server. The default value for graceperiod is 45 seconds. Reducing this value means that NFS clients can resume operation more quickly after a server reboot. However, a reduction increases the possibility that a client might not be able to recover all its locks. This same behavior can be used on the command line by starting the daemon with the -g graceperiod option.
The LOCKD_RETRANSMIT_TIMEOUT=timeout parameter in /etc/default/nfs selects the number of seconds to wait before retransmitting a lock request to the remote server. This option affects the NFS client-side service. The default value for timeout is 15 seconds. Decreasing the timeout value can improve response time for NFS clients on a noisy network, but it can cause additional server load by increasing the frequency of lock requests. The same parameter can be used from the command line by starting the daemon with the -t timeout option.
The LOCKD_SERVERS=nthreads parameter in /etc/default/nfs specifies the maximum number of concurrent threads that the server handles per connection. Base the value for nthreads on the load that is expected on the NFS server. The default value is 20. Because each NFS client that uses TCP uses a single connection with the NFS server, each client can use a maximum of 20 concurrent threads on the server. All NFS clients that use UDP share a single connection with the NFS server. Under these conditions, you might have to increase the number of threads available for the UDP connection. A minimum calculation would be to allow two threads for each UDP client. However, this number is specific to the workload on the client, so two threads per client might not be sufficient. The disadvantage to using more threads is that when the threads are used, more memory is used on the NFS server. If the threads are never used, however, increasing nthreads has no effect. The same parameter can be used from the command line by starting the daemon with the nthreads option.
This is a remote procedure call (RPC) server that handles file-system mount requests from remote systems and provides access control. The mountd daemon checks /etc/dfs/sharetab to determine which file systems are available for remote mounting and which systems are allowed to do the remote mounting. You can use two options with this command (see the mountd(1M) man page): -v and -r.
The -v option runs the command in verbose mode. Each time an NFS server determines the access a client should get, a message is printed on the console. The information generated can be useful when trying to determine why a client cannot access a file system.
The -r option rejects all future mount requests from clients. This option does not affect clients that already have a file system mounted.
This daemon handles other client file-system requests. You can use several options with this command. See the nfsd(1M) man page for a complete listing. These options can either be used from the command line or by editing the appropriate string to /etc/default/nfs. Changing /etc/default/nfs makes the change persist through system reboots. This feature is only available in the Solaris 9 release. The only way to make these changes permanent in other releases is to change /etc/init.d/nfs.server.
The NFSD_LISTEN_BACKLOG=length parameter in /etc/default/nfs sets the connection queue length for the NFS/TCP over connection-oriented transports. The default value is 32 entries. The same selection can be made from the command line by starting nfsd with the -l option.
The NFSD_MAX_CONNECTIONS=#_conn parameter in /etc/default/nfs selects the maximum number of connections per connection-oriented transport. The default value for #_conn is unlimited. The same parameter can be used from the command line by starting the daemon with the -c #_conn option.
The NFSD_SERVER=nservers parameter in /etc/default/nfsselects the maximum number of concurrent requests that a server can handle. The default value for nservers is 1, but the startup scripts select 16. The same selection can be made from the command line by starting nfsd with the nservers option.
Unlike older versions of this daemon, nfsd does not spawn multiple copies to handle concurrent requests. Checking the process table with ps only shows one copy of the daemon running.
This daemon provides operational logging. NFS operations that are logged against a server are based on the configuration options that are defined in /etc/default/nfslogd. When NFS server logging is enabled, records of all RPC operations on a selected file system are written to a buffer file by the kernel. Then nfslogd post-processes these requests. The name service switch is used to help map UIDs to logins and IP addresses to host names. The number is recorded if no match can be found through the identified name services.
Mapping of file handles to path names is also handled by nfslogd. The daemon keeps track of these mappings in a file-handle-to-path mapping table. One mapping table exists for each tag identified in /etc/nfs/nfslogd. After post-processing, the records are written to ASCII log files.
This daemon works with lockd to provide crash and recovery functions for the lock manager. The statd daemon tracks the clients that hold locks on an NFS server. If a server crashes, on rebooting statd on the server contacts statd on the client. The client statd can then attempt to reclaim any locks on the server. The client statd also informs the server statd when a client has crashed so that the client's locks on the server can be cleared. You have no options to select with this daemon. For more information, see the statd(1M) man page.
In the Solaris 7 release, the way that statd tracks the clients has been improved. In all earlier Solaris releases, statd created files in /var/statmon/sm for each client by using the client's unqualified host name. This file naming caused problems if you had two clients in different domains that shared a hostname, or if clients were not resident in the same domain as the NFS server. Because the unqualified host name only lists the host name, without any domain or IP-address information, the older version of statd had no way to differentiate between these types of clients. To fix this problem, the Solaris 7 statd creates a symbolic link in /var/statmon/sm to the unqualified host name by using the IP address of the client. The new link resembles the following:
# ls -l /var/statmon/sm lrwxrwxrwx 1 daemon 11 Apr 29 16:32 ipv22.214.171.124.1 -> myhost lrwxrwxrwx 1 daemon 11 Apr 29 16:32 ipv6.fec0::56:a00:20ff:feb9:2734 -> v6host --w------- 1 daemon 11 Apr 29 16:32 myhost --w------- 1 daemon 11 Apr 29 16:32 v6host
In this example, the client host name is myhost and the clients' IP address is 126.96.36.199. If another host with the name myhost were mounting a file system, there would be two symbolic links to the host name.