Tuesday, May 17, 2011

NFS Config


NFS, the Network File System, is the most common method for providing file sharing
services on Linux and Unix networks. It is a distributed file system that enables
local access to remote disks and file systems.
Configuration and status files
*/etc/exports
*/var/lib/nfs/rmtab
*/var/lib/nfs/xtab
*/etc/hosts.allow
*/etc/hosts.deny
Daemons
*rpc.portmap
*rpc.mountd
*rpc.nfsd
*rpc.statd
*rpc.lockd
*rpc.rquotad
Scripts and commands
*/etc/rc.d/init.d/nfs
*nfstat
*showmount
*rpcinfo
*exportfs
Examle configuration of NFS:
edit the file /etc/exports as follows:
/home 192.168.0.*(rw,no_subtree_check)
/usr/local 192.168.0.*(ro)
In the above example /home and /usr/local are the shared paths for other linux/unix systems.
Now start the services
service portmap restart    and       service nfs restart
showmount -a     command will show you the mounted servers.
Now goto the client and give the path as follows to check the NFS server:
# mount -t nfs luther:/home /home
now the server is mounted on client and ready for sharing the files on /home.