Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of my employer.

Wednesday, June 25, 2008

OpenSolaris - OpenSolaris File sharing (OpenSolaris 2008.05 & SXDE 1/08)

Network file sharing in open solaris system is quite easy !! I am working behind a router which connects my desktop system and my laptop . OpenSolaris 2008.05 is installed on my desktop pc with ip address 192.168.1.105 and SXDE (solaris express developer edition) is installed on my laptop with ip address 192.168.1.103.

Now configuration details for my laptop (SXDE 1/08):
(This method is also applicable for SXDE 9/07)

*A ping test to make sure that they are reachable to each other.

-bash-3.2# ping 192.168.1.105
192.168.1.105 is alive
** Go to services. (for sxde 1/08, start -> administration -> Services). Activate NFS services.

*** Go to Administration -> Share Folder. Click on 'Add'.


1)Now select the path to the folder you want to share , by default your home directory will be selected. I have shared the default directory to NFS.

2)Share with : NFS


3)Click on "Add Host"

Allowed hosts : Specify IP address
enter IP address : 192.168.1.105
Check out the 'Read Only' box in Hosts settings if you want to give 'Read Only' permission.


Click OK to exit the wizards.

Now configuration details for my desktop (OpenSolaris 2008.05):

*A ping test to make sure that they are reachable to each other.

-bash-3.2# ping 192.168.1.103
192.168.1.103 is alive
** Go to services. (for OpenSolaris 2008.05, browse it from system -> administration -> Services). Activate NFS services.

*** Go to Administration -> Share Folder. Click on 'Add'.

1)Now select the path to the folder you want to share , by default your home directory will be selected. I have shared '/export/home/ritwik/softwares'.

2)Share with : NFS

3)Click on "Add Host"

Allowed hosts : Specify IP address
enter IP address : 192.168.1.103
Check out the 'Read Only' box in Hosts settings if necessary.
Click OK to exit the wizards.

Optional Steps :

Now check out whether NFS server is running properly :
# svcs network/nfs/server
You should get a result like :

STATE STIME FMRI
online 21:22:11 svc:/network/nfs/server:default

Now check out Shared files :
#exportfs
From my laptop I got a result like :

- /export/home/ritwik sec=sys,ro=192.168.1.105 ""

and from my desktop,

- /export/home/ritwik/softwares sec=sys,ro=192.168.1.103 ""

You may also check /etc/dfs/dfstab , the file in my laptop was looking like :

# Do not modify this file directly.
# Use the sharemgr(1m) command for all share management
# This file is reconstructed and only maintained for backward
# compatibility. Configuration lines could be lost.
#
# share [-F fstype] [ -o options] [-d ""] [resource]
# .e.g,
# share -F nfs -o rw=engineering -d "home dirs" /export/home2
share -F nfs -o sec=sys,ro=192.168.1.105 /export/home/ritwik

Now , make a mount point.

bash-3.2$ mkdir dsktopShare (in my laptop)
bash-3.2$ mkdir laptopShare (in my desktop)

Mount the shared file :

-bash-3.2# mount -F nfs 192.168.1.105:/export/home/ritwik/softwares /export/home/ritwik/dsktopShare(from my laptop)

-bash-3.2# mount -F nfs 192.168.1.103:/export/home/ritwik /export/home/ritwik/laptopShare
(from my desktop)

Unmount in the following way :

# umount /export/home/ritwik/dsktopShare
# umount /export/home/ritwik/laptopShare

No comments:

Post a Comment