Detail
There are lots of 'quick' getting started guides to NFS and Linux. Here is my quick guide - with some help:
1) Server:
A) Edit /etc/exports, add lines like this:
/data/cbil 10.0.0.0/255.0.0.0(rw)
/data/jini 10.0.0.0/255.0.0.0(rw)
B) Start the NFS daemon:
/etc/init.d/nfs start
Done.
2) Client:
Mount the NFS:
mount -t nfs -o rw server:/data/cbil /mnt/cbil
BUT WAIT! That is too simple a mount command. That is termed a 'hard' mount, and you have not specified the 'intr' (interrupt) option. This is a big problem if your server goes away - any command will hang: ls, cd included.
If you are on a client attempting to access a 'dead' NFS share, this is how to kill it:
1)
$ ps axu|grep D
kill -9 anything in the D state.
2) kill -9 all rpciod processes:
$ pkill -9 rpciod
3) umount -f the filesystem:
$ umount -f /mnt/cbil
===
To avoid all that, use a more sophisticated mount command. Try this:
$ mount -t nfs -o rw,intr,tcp, server:/home/bemo/svnroot/jini jini_share
Now - if the server goes away - you should not have to do such gymnastics to get the thing unmounted.
|