Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
NFS Services Administrator's Guide: HP-UX 11i version 2 > Chapter 2 Configuring and Administering NFS Services

NFS Client and Server Transport Connections

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

NFS runs over both UDP and TCP transport protocols. The default transport protocol is TCP. Using the TCP protocol increases dependability on wide-area networks. Packets are successfully delivered more consistently. TCP provides congestion control and error recovery. NFS over TCP works with NFS version 2 and version 3.

NFS Client Transport Connections

An NFS client has a maximum number of connections for each server. By default the maximum number of connections is one. The total maximum number of connections on the client is the number of NFS servers multiplied by the maximum number of connections allowed for each server.

For example, if the maximum number of connections allowed for client1 is two, and if the network environment allowed client1 access to five servers, the total number of connections allowed for client1 is 10: two on each server. An NFS client remains connected to the NFS server until the client becomes inactive: idle or disconnected by the client. By default, idle time is 5 minutes. This means that there is no outbound request for more than 5 minutes.

Support of 32K Transfer

NFS supports 32K transfer sizes across both TCP and UDP transport. By default, NFS transfers 8K sizes. To specify 32K transfer sizes, set the mount option for read and write size to 32K.

mount -F nfs -o rsize=32768, w=32768

Specifying TCP or UDP Connections

Using the mount command from the client with no protocol specified, NFS will first try to perform the mount using TCP. If that fails, then it will try to mount the file system using UDP.

You can tell NFS to establish ONLY a TCP connection using the following command:

mount -o proto=tcp

If TCP is not available on the server, the mount fails.You can tell NFS to use ONLY UDP by using the following command:

mount -o proto=udp

If UDP is not available on the server, the mount fails.

NFS Server Transport Connections

On the NFS server, to ensure that a request for a TCP connection will be successful, the service must be advertised in the /etc/services name database file. This database advertises the availability of TCP on the server through port 2049. The entry appears in the /etc/services name database file. There is also an entry for UDP. They are as follows:

nfsd 2049/tcp #NFS remote file system
nfsd 2049/udp   #NFS remote file system

NOTE: Note that these entries are automatically added to the /etc/services file since this service must be advertised in order to start the server daemon (nfsd) correctly. Be sure that the local map resolution points to the local file. If NIS maps are used, be sure that the services file used by NIS also contains this additional entry for TCP.

Changes to the NFS Server Daemon

The NFS server daemons (nfsd) handle client file system requests. For NFS over UDP transport, the default number of nfsd processes is defined by the NUM_NFSD variable in the /etc/rc.config.d/nfsconf file. This default number of nfsd processes over UDP is a suggested number for the HP-UX kernel. At the system boot time, the kernel reads this default number and it automatically rounds up the number of NFS server daemons (nfsds) to be a multiple of the number of active CPUs in the system. For NFS over TCP transport, only one additional nfsd daemon is started to service TCP requests.

NOTE: For the HP-UX release 11.0, the default number of nfsd processes running on an NFS server is 8 nfsd processes over UDP transport. This default number is defined by the NUM_NFSD variable in the /etc/rc.config.d/nfsconf file.

On the HP-UX release 11.11, the default number of nfsd processes running on an NFS server is 16 nfsd processes over UDP transport ( NUM_NFSD variable in the /etc/rc.config.d/nfsconf file), plus one nfsd process over TCP transport.

You can start a daemon for either transport type or both. Here is a list of ways you can specify the NFS server daemon:

  • You can start a NFS daemon that will run over all the supported transports, including UDP and TCP. Type: /usr/sbin/nfsd -a. For HP-UX release 11.0, you must set the NFS_TCP environment variable to 1 in the /etc/rc.config.d/nfsconf configuration file in order to support the TCP transport.

  • You can start the NFS daemon over either protocol you choose: TCP or UDP. To specify one or the other, type: /usr/sbin/nfsd -p <transport_protocol> where <transport protocol> is either TCP or UDP.

  • You can start the daemon for the transport protocol that the device specifies. Type: /usr/sbin/nfsd -t <device_name>, where <device_name> is the name of the device that specifies the transport protocol you want to use.

NOTE: You can use the /usr/sbin/nfsd <num_nfsd> command to start more NFS server daemons (nfsds). The value of the <num_nfsd> option is the suggested number of file system request daemons that will start. The actual number of daemons started is one daemon to support kernel TCP threads, plus a number of UDP daemons. The number of UDP daemons started is the value of num_nfsd rounded up to a multiple of the number of active CPUs in the system. There must be no nfsd process running on the NFS server when issuing the /usr/sbin/nfsd <num_nfsd> command.

For more information, type man 1M nfsd at the HP-UX prompt.

Severing the Connection

The server connection is terminated by nfsd when one of the following occurs:

  1. When the connection has been idle for more than six minutes. Idle is defined as no outbound requests.

  2. When the maximum number of connections is reached. If a request for a connection comes in when this is the case, the least recently used connection will be broken. The request for a connection is then established.

  3. When the NFS daemon (nfsd) receives a disconnecting event or unrecoverable error. For example, when a client crashes.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2004 Hewlett-Packard Development Company, L.P.