This post explains how to configure ‘autofs’ in order to mount NFS file systems with ‘autofs’ service.
AutoFS very useful in case if the client machine has to mount many mounts at one time, overall boot up time will be increased; with the autofs we can speed up the bootup time. When the static mount (/etc/fstab) is used, regardless of how infrequently a user accesses the NFS mounted file system, the system must dedicate resources to keep the. The great thing thing about autofs is that the line above is no longer needed. Swackett x v1 7. The mounting of the remote file system is done in the moment I try to access the folder by the autofs daemon. Sshfs and autofs together makes a encrypted remote file system available to the user and the system in a.
1. Stop ‘autofs’ service, check if the service is running then proceed to stop it.
2. Edit the /etc/auto.master file to set the file map:
The file /etc/auto.master is the main configuration file for ‘autofs’ service, this file contains the master map lists of the mount points on the system controlled by ‘autofs’, and their corresponding configuration files or network sources which are known as ‘automount maps‘.
This is how the file should looks like: Screens 4 6 9 inch.
Paint code app. The ‘map file’ can be changed to any other file under /etc with the name ‘auto.mount’ in order to mount the export to any other desired directory. For more information please proceed to step number two.
Edit the ‘auto.master‘ file and add the hash symbol in front of the line “/misc /etc/auto.misc”, then proceed to add the following line to the end of the file:
![Autofs Autofs](https://i0.wp.com/www.tjansson.dk/billeder/openssh.png?w=1140)
Autofs Fstab
The file should look like the following example after the change:
Autofs Step By Step
3. Create and/or edit the map file:
The map file is a separate file that defines the file systems to be mounted under any specified mount point. For example, the /etc/auto.misc file might define mount points in the /misc directory; another example is to use /mnt as another directory to mount the export. If any other directory is needed then a new file must be created under /etc/ directory with the name ‘auto.mount’ as a recommendation.
The following is an example of the ‘/etc/auto.misc’ file and the new file ‘auto.mount’
If you do not want to use /misc directory nor the ‘auto.misc’ file, create a new file with the name ‘auto.mount’ and add the same parameters with the corresponding syntax, like in the example as follows:
Append the following line:
NOTE: Make sure that you have edited the ‘/etc/auto.master’ file and change the map file to the desired one.
Autofs Fstype
4. Start the ‘autofs’ service:
5. Run ‘mount’ command to check that your NFS share is now mounted: