NFS Services Administrator's Guide

Troubleshooting NFS Services
Common Problems with NFS
Chapter 5178
Data is Lost Between the Client and the Server
Make sure that the directory is not exported from the server with the
async option. If the directory is exported with the async option, the
NFS server will acknowledge NFS writes before actually writing
data to disk.
If users or applications are 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 multiple NFS users are 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 are 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.
For more information, see mount (1M), open (2), write (2), and lockf (2).