Search This Blog

Monday, April 26, 2010

NFS - Solaris 10

NFS is a quick and easy way to setup folder sharing between two Solaris 10 Systems. Here is a quick way to get started.

SERVER:
1.) Enable your NFS server on Solaris 10 with the following command:
  • svcadm -v enable /network/nfs/server
2.) The next command will allow you to share a folder from the server using NFS.
  • share -F nfs -o rw /home/somefolder
It should be noted that the command above will not persist over reboots. It will only share the folder until the system reboots. If you would like to have the share persist over reboots on the server, just add the above command to the file /etc/dfs/dfstab

CLIENT:
1.) Mount the
NFS share from the server with the following command.
  • mount -F nfs servername:/home/somefolder /mount_point
Remember that the "mount_point" on your system should be a clean folder that already exists. Also the above command will also not persist over reboots. To mount on reboot the following line should be added to the file /etc/vfstab
  • servername:/home/somefoler - /mount_point nfs - yes rw,soft
In some cases you make wish to setup an NFS share for folders containing some Oracle files, the following is a line added to our Solaris NFS Client's vfstab in order to achieve optimal performance for Oracle 10g database storage. On the server the share is done the same as above.
  • servername:/storedge/nfsStorage/oradata1 - /oradata nfs - yes hard,bg,proto=tcp,vers=3,suid,rsize=32768,wsize=32768,noac,forcedirectio
Troubleshooting:

If you cannot enable the service. Make sure that you have the nfs package installed. you should be able to install with package management software. Or you can use the discs you installed Solaris 10 from.

If you cannot connect to the server share, make sure DNS is properly configured on the client. If the client is not using DNS simply add the IP and servername to your client's /etc/hosts file.
This can be tested by simply 'pinging' the server from the client, (# ping servername/ip)

if you are not comfortable with vi editor. Please using a GUI (gedit) editor for the vfstab file. Each bulleted entry above should be one line, do not press the return key until you have typed the full line. Do not worry if you run out of space and the screen you are using wraps the text to a new line.