NFS Services Administrator's Guide

Troubleshooting NFS Services
Common Problems with NFS
Chapter 8 303
If Data is Lost Between the Client and the Server
Make sure the directory is exported from the server with the
noasync option (the default). If the directory is exported with the
async option, the NFS server will acknowledge NFS writes before
actually writing data to disk. Changing an exported directory from
async to noasync degrades write performance for that directory.
If users or applications will be writing to the NFS-mounted directory,
make sure it is mounted with the hard option (the default), rather
than the soft option.
If you have a small number of NFS applications that require
absolute data integrity, add the O_SYNC flag to the open() calls in
your applications. When you open a file with the O_SYNC flag, a
write() call will not return until the write request has been sent to
the NFS server and acknowledged. The O_SYNC flag degrades write
performance for applications that use it.
If you have a large number of NFS applications requiring absolute
data integrity, or if your entire installation needs a high degree of
data integrity, set the NUM_NFSIOD variable to 0 in the
/etc/rc.config.d/nfsconf file on each client, as follows,
NUM_NFSIOD=0
and issue the following commands to kill all the biod processes (PID
is a process ID returned by the ps command):
/usr/bin/ps -ef | /usr/bin/grep biod
/usr/bin/kill PID PID ...
The biod daemons improve performance by handling NFS read and
write requests from users and applications. After a write request is
passed to a biod daemon, control is returned to the user or
application. Running a client without biod daemons degrades NFS
performance for all users and applications on that client.
If multiple NFS users will be writing to the same file, add the
lockf() call to your applications to lock the file so that only one user
may modify it at a time.
If multiple users on different NFS clients will be writing to the file,
you must also turn off attribute caching on those clients by mounting
the file with the noac mount option. Turning off attribute caching
degrades NFS performance.