53.4 NFS Auto Mounting

Install autofs:

$ wajig install autofs

This will create the relevant files in /var/autofs with default configuration file /etc/auto.master which references /etc/auto.misc and /etc/auto.net. You may want to create your own automount specification, so create a new file, perhaps /etc/auto.ktnet with something like:

athens       -rw,hard,intr           athens:/ktnet/athens

Then edit /etc/auto.master to include just this file:

/var/autofs/ktnet      /etc/auto.ktnet

Restart the autofs server:

$ wajig restart autofs

Assuming NFS is set up appropriately, this will now automatically mount /var/autofs/ktnet/athens from the host athene whenever that folder is accessed.



Your donation will support ongoing development and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.