NFS share using autofs in Ubuntu Linux.
Autofs is a service in Linux like operating system which automatically mounts the file system and remote shares when it is accessed. Main advantage of autofs is that you don’t need to mount file system at all time, file system is only mounted when it is in demand.
Autofs service reads two files Master map file ( /etc/auto.master ) and a map file like/etc/auto.misc or /etc/auto.xxxx.
In ‘/etc/auto.master’ file we have three different fields :
/<Mount-Point> <Map-file> <Timeout-Value>
In map file (/etc/auto.misc or /etc/auto.xxxx) also we have three different fields:
<Mount-Point> <Mount-Options> <Location_of_File System>
In this article we will mount the NFS share using autofs. NFS share ‘/db_backup‘ is exported from Fedora NFS Server (192.168.1.21). We are going to mount this nfs share on Ubuntu Linux using autofs.
Step:1 Install the autofs package using apt-get command.
Step:2 Edit the Master Map file ‘/etc/auto.master’
Add the following line in the master map file.
Save & exit the file.
Create the mount point.
Step:2 Create a map file ‘/etc/auto.nfsdb’.
Add the following line in the map file.
Post a Comment