LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 01-20-2013, 01:57 PM   #1
shylock_1
LQ Newbie
 
Registered: Oct 2009
Posts: 25

Rep: Reputation: 0
Fedora 14 NFS connection



Hi Forum,

I seems to thrown every lock.stock, barrel and sink to get connected with Fedora 14 TWO boxes. Since we switching from RH5 to Fedora 14 (cheap and free)'

SELinux currently disabled on both client and server.


The files /etc/host.allow and /etc/host.deny are unmodified on both
machine client n server.
The make up of /etc/hosts For SERVER
Code:
127.0.0.1	localhost.localdomain	localhost	localhost4
::1	tomcat.faygrase.com	eagle	localhost6.localdomain6	localhost6
CLIENT
======
Code:
127.0.0.1	localhost.localdomain	localhost	localhost4
::1	eagle.faygrase.com	eagle	localhost6.localdomain6	localhost6
A SERVER FIRST
==============
I have following configuration of my /etc/exports file
Code:
/home/mydir      192.168.1.*(fsid=0, rw, all_root_squash, async)
/home/mydir1     192.168.1.*(fsid=0, rw, all_root_squash, async)

The rpcinfo report as follow:
root# rpcinfo -p 192.168.106

   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp    662  status
    100024    1   tcp    662  status
    100011    1   udp    875  rquotad
    100011    2   udp    875  rquotad
    100011    1   tcp    875  rquotad
    100011    2   tcp    875  rquotad
    100021    1   udp  32769  nlockmgr
    100021    3   udp  32769  nlockmgr
    100021    4   udp  32769  nlockmgr
    100021    1   tcp  32803  nlockmgr
    100021    3   tcp  32803  nlockmgr
    100021    4   tcp  32803  nlockmgr
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    2   tcp   2049  nfs_acl
    100227    3   tcp   2049  nfs_acl
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    2   udp   2049  nfs_acl
    100227    3   udp   2049  nfs_acl
    100005    1   udp    892  mountd
    100005    1   tcp    892  mountd
    100005    2   udp    892  mountd
    100005    2   tcp    892  mountd
    100005    3   udp    892  mountd
    100005    3   tcp    892  mountd
This gives clear indication that the NFS and its all related services i.e. rpcbind, rpcidmapd, nfslock,netfs etc is running in normal state. The following repeat run reflect.
Code:
Shutting down NFS mountd:                                  [  OK  ]
Shutting down NFS daemon:                                  [  OK  ]
Shutting down NFS quotas:                                  [  OK  ]
Shutting down NFS services:                                [  OK  ]
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]
This reflect the NFS SERVEER is up and running...

The CLIENT
===========
At client side simply enabled service as follow:

Code:
root# service nfs restart      (response received by)

Shutting down NFS mountd:                                  [  OK  ]
Shutting down NFS daemon:                                  [  OK  ]
Shutting down NFS quotas:                                  [  OK  ]
Shutting down NFS services:                                [  OK  ]
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]

root# service rpcbind restart    (response as follow)

Stopping rpcbind:                                          [  OK  ]
Starting rpcbind:                                          [  OK  ]

root# rpcinfo -p     (response as follow)

   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100011    1   udp    875  rquotad
    100011    2   udp    875  rquotad
    100011    1   tcp    875  rquotad
    100011    2   tcp    875  rquotad
    100021    1   udp  32769  nlockmgr
    100021    3   udp  32769  nlockmgr
    100021    4   udp  32769  nlockmgr
    100021    1   tcp  32803  nlockmgr
    100021    3   tcp  32803  nlockmgr
    100021    4   tcp  32803  nlockmgr
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    2   tcp   2049  nfs_acl
    100227    3   tcp   2049  nfs_acl
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    2   udp   2049  nfs_acl
    100227    3   udp   2049  nfs_acl
    100005    1   udp    892  mountd
    100005    1   tcp    892  mountd
    100005    2   udp    892  mountd
    100005    2   tcp    892  mountd
    100005    3   udp    892  mountd
    100005    3   tcp    892  mountd
This coherently indicate the client is up and running correctly

When I issue the command:

Code:
root# mount.nfs 192.168.1.106:/home/mydir     /mnt/tom -v

client response:

mount.nfs: timeout set for Fri Jan 18 18:54:54 2013
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.106,clientaddr=192.168.1.64'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 192.168.1.106:/home/mydir
Connection between client and server never get established!!!

When I try to do showmount:

Code:
root#showmount -e 192.168.1.106
Export list for 192.168.1.106:
/home/mydir   192.168.1.0
/home/mydir1 192.168.1.0
This gives clear indication client trying to connect server but keep failing.

I read entire Fedora Project forum for the answer but all avail. I wonder if any body have remedy for this problem, please guide me or put me in right direction.

Thank you,

Shy

 
Old 01-20-2013, 04:09 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
Fedora 14 support ended 2011-12-09. The first thing you should do is update to a current release, Fedora 18, to avoid the tens of thousands of issues that have been resolved since then.
 
Old 01-20-2013, 04:44 PM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Code:
mount.nfs 192.168.1.106:/home/mydir /mnt/tom
What are the permissions of the mydir and tom dirrectories? Do the two computers use the same UIDs for the same user?

Your hosts files have the names in the IPv6 entries for localhost. I don't know if this is proper.
Code:
127.0.0.1 localhost.localdomain localhost localhost4
 :1 tomcat.faygrase.com eagle localhost6.localdomain6 localhost6
This entry is for tomcat, but has name entry for eagle. That is how one blocks websites using the hosts file.

You have 2 enties with fsid=0 in /etc/exports. Only one should be nfs-root.

You should bind mount the directories to export over directories which are subdirectories of the nfs-root directory.
E.G. /srv/nfs/mydir and /srv/nfs/mydir1. Then /srv/nfs/ will be the nfs-root with the fsid=0 entry in /etc/exports.

On the client, the fstab entries will look like
tomcat:mydir /mnt/mydir nfs
tomcat:mydir1 /mnt/mydir1 nfs
Notice how the nfsroot part isn't included, so you just use hostname:share instead of tomcat:/srv/nfs/tomcat.

You can use options such as nosuid,noexec,ro on the bind mount options that aren't present for the from directory. Bind mounts allow you to also share a subdirectory with freer permissions without needing to grant others rx permissions to your HOME directory.

There is a root_squash and an all_squash option. I don't think there is an all_root_squash option.

Check the logs after a mount attempt fails.
 
Old 01-21-2013, 06:11 AM   #4
shylock_1
LQ Newbie
 
Registered: Oct 2009
Posts: 25

Original Poster
Rep: Reputation: 0
Same old problem...


I modified the /etc/hosts files at server and client which is now:
Code:
127.0.0.1       localhost.localdomain   localhost       localhost4
::1     localhost6.localdomain6 localhost6
Also modified the /etc/exports as follow:

Code:
/home/reposit          192.168.1.*(rw,no_root_squash,sync)
from client ran following

Code:
root# showmount -e 192.162.1.64
Export list 192.168.1.64
/home/reposit  192.168.1.*
I tried to mount and following
Code:
root# mount -t nfs 192.168.1.64:/home/reposit  /mnt -v 
mount.nfs: timeout set for Mon Jan 21 12:04:26 2013
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.64,clientaddr=192.168.1.106'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 192.168.1.64:/home/reposit
Currently I am mounting manually as and when required, eventually some stage I would like to mount automatically using fstab facility.

ON BOTH Machine the user id IS SAME AS WITH ID 500 (same user name or login usernamd such as testuser exist)

But mounting process under the root or su

Thank you,
 
Old 01-21-2013, 06:36 AM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Check if these ports are open:
Code:
111/tcp   open  rpcbind
2049/tcp  open  nfs
This is for nfs v4 which uses TCP. You took out fsid=0 entry, and didn't bind mount the directories to export. Maybe you want to add the "nfsvers=3" option if you want to use nfs v3 instead of nfs v4.

Since the server rejected the mount attempt, you should check it's logs as well. You posted the log entry from the client side.
 
Old 01-21-2013, 07:12 AM   #6
shylock_1
LQ Newbie
 
Registered: Oct 2009
Posts: 25

Original Poster
Rep: Reputation: 0
Same old problem... RESOLVED... SUCCESSFULLY

**************** RESOLVED SUCCESSFULLY ****************


FOLLOWING FIX SEEMS TO BE WORK FOR CONNECTION WITH TWO F14 BOXES.


HI DROLLI

it seems to be your solution made a correct fix of my long tormented problem!!! Thank you.

Since I had similar login id and user names on both computers and very identical setup as development PC

It seems to be the correction as follow: for the SERVER
Code:
/home/reposit        192.168.1.0/255.255.255.0(rw, no_root_squash, sync)
CLIENT
=======
Code:
root# mount -t nfs 192.168.1.64:/home/reposit   /mnt/eagle -v 
mount,nfs timeout set for Mon Jan 21 12:55:38 2013
mount.nfs trying text-based options vers=4,addr=192.168.1.64,clientaddr=192.168.1.106'
192.168.1.64:/home/reposit on /mnt/eagle type nfs (rw)

root# ls -al /mnt/eagle
test    0 xxxx xxxx
Thanks again connection is working.
shy
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] NFS connection issues lleb Linux - Newbie 17 01-10-2013 04:37 PM
Can't nfs mount from Fedora 16 NFS server. wdli Fedora 18 03-13-2012 01:59 PM
NFS connection question slackhack Linux - Networking 9 05-30-2007 09:57 AM
NFS Connection Issue gamradtk Linux - Networking 0 09-10-2005 11:19 AM
NFS: Connection Problem sandgroper Linux - Networking 2 08-05-2004 12:52 AM


All times are GMT -5. The time now is 11:56 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration