A.22 noatime and atime Commands

The /noatime and /atime commands for a volume allow the administrator to control whether access times are updated when files and directories are read. They are available for NSS on OES 2 SP1 Linux and later. The setting persists across reboots.

Using /noatime is useful for backup, news servers, and mail servers where the extra disk activity associated with updating the access time is not desired. Avoiding the writes associated with updating the access time can result in measurable performance gains.

WARNING:Use the /noatime switch with caution. Do not use the /noatime switch on an NSS volume if the programs and scripts that are used to manipulate its data require access times to be updated. The program or script cannot work as designed, and performance can significantly decrease.

For example, the following programs are affected by using the /noatime switch:

A.22.1 Using noatime or atime at the Command Line

Issue the following commands in the NSS Console.

nss /atime=volumename

This option enables the updating of access time for both files and directories in a specified volume so that reading a file updates its access time. This is enabled by default.

nss /noatime=volumename

This option disables the updating of access time for both files and directories in a specified volume so that reading a file does not update its access time.

A.22.2 Using noatime in a Cluster Load Script

You can also use the noatime option when mounting an NSS volume in a Novell Cluster Services cluster load script. The atime setting is enabled by default, so it is not necessary to specify it explicitly.

In the cluster load script, modify the ncpcon mount command for the volume:

exit_on_error ncpcon mount /opt="noatime" volumename=volume_id 

When you create a new volume on a cluster-enabled pool, Cluster Services automatically assigns it a volume ID that is unique in the entire cluster and writes the value to the cluster resource load script for the pool. When you add the /opt option to volume’s mount line in the load script, the volume ID is already part of the command.

For example, for a volume named VOL1 and a volume ID of 254, the commands would be:

mount /opt="noatime" VOL1 VOLID=254
exit_on_error ncpcon mount /opt="noatime" VOL1=254

A.22.3 Viewing the atime or noatime Setting

You can view the current setting for the atime attribute by using the nss /volumes command at the NSS Console.

atime attribute is enabled - Attribute is not displayed.

atime attribute is disabled - No Access Time is displayed.