NFS

HomeSCJP | SCWCD | SCEA | SCSA

Distributing files to clients across a n/w.

 

NFS server - stores files on a local disk, and runs daemons to share them across the n/w

NFS client  - mounts shared files from an NFS server. Transparent,NFS share appear to be local

1. Add an entry ----- > share /usr/share/man

2. Start NFS daemons ---> /etc/init.d/nfs.server start

3. On the NFS client ---> mount <servername>:/usr/share//man /usr/share/man

4. To unmount ---> umount /usr/share/man

5. To stop sharing ---> unshareall / remove share entry fromm DFS tab and stop/start the NFS server.

 

share [ -F fs-type ] [ -o options ] [ -d description ] path_name

share -F nfs /export/home

 

Data about share is logged in /etc/dfs/sharetab file

 

ex;

share -F nfs -o ro /export/raj

share -F nfs -o rw:raj:iplanet /export/raj

/etc/vfstab is read by sys startup scripts and is in charge of mounting specified fs at boot time.

mountall - when executed on a client m/c will mount all the shares specified in /etc/vfstab

mountall -r - only mounts remote shares

unmountall -r  - only unmounts remote shares

shareall - share all fs listed in /etc/dfs/dfstab

unshareall - unshare all currently shared fs -- /etc/dfs/sharetab.