Tuesday, December 27, 2011

NFS Server configuration

Server Configuration : 

[root@ns1 ~]#     mkdir /nfsserver
[root@ns1 ~]#     vim /etc/exports
/nfsserver 192.168.50.18/24(rw,sync)

[root@ns1 ~]#     /etc/init.d/portmap restart
Stopping portmap: [ OK ]
Starting portmap: [ OK ]

[root@ns1 ~]#     /etc/init.d/nfs restart
Shutting down NFS mountd: [ OK ]
Shutting down NFS daemon: [ OK ]
Shutting down NFS quotas: [ OK ]
Shutting down NFS services: [ OK ]
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ] 

[root@localhost /]# chmod 777 nfsserver/

Client Configuration: 

[root@ns2 ~]#     mkdir /nfsclient
[root@ns2 ~]# mount -t nfs 192.168.50.18:/nfsserver /nfsclient
[root@mail nfsclient]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda6 15G 3.2G 11G 24% /
tmpfs 124M 0 124M 0% /dev/shm
/dev/hda8 471M 11M 437M 3% /usertest
192.168.50.18:/nfsserver
26G 4.6G 20G 19% /nfsclient

[root@mail nfsclient]#     showmount -e 192.168.50.18
Export list for 192.168.50.18:
/nfsserver 192.168.50.18/24