21.2.2. Mounting NFS File Systems using autofs
/etc/auto.masterto 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.miscfile might define mount points in the
/miscdirectory; this relationship would be defined in the
auto.masterhas 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.
/proj52on the remote machine penguin.example.net at the mount point
/misc/myprojecton your machine, add the following line to
/misc /etc/auto.misc --timeout 60
myproject -rw,soft,intr,rsize=8192,wsize=8192 penguin.example.net:/proj52
/etc/auto.miscis the name of the
/miscsubdirectory. This subdirectory is created dynamically by automount. It should not actually exist on the client machine. The second field contains mount options such as
rwfor read and write access. The third field is the location of the NFS export including the hostname and directory.
/miscmust exist on the local file system. There should be no subdirectories in
/miscon the local file system.
/sbin/service autofs restart
/sbin/service autofs status
/etc/auto.masterconfiguration file while autofs is running, you must tell the automount daemon(s) to reload by typing the following command at a shell prompt:
/sbin/service autofs reload