NFS Client Configuration Options


Now let's examine the NFS mount options you can use on the cluster nodes.

tcp

The Linux NFS client support for TCP helps to improve NFS performance when network load would otherwise force an NFS client using UDP to resend its network packets. Because UDP performance is better when network load is light, and because NFS is supposed to be a connectionless protocol, it is tempting to use UDP, but TCP is more efficient when you need it most—when the system is under heavy load. To specify tcp on the NFS client, use mount option tcp.

vers

To make sure you are using NFS version 3 and not version 2, you should also specify this in your mount options on the NFS clients. This is mount option vers=3.

hard

To continue to retry the NFS operation and cause the system to not return an error to the user application performing the I/O, use mount option hard.

fg

To prevent the system from booting when it cannot mount the filesystem, use mount option fg.

image from book
NFS DIRECT I/O

The kernel option that was introduced in kernel version 2.4.22, called CONFIG_NFS_DIRECTIO, gives the ability to read and write directly to the NFS server to applications that use the O_DIRECT open() flag. The NFS client, in other words, does not cache any data. Using this kernel option is useful in cases where applications implement their own cache coherency methods that would conflict with the normal NFS client's caching techniques, or when large data files (such as streaming audio files) would not benefit from the use of an NFS client's cache.

image from book

Putting it all Together

The NFS mount options just described can be used in an /etc/fstab entry that looks like this:

     nasserver:/clusterdata    /clusterdata   nfs rw, hard, nointr, tcp, vers=3, rsize=32k, wsize=32k, fg 0 0 

This single line says to mount the filesystem called /clusterdata from the NAS server host named nasserver on the mount point called /clusterdata. The options that follow on this line specify: the type of filesystem is NFS (nfs), the type of access to the data is both read and write access (rw), the cluster node should retry failed NFS operations indefinitely (hard), the NFS operations cannot be interrupted (nointr), all NFS calls should use the TCP protocol instead of UDP (tcp), NFS version 3 should always be used (vers=3), the read (rsize) and write (wsize) size of NFS operations are 32K to improve performance, the system will not boot when the filesystem cannot be mounted (fg), and dump program does not need to back up the filesystem (0) and the fsck[25] program does not need to check the file system at boot time (0).

[25]A filesystem sanity check can be performed by the fsck program on all locally attached storage at system boot time



The Linux Enterprise Cluster. Build a Highly Available Cluster with Commodity Hardware and Free Software
Linux Enterprise Cluster: Build a Highly Available Cluster with Commodity Hardware and Free Software
ISBN: 1593270364
EAN: 2147483647
Year: 2003
Pages: 219
Authors: Karl Kopper

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net