###Automounter###
###Service: autofs###
#service autofs start
###Main configuration file###
/etc/auto.master
###Sub configuration files###
/etc/auto.misc For CD,Floppy etc.
/etc/auto.direct For the directories starting with"/".
###Adding a automount share###
#vi /etc/auto.master
Goto the following lines
/misc /etc/auto.misc
/net -hosts
Add this lines after the above lines
/- /etc/auto.direct
:wq
Suppose u want to automount /media/rhel5 @ 192.168.1.2 to /remote in your local
machine
#mkdir /remote
#vi /etc/auto.direct
/remote 192.168.1.2:/media/rhel5
:wq
#cd /remote
NFS share will be mounted automatically when u execute cd command to /remote. It will
be automatically unmount if you are not using the share for a particular amount of time.
You can set this time as shown below.
in /etc/auto.master file
/- /etc/auto.direct --timeout=60 Time is in seconds.
No comments:
Post a Comment