Tuesday, June 21, 2011

automount a specific directory with autofs

this is what we do
first umount your directory then mount the location you want to another directory and later create a symbolic link with the name you need

umount /usr/local/apache-tomcat-6.0.26/information-repository

rmdir /usr/local/apache-tomcat-6.0.26/information-repository

vi /etc/auto/master
/usr/local/mounts /etc/auto.nfs

vi /etc/auto.nfs
m_29 -fstype=nfs,rw 192.168.0.29:/u01/information-repository

mkdir /usr/local/mounts/m_29

ln -s /usr/local/mounts/m_29 /usr/local/apache-tomcat-6.0.26/information-repository

No comments: