Centos – How to mount nfs using automounter(autofs)

automountcentos-6nfs

I have an nfs at 192.168.1.10:/home/vm1/Desktop/nfs and will like to mount locally to /home/vm1/Desktop/nfs-mount using automounter…need help doing do

What i did


$cat /etc/auto.master
/home    /etc/auto.nfs

$cat /etc/auto.nfs /vm1/Desktop/nfs-bind -fstype=nfs 192.168.1.32:/home/vm1/Desktop/nfs

Is that the correct way to do that?

after


$cat /etc/auto.master
/home    /etc/auto.nfs

$cat /etc/auto.nfs vm1/Desktop/nfs-bind -fstype=nfs 192.168.1.32:/home/vm1/Desktop/nfs

this is what i am getting


Apr 30 06:27:30 vm1 automount[1542]: lookup_read_master: lookup(nisplus): couldn't locate nis+ table auto.master
Apr 30 06:27:30 vm1 automount[1542]: key "vm1" not found in map source(s).
Apr 30 06:28:10 vm1 automount[29547]: lookup_read_master: lookup(nisplus): couldn't locate nis+ table auto.master
Apr 30 06:28:13 vm1 automount[29547]: key "vm1" not found in map source(s).
Apr 30 06:28:18 vm1 automount[29547]: lookup_read_master: lookup(nisplus): couldn't locate nis+ table auto.master
Apr 30 06:28:18 vm1 automount[29547]: key "vm1" not found in map source(s).
Apr 30 06:29:19 vm1 automount[29547]: key "vm1" not found in map source(s).

Best Answer

I do not believe this is the correct way to do it.

Try replacing vm1/Desktop/nfs-bind with vm1. Then attempt to navigate to /home/vm1.

(Or try replacing /home with /home/vm1/Desktop/ & /vm1/Desktop/nfs-bind with nfs-bind...)

Related Question