System Administration Guide: Resource Management and Network Services

NFS Files

You need several files to support NFS activities on any computer. Many of these files are ASCII, but some of them are data files. Table 16–1 lists these files and their functions.

Table 16–1 NFS Files

File Name 

Function 

/etc/default/fs

Lists the default file system type for local file systems. 

/etc/default/nfs

Lists configuration information for lockd and nfsd.

/etc/default/nfslogd

Lists configuration information for the NFS server logging daemon, nfslogd.

/etc/dfs/dfstab

Lists the local resources to be shared. 

/etc/dfs/fstypes

Lists the default file-system types for remote file systems. 

/etc/dfs/sharetab

Lists the resources (local and remote) that are shared (see the sharetab(4) man page). Do not edit this file.

/etc/mnttab

Lists file systems that are currently mounted, including automounted directories (see the mnttab(4) man page). Do not edit this file.

/etc/netconfig

Lists the transport protocols. Do not edit this file.

/etc/nfs/nfslog.conf

Lists general configuration information for NFS server logging. 

/etc/nfs/nfslogtab

Lists information for log post-processing by nfslogd. Do not edit this file.

/etc/nfssec.conf

Lists NFS security services. Do not edit this file. 

/etc/rmtab

Lists file systems remotely mounted by NFS clients (see the rmtab(4) man page). Do not edit this file.

/etc/vfstab

Defines file systems to be mounted locally (see the vfstab(4) man page).

The first entry in /etc/dfs/fstypes is often used as the default file-system type for remote file systems. This entry defines the NFS file-system type as the default.

Only one entry is in /etc/default/fs: the default file-system type for local disks. You can determine the file-system types that are supported on a client or server by checking the files in /kernel/fs.

/etc/default/nfslogd

This file defines some of the parameters that are used when using NFS server logging. The following parameters can be defined.

CYCLE_FREQUENCY

Determines the number of hours that must pass before the log files are cycled. The default value is 24 hours. This option is used to prevent the log files from growing too large.

IDLE_TIME

Sets the number of seconds nfslogd should sleep before checking for more information in the buffer file. This parameter also determines how often the configuration file is checked. This parameter, along with MIN_PROCESSING_SIZE, determines how often the buffer file is processed. The default value is 300 seconds. Increasing this number can improve performance by reducing the number of checks.

MAPPING_UPDATE_INTERVAL

Specifies the number of seconds between updates of the records in the file-handle-to-path mapping tables. The default value is 86400 seconds or one day. This parameter helps keep the file-handle-to-path mapping tables up-to-date without having to continually update the tables.

MAX_LOGS_PRESERVE

Determines the number of log files to be saved. The default value is 10.

MIN_PROCESSING_SIZE

Sets the minimum number of bytes that the buffer file must reach before processing and writing to the log file. This parameter, along with IDLE_TIME, determines how often the buffer file is processed. The default value for is 524288 bytes. Increasing this number can improve performance by reducing the number of times the buffer file is processed.

PRUNE_TIMEOUT

Selects the number of hours that must pass before a file-handle-to-path mapping record times out and can be pruned. The default value is 168 hours or 7 days.

UMASK

Specifies the file mode creation mask for the log files that are created by nfslogd. The default value is 0137.

/etc/nfs/nfslog.conf

This file defines the path, file names, and type of logging to be used by nfslogd. Each definition is associated with a tag. Starting NFS server logging requires that you identify the tag for each file system. The global tag defines the default values. You can use the following parameters with each tag as needed.

defaultdir=path

Specifies the default directory path for the logging files.

log=path/filename

Sets the path and file name for the log files.

fhtable=path/filename

Selects the path and file name for the file-handle-to-path database files.

buffer=path/filename

Determines the path and file name for the buffer files.

logformat=basic|extended

Selects the format to be used when creating user-readable log files. The basic format produces a log file similar to some ftpd daemons. The extended format gives a more detailed view.

For the parameters that can specify both the path and the file name, if the path is not specified, the path that is defined by defaultdir is used. Also, you can override defaultdir by using an absolute path.

To make identifying the files easier, place the files in separate directories. Here is an example of the changes that are needed.


% cat /etc/nfs/nfslog.conf
#ident  "@(#)nfslog.conf        1.5     99/02/21 SMI"
#
  .
  .
# NFS server log configuration file.
#

global  defaultdir=/var/nfs \
        log=nfslog fhtable=fhtable buffer=nfslog_workbuffer

publicftp log=logs/nfslog fhtable=fh/fhtables buffer=buffers/workbuffer

In this example, any file system that is shared with log=publicftp would use the following values: