Wednesday, October 22, 2014

setting up autofs

1. Create a dir to be shared
# mkdir /homedirs

2. Add entry to /etc/exportfs
# vi /etc/exports
/homedir *(rw,sync)


3. restart nfs service
# service autofs restart stop/start

# verify the share
# exportfs

go to client and test if nfs works

# mount /mnt

took long time to mount.

# showmount -e
clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to

disable the firewall
# service iptables stop

Check what is shared for this host

# showmount -e
Export list for
/homedirs *

try to moun again

# mount /mnt

it works

Note:  if some reason you have problem mounting, please stop nfs and rpcbind and restart rpcbind first and then start nfs.

Now, setup autofs on client
Add entry to /etc/auto.master to set up autofs
# vi /etc/auto.master
/ram    /etc/auto.rhome

# vi /etc/auto.rhome
*       -rw

No comments:

Post a Comment