D.4 Configuring Default Mount Settings for NSS Pools and Volumes

Whenever you create NSS pools and volumes from the command line, their mount information is not added by default to the /etc/fstab configuration file. After creating the pool and volume, make sure to edit the /etc/fstab configuration file to add entries for them.

D.4.1 Understanding Entries in the /etc/fstab Configuration File

The /etc/fstab file is a configuration file that contains information about all the devices and partitions on your Linux computer. Each line is an entry that describes where and how to mount one device or one partition. The following table describes the field information needed for NSS pools and volumes.

Table D-1 Options in the /etc/fstab File

Column in /etc/fstab

Description

Examples

Device name

The location of the device or partition you want to mount.

/dev/hda3
/dev/sdb1

Mount point

The default location where the device or partition is to be mounted if the mount point is not otherwise specified in a mount command.

/mnt/.pool2
/media/nss/NSSV1

File system type

The file system type of the device or partition.

nsspool
nssvol

Mount options

Lists the comma-delimited mount options for the device or partition. Use a comma without spaces between options.

auto or noauto: Use auto if you want the volume to mount automatically after a system reboot. Use noauto if you want the device to be mounted only when you explicitly issue the mount command. Do not use the auto command for encrypted NSS volumes; they require a password to be entered on the first mount after a system reboot.

rw: Use rw to mount the device as read-write.

name=<poolname | volname>: Specify the poolname or volname of the partition to be mounted.

noatime: Use noatime for volumes when you want a file’s access time (atime) to not be updated for reads.

nodiratime: Use nodiratime for volumes when you want a directory’s access time to not be updated for enumerations.

noauto,rw,name=POOL2
noauto,rw,name=NSSV1
name=POOL2,NSSV1,noatime,nodiratime
name=NSSV1,noatime,nodiratime

Dump option number

Designates if the file system should be dumped with the Linux Dump utility. A value of 0 indicates that Dump should ignore this file system.

Set this value to 0 for NSS pools and volumes.

0

File system check number

Designates if the file system should be checked with the Linux fsck utility. A value of 0 indicates that fsck should ignore this file system.

Set this value to 0 for NSS pools and volumes.

0

D.4.2 Adding NSS Pool and Volume Mount Information to /etc/fstab

For information about completing the fields for an entry in the /etc/fstab file, see Section D.4.1, Understanding Entries in the /etc/fstab Configuration File.

  1. Log in as the root user, or use the su command to become root.

  2. In a text editor, open the /etc/fstab configuration file.

    IMPORTANT:When working in /etc/fstab, make sure not to leave any stray characters or spaces in the file. This is a configuration file, and it is highly sensitive to such mistakes.

  3. Locate the area in /etc/fstab where partitions are defined, then add a line defining the mount information for the NSS pool.

    devname mountpoint fstype mountoptions dump# fsck#
    

    For example, suppose you created POOL2 on device /dev/hda2 and mounted it at /mnt/.POOL2. In the /etc/fstab file, the line to add would be

    /dev/hda2 /mnt/.POOL2 nsspool noauto,rw,name=POOL2 0 0
    

    If you want to mount an NSS pool automatically after a system reboots, make sure to use the auto command.

  4. Locate the area in /etc/fstab below where you entered pool information, then add a line defining the mount information for the NSS volume.

    devname mountpoint fstype mountoptions dump# fsck#
    

    Make sure to place the NSS volume entry after its pool entry to ensure that the pool is mounted before the volumes in it.

    For example, suppose you created volume NSSV1 and mounted it at /media/nss/NSSV1. In the /etc/fstab, the line to add would be

    NSSV1 /media/nss/NSSV1 nssvol noauto,rw,name=NSSV1 0 0
    

    If you want to mount a non-encrypted NSS volume automatically after a system reboots, make sure to use the auto command on both the pool it is in and the volume.

  5. Save the /etc/fstab file to accept your changes.