Disclaimer

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

Thursday, July 10, 2008

OpenSolaris - Linux file sharing (Fedora 7 and OpenSolaris 2008.05)

I am using NFS to share some files between my linux and open solaris system. I am working behind a router which connects my desktop pc and my laptop . My desktop pc has OpenSolaris 2008.05 installed with ip address 192.168.1.105 and Fedora 7 is installed in my laptop with ip address 192.168.1.102.

I have configured my fedora system in the following way :

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

[root@ritwik ~]# ping 192.168.1.105
PING 192.168.1.105 (192.168.1.105) 56(84) bytes of data.
64 bytes from 192.168.1.105: icmp_seq=1 ttl=255 time=3.53 ms
64 bytes from 192.168.1.105: icmp_seq=2 ttl=255 time=1.18 ms
64 bytes from 192.168.1.105: icmp_seq=3 ttl=255 time=1.18 ms
64 bytes from 192.168.1.105: icmp_seq=4 ttl=255 time=1.16 ms
64 bytes from 192.168.1.105: icmp_seq=5 ttl=255 time=1.30 ms
64 bytes from 192.168.1.105: icmp_seq=6 ttl=255 time=1.44 ms

--- 192.168.1.105 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5000ms
rtt min/avg/max/mdev = 1.161/1.636/3.537/0.856 ms

** System -> Administration -> Server settings -> services.
I looked for NFS service and make sure that's running.

*** System -> Preferences -> system -> NFS.
click on 'Add'. I selected '/home/ritwik/study' directory to share .
Host(s) : 192.168.1.105
I checked 'Read-Write'.

now , /etc/exports was looking like :

/home/ritwik/study 192.168.1.105(rw,sync)

I have also checked the following :

[root@ritwik ~]# exportfs -rv

exporting 192.168.1.105:/home/ritwik/study
[root@ritwik ~]# showmount -e
Export list for ritwik:
/home/ritwik/study 192.168.1.105

My firewall service trusts NFS4 as trusted service , though I have used NFS version 3 to mount shared files.

Now configuration details for OpenSolaris 2008.05 :

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

-bash-3.2# ping 192.168.1.102
192.168.1.102 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 , I make a mount point in my fedora system.

[ritwik@ritwik ~]$ mkdir OSolShare

Then I used the following command to mount OpenSolaris shared files in that directory :

[root@ritwik ~]# mount -t nfs -o vers=3 192.168.1.105:/export/home/ritwik/mysql/docs /home/ritwik/OSolShare

Then I was trying to mount fedora shared files in my Opensolaris system.

first I make a mount point :

ritwik@ritwik:~$ mkdir linxShare

then I tried the following command :

-bash-3.2# mount -F nfs -o vers=3 192.168.1.102:/home/ritwik/study /export/home/ritwik/linxShare

but got the following error :

nfs mount: 192.168.1.102: : RPC: Rpcbind failure - RPC: Timed out
nfs mount: retrying: /export/home/ritwik/linxShare
nfs mount: 192.168.1.102: : RPC: Rpcbind failure - RPC: Timed out
nfs mount: 192.168.1.102: : RPC: Rpcbind failure - RPC: Timed out
nfs mount: 192.168.1.102: : RPC: Rpcbind failure - RPC: Timed out

then I checked whether rpc is running :

-bash-3.2# ps -ef | grep rpc
daemon 339 1 0 23:28:42 ? 0:00 /usr/sbin/rpcbind
root 896 716 0 00:30:12 pts/2 0:00 grep rpc

which means rpc is running !!

Now I am trying to solve this problem... I'll post the solution asap.

4 comments:

  1. So, I am having the exact same issue. Did you ever figure it out???

    ReplyDelete
  2. fyi:

    just had the same problem - make sure to put up a hostname in the /etc/hosts on the solaris box for the nfs client - or proper resolving. solvedit immediately


    (saw your post while searchign solution on the web)

    ReplyDelete
  3. there are several RPC services. The best try to see them all by using chkconfig --list.

    You have to turn all of them.
    You need also to turn on all the nfs services like nfs.lock. Also use chkconfig.

    The best idea to manage the services under Fedora is "serviceconfig". It has to work.


    I have rather an other problem... on my linux computer I have "mount: 192.168.1.2:/export/home/Mich failed, reason given by server: Permission denied"

    ReplyDelete