Tuesday, July 17, 2007

Setting up NFS on Solaris

<b>Setup the server :</b>

Edit /etc/dfs/dfstab :

share -F nfs -o root=client_nfs.domain.com -d "Backup FS" /raid5

Note : By default root is assigned nobody permission on an NFS share. To enable root permission on the share, we need to specify root= in the share? options.

Start the nfs server :

# /etc/init.d/nfs.server start

#

Check if the share is effective :

# showmount -e

export list for server_nfs:

/raid5 @204.19.29.0

#

To unshare :

# unshare /raid5

<b>Setup the client :</b>

mount server_nfs:/raid5 /nfs

Check the mount :

root@client_nfs:nfsstat -m

/nfs from server_nfs:/raid5

Flags: vers=3,proto=tcp,sec=sys,hard,intr,link,symlink,acl,rsize=32768,wsize=32768,retrans=5

root@client_nfs:

Setup automatic mount at boot time :

Edit /etc/vfstab and add the following line :

columbia:/raid5 - /nfs nfs - yes -

<b>Availability tests</b>

Case 1 :

Initial state : NFS Server is UP, NFS client has a mounted share.

Observation : Everything works perfectly.

Failure : NFS Server is DOWN, NFS client still has a mounted share.

Observation : NFS client still works fine. The share is not accessible. When we try to access it, the command froze. No implication on the system.

Recovery : NFS Server is brought back UP.

NFS client automatically finds the share. We can use it. Everything is automatic.

Case 2 :

Initial state : NFS Server is UP, NFS client has a mounted share.

Observation : Everything works perfectly.

Failure : Client is DOWN

Recovery : Client is brought back UP .

Observation : The client is able to use the share. Everything is back to normal.

Case 3 :

Initial state : NFS Server is UP, NFS client has a mounted share.

Observation : Everything works perfectly.

Failure : NFS Server AND NFS client shutdown due to a power loss.

Recovery : NFS client go back up first. NFS Server is down.

NFS client goes back UP and is ready. We can access the shared directory but nothing is there.

NFS Server is brought back UP. The NFS client automatically remount the share and can access it.

Everything is back to normal.<i></i>