NFS Services Administrator's Guide
Configuring and Administering NFS
Configuring and Administering an NFS Client
Chapter 2 55
To Ensure Data Integrity Between the Client and
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
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
actimeo=n
(no default)
Setting actimeo to n seconds is equivalent to setting
acdirmax, acdirmin, acregmax, and acregmin to n
seconds.
Set actimeo=1 or actimeo=3 for a directory that is used
and modified frequently by many NFS clients. This
ensures that the file and directory attributes are kept
reasonably up to date, even if they are changed
frequently from various client locations.
Set actimeo=120 or higher for a directory that rarely or
never changes.
If you set the actimeo value, do not set the acdirmax,
acdirmin, acregmax, or acregmin values.
Table 2-3 NFS Caching Options (Continued)