How To Setup NFS client On A Solaris-10 box

In the previous post we have seen how to setup a NFS server share. We will use the same serverbox(redcoral) from our previous post and see How To Setup a NFS client on the localbox Solaris box(raisin).

We can get the NFS shared resource information from a remote server with the below command:
root@raisin#dfshares -F nfs redcoral
RESOURCE                                  SERVER ACCESS    TRANSPORT
  redcoral:/opt/smbshare                redcoral  -         -

NFS Client Side Configuration:

Login to client Solaris box in the same network as the server and do the following to setup the NFS client.
1. Start the NFS client service if not started:
root@raisin#svcadm  enable network/nfs/client
root@raisin#svcs -a | grep nfs
disabled       Dec_24   svc:/network/nfs/server:default
online         Dec_24   svc:/network/nfs/status:default
online         Dec_24   svc:/network/nfs/nlockmgr:default
online         Dec_24   svc:/network/nfs/cbd:default
online         Dec_24   svc:/network/nfs/mapid:default
online         Dec_24   svc:/network/nfs/rquota:default
online          1:02:23 svc:/network/nfs/client:default

2. Create an empty directory on which you want to mount the NFS share:
root@raisin#mkdir /home/nfsclient

3. Command to mount the share in client box:
root@raisin#mount -F nfs redcoral:/opt/nfsshare /home/nfsclient/
The shares are now accessible in the localbox(raisin) from the path /home/nfsclient.
Note that the shares will not persist system reboot.

Let us now configure it to make it persistent:

4. Command to un-mount the existing share:
root@raisin#umount /home/nfsclient/

5. To make it persist system reboots, add an entry in /etc/vfstab file as below:
root@raisin#vi /etc/vfstab
#device          device          mount           FS      fsck    mount   mount
#to mount        to fsck         point           type    pass    at boot options
redcoral:/opt/nfsshare    -     /home/nfsclient nfs - yes   -
Note the entries are separated by tabs.

6. Restart the box or issue the following command to mount the share:
root@raisin#mountall -F nfs

Thats it, we can now access the shares as if they were in the localbox.

No comments:

Post a Comment