DistributedNetworks DistributedNetworks


NFS Client Networking  «Prev  Next»
Lesson 5 Configuring an NFS client with /etc/fstab
Objective Use /etc/fstab to automate the NFS client-side mounts.

Configuring NFS Client with /etc/fstab

If you require users to explicitly mount remote NFS volumes, you defeat the convenience of NFS. At the very least, you want the home directories available to users immediately upon logging in. To automatically mount local drives as well as NFS volumes at boot time, you use the /etc/fstab file.

Syntax of /etc/fstab file

The syntax of the /etc/fstab file is quite straightforward. Each line governs the mounting of a filesystem at system startup. Fields within a line are separated by tabs or spaces.
The slide show below explores the sample NFS section of /etc/fstab.


Sampe NFS Section
When specifying an NFS volume, the first field gives the location of the volume in the same manner you would list it using the mount command. The second field lists the preexisting directory you want to use to access the NFS volume. The third field tells Linux the filesystem type; for NFS , the type is nfs. The fourth field is a comma separated list of mount options (with no extra spaces). The fifth and sixth fields are used by Linux for maintenance purposes. For NFS volumes, these fields should just be left out or set to the default, zero.

Etc Fstab

Click the Exercise link below to match elements from an /etc/fstab file with their functions.
etc fstab

The next lesson concludes this module.