Lesson 8 | Automounting NFS filesystems |
Objective | Use automounter to mount remote filesystems automatically |
Automounting NFS Filesystems(Use Automounter to mount remote filesystems)
The Linux automounter automatically mounts filesystems the first time you access them. You can configure the automounter to mount remote filesystems as well, using NFS.
If network activity is costly, such as when you pay by the minute, you might want to configure the automounter to mount NFS filesystems.
The automounter works by monitoring a particular directory (called an automount point) and taking action whenever a user changes into one of its subdirectories.
The automount process
The following SlideShow illustrates how the automount process works:
- When a user accesses an automount directory, the system consults the /etc/auto.master file
- The system looks up the automount point in /etc/auto.master file, then consults the associated map file. In this example
- The map file pairs keys to locations. When the user accesses on the listed keys, the automounter pulls files from the associated location.
- In this example, the files were located on a network server.
mount NFS automatically
Configuring the automounter
To get automounting working, you need to:
- Configure
/etc/auto.master
to monitor directories you wish to automount. The format for this file is: automount_point map_file
. To monitor /proj
for accesses, you'd put /proj /etc/auto.proj
.
- Configure each map file. For example,
/etc/auto.proj
might contain docs serv:/proj/docs
and open serv:/proj/open_projects
. Whenever a user accesses /proj/docs
or /proj/open
, automounter will mount the filesystems via NFS.
The next lesson discusses how to resolve NFS problems.
Using NFS Automounter
Before moving on to the next lesson, click the Exercise link below to practice using the Automounter to configure automatic remote file access.
Using NFS Automounter