The second field contains our mount options, such as read and write permissions and size restrictions. Once that is completed, add the following to our map file /etc/auto.misc: autofstest -rw,soft,intr,rsize=8192,wsize=8192 :/afstestįield one in the auto.misc file is the name of the subdirectory in /misc. To do this, add the following to the auto.master file: /test /etc/auto.misc -timeout 30 For this demonstration, let's mount directory /afstest on our remote machine (172.25.1.4) to the mount point /test/nfs_share. Let's look at how to mount a directory on our machines. Optional field (allows for the inclusion of options).Each entry in this file has three fields that need to be set for the daemon to work correctly. It consults a map file located at /etc/auto.master. Like most things in Linux, autofs uses a configuration file as the framework for completing tasks. Automounting NFS shares in this way conserves bandwidth and offers better performance compared to static mounts controlled by /etc/fstab. In short, it only mounts a given share when that share is being accessed and are unmounted after a defined period of inactivity. Autofs definedĪutofs is an automount daemon that manages mount points as needed. Let's dig into what autofs is and how it works. Recently, I had the opportunity to learn how to configure NFS shares in Linux. During my exploration of NFS, I came across something that I thought was really interesting and I want to share with Enable Sysadmin readers.
0 Comments
Leave a Reply. |