Go to main content

Managing Network File Systems in Oracle® Solaris 11.3

Exit Print View

Updated: September 2018
 
 

NFS Files

You need several files to support NFS activities on any system. Many of these files are in ASCII format, but some of the files are data files. The following table lists NFS files and their functions.

Table 7  NFS Files
File Name
Function
Man Page
/etc/default/fs
Specifies the default file system type for local file systems. You can determine the file system types that are supported on a client or server by checking the files in /kernel/fs.
fs(4) man page.
/etc/default/nfslogd
Specifies configuration information for the NFS server logging daemon, nfslogd.
nfslogd(1M) man page.
/etc/dfs/dfstab
Obsolete: Specifies the local resources to be shared.
dfstab(4) man page.
/etc/dfs/fstypes
Specifies the default file system types for remote file systems. The first entry defines the NFS file system type as the default.
fstypes(4) man page.
/etc/dfs/sharetab
Specifies the local and remote resources that are shared. Do not edit this file.
sharetab(4) man page.
/etc/mnttab
Specifies file systems that are currently mounted, including automounted directories. Do not edit this file.
mnttab(4) man page.
/etc/netconfig
Specifies the transport protocols. Do not edit this file.
netconfig(4) man page.
/etc/nfs/nfslog.conf
Specifies general configuration information for NFS server logging.
nfslog.conf(4) man page.
/etc/nfs/nfslogtab
Specifies information for log post processing by the nfslogd daemon. Do not edit this file.
/etc/nfssec.conf
Specifies NFS security services.
nfssec.conf(4) man page.
/etc/rmtab
Specifies file systems that are remotely mounted by NFS clients. Do not edit this file.
rmtab(4) man page.
/etc/vfstab
Defines file systems to be mounted locally.
vfstab(4) man page.

/etc/default/nfslogd File

This file defines some of the parameters that are used when using NFS server logging.


Note -  NFS Version 4 does not support 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. Use this option 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 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 reduced. 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 File

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.


Note -  NFS Version 4 does not support NFS server logging.

You can use the following parameters with each tag as needed.

defaultdir=path

Specifies the default directory path for the logging files. Unless you specify differently, the default directory is /var/nfs.

log=path/filename

Sets the path and file name for the log files. The default is /var/nfs/nfslog.

fhtable=path/filename

Selects the path and file name for the file-handle-to-path database files. The default is /var/nfs/fhtable.

buffer=path/filename

Determines the path and file name for the buffer files. The default is /var/nfs/nfslog_workbuffer.

logformat=basic|extended

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

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 identify the files more easily, place the files in separate directories. The following example shows the changes that are needed.

Example 14  Sample NFS Server Logging Configuration File
$ 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

    The example shows a file system that is shared with log=publicftp. A file system that is shared with log=publicftp uses the following values:

  • The default directory is /var/nfs.

  • Log files are stored in /var/nfs/logs/nfslog*.

  • File-handle-to-path database tables are stored in /var/nfs/fh/fhtables.

  • Buffer files are stored in /var/nfs/buffers/workbuffer.

For information about enabling NFS server logging, refer to How to Enable NFS Server Logging.