This configuration is for sharing single home directory on multiple servers
Server Side Configuration
Here the directries are shared only for one host.
[root@lion /]# cat /etc/exports
/home tiger(rw,root_squash)
/home/chimmu tiger(rw,root_squash)
/data3 tiger(rw,root_squash)
/entertainment tiger(rw,root_squash)
Starting nfs server
[root@lion /]# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
Configuring NFS server to comeup autmatically on next reboot
[root@lion /]# chkconfig nfs on
Verifying changes are affected
[root@lion /]# chkconfig --list |grep nfs
nfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off
Clilent Side Configuration.
Adding entry in automaster
[root@tiger ~]# cat /etc/auto.master
/home /etc/auto.home --timeout 600
/entr /etc/auto.misc --timeout 600
/home /etc/auto.per --timeout 600
/pri /etc/auto.samba --timeout 600
[root@tiger ~]# cat /etc/auto.misc
entr lion:/entertainment
per lion:/home/per
[root@tiger ~]# cat /etc/auto.home
* -fstype=nfs,soft,intr,rsize=8192,wsize=8192,nosuid,tcp lion:/home/&
[root@tiger ~]# cat /etc/auto.per
per lion:/home/per
Starting autofs in client and making it permanent on next reboot
[root@tiger ~]# /etc/init.d/autofs start
Starting automount: [ OK ]
[root@tiger ~]# chkconfig autofs on
[root@tiger ~]# chkconfig --list|grep autofs
autofs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Checking its working fine.
See below, latheef home directory mounted from lion. (auto.home)
[root@tiger ~]# su - latheef
-bash-4.0$ df -h .
Filesystem Size Used Avail Use% Mounted on
lion:/home/latheef 184G 91G 84G 53% /home/latheef
entertainment directory mounted from lion to here (for all users-auto.misc)
[root@tiger ~]# cd /entr/entr/
[root@tiger entr]# df -h .
Filesystem Size Used Avail Use% Mounted on
lion:/entertainment 459G 220G 216G 51% /entr/entr