Network File Services  «Prev  Next»

Using NFS Automounter

This exercise asked you to configure the /etc/auto.master file to monitor the /projects directory on your local machine.
You have opened the /etc/auto.master file, now you need to add the automount point to map file association by typing /projects /etc/auto.projects.
You save the file and then open /etc/auto.projects. Mount the server's directories whenever users access docs or sources. First, type serv:/export/docs and press Enter. Then type sources serv:/export/source and press Enter.
This is the end of the Simulation.

Mounting NFS File Systems using autofs

A third option for mounting an NFS share is the use of the autofs service. Autofs uses the automount daemon to manage your mount points by only mounting them dynamically when they are accessed.
Autofs consults the master map configuration file /etc/auto.master to determine which mount points are defined. It then starts an automount process with the appropriate parameters for each mount point. Each line in the master map defines a mount point and a separate map file that defines the file systems to be mounted under this mount point. For example, the
 /etc/auto.misc 
 
file might define mount points in the /misc directory; this relationship would be defined in the
/etc/auto.master file. 
Each entry in auto.master has three fields. The first field is the mount point. The second field is the location of the map file, and the third field is optional. The third field can contain information such as a timeout value.
For example, to mount the directory /proj52 on the remote machine penguin.example.net at the mount point /misc/myproject on your machine, add the following line to auto.master: