Autofs

From MEPIS Documentation Wiki

Jump to: navigation, search

Autofs can be used for automatic mounting of directories exported from other machines via NFS.

Install these packages: autofs nfs-common

Then edit (as root) configuration file /etc/auto.master and uncomment the last line. With '#' removed, it will look like this:

 /net    /etc/auto.net

and start the autofs system - in root console, type:

 /etc/init.d/autofs start

From now on, files on other machines made available to your machine will automagically appear under directory /net - to see directories exported from e.g. machine agnus, just try

 ls /net/agnus

and they will appear there.

If the remote directory is not used for some time, it will disappear from /net. You need to use at least /net/agnus to see those files again, listing just /net does not give you the list of available remote machines.

If you want the remote directory to be available under simple (and always visible) name in your home directory, make a symlink:

 ln -s /net/agnus ~/agnus

For other related ways to automate mounting, see Automount.


NOTE: This mechanism uses autofs daemon rather than the more complex (and more error prone) older amd (automount daemon). Both autofs and amd could also be used for automounting of flash discs and cdroms, however these needs are usually better served by automatics built into the KDE desktop and konqueror. The autofs mechanism is unrelated to KDE and works well even for background jobs (running while nobody is logged in) and for programs which do not know the kioslave mechanism.

Personal tools
In other languages