LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-01-2011, 09:27 AM   #1
blue_bob
LQ Newbie
 
Registered: Jan 2011
Posts: 13

Rep: Reputation: 0
NFS


Hello,

I'm running an NFS Server on my Fedora machine and trying to mount it on my OpenSuse netbook.Right now I'm getting a "permission denied error" when I try to mount NFS on my netbook. (Yesterday I could mount, but could only read not write... strange)

my Servers IP is 192.168.1.45
my Netbooks IP is 192.168.1.42

/etc/export on Server
Code:
/home/bob/Music 192.168.1.42(rw,no_root_squash)
/etc/hosts.allow on Server
Code:
sshd: 192.168.1.0/255.255.255.0

nfsd: ALL
portmap: ALL
mountd: ALL
/etc/hosts.deny on Server is empty

mount command on my netbook
Code:
mount -v 192.168.1.45:/home/bob/Music /home/bob/nfs
mount: no type was given - I'll assume nfs because of the colon
mount.nfs: timeout set for Sat Jan  1 16:16:34 2011
mount.nfs: trying text-based options 'nfsvers=4,addr=192.168.1.45,clientaddr=192.168.1.42'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 192.168.1.45:/home/bob/Music
Thanks for your help
 
Old 01-01-2011, 10:06 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Which version of nfs are you running? For v4 you must specify "-t nfs4" in mount command. Are you running firewall on the client or server? For the test is better to disable hosts.allow by renaming this file. Check also on the client machine:
Code:
rpcinfo  -p 192.168.1.45

Last edited by eSelix; 01-01-2011 at 10:09 AM.
 
Old 01-01-2011, 10:27 AM   #3
blue_bob
LQ Newbie
 
Registered: Jan 2011
Posts: 13

Original Poster
Rep: Reputation: 0
I am running version 4, specifying the format with -t nfs4 did not help.

The firewall does have an exception for nfs, (after all it did work a bit this morning).

On my Netbook
Code:
/home/bob # rpcinfo  -p 192.168.1.45
rpcinfo: can't contact portmapper: RPC: Remote system error - No route to host
/home/bob # rpcinfo  -p 192.168.1.42
   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
On my Server:
Code:
[root@server bob]# rpcinfo  -p 192.168.1.45
   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  56808  status
    100024    1   tcp  52766  status
    100021    1   udp  57945  nlockmgr
    100021    3   udp  57945  nlockmgr
    100021    4   udp  57945  nlockmgr
    100021    1   tcp  37682  nlockmgr
    100021    3   tcp  37682  nlockmgr
    100021    4   tcp  37682  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  44029  mountd
    100005    1   tcp  42055  mountd
    100005    2   udp  37126  mountd
    100005    2   tcp  44285  mountd
    100005    3   udp  33530  mountd
    100005    3   tcp  36680  mountd
[root@server bob]# rpcinfo  -p 192.168.1.42
(kinda hung up)
 
Old 01-01-2011, 11:09 AM   #4
chickenjoy
Member
 
Registered: Apr 2007
Distribution: centos,rhel, solaris
Posts: 239

Rep: Reputation: 30
Code:
/home/bob # rpcinfo  -p 192.168.1.45
rpcinfo: can't contact portmapper: RPC: Remote system error - No route to host
Can you check connectivity between your netbook and your fedora server? like can you ping the server?
 
Old 01-01-2011, 11:17 AM   #5
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Also check
Code:
route -n
iptables -S
on both server and client. They are physically connected through switch or router? If router check these command also on it.
 
Old 01-01-2011, 02:39 PM   #6
grim76
Member
 
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 308

Rep: Reputation: 50
You are getting a permissions denied. Make sure that the uids match on both ends.
 
Old 01-01-2011, 05:05 PM   #7
blue_bob
LQ Newbie
 
Registered: Jan 2011
Posts: 13

Original Poster
Rep: Reputation: 0
I can configure my Server with SSH form my netbook so the connection is fine
What do you mean with user id? How I have to make them match?
 
Old 01-01-2011, 05:52 PM   #8
grim76
Member
 
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 308

Rep: Reputation: 50
NFS works properly with the uids matching on both machines.

id <username>

There should be a uid entry. Make sure that they match on the systems that you are using NFS to and from.
 
Old 01-01-2011, 06:02 PM   #9
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379

Rep: Reputation: 38
Make sure you nfs client services are running. Did you use Yast2 to set up client?
 
Old 01-01-2011, 07:53 PM   #10
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Before checking uids and permissions, first you must get proper response on client machine for
Code:
rpcinfo  -p 192.168.1.45
Now you get "no route to host", portmapper can't even connect to your server to establish nfs connection. This very likely means that your firewall block it, did you enabled port 111 and 2049 on server and client?

Check also on the client:
Code:
ps -A | grep rpc
For me I must enabled idmap for nfs working.

Last edited by eSelix; 01-01-2011 at 08:10 PM.
 
Old 01-01-2011, 08:44 PM   #11
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379

Rep: Reputation: 38
also, on the client
Code:
showmount -e 192.168.1.45
 
Old 01-02-2011, 09:42 AM   #12
blue_bob
LQ Newbie
 
Registered: Jan 2011
Posts: 13

Original Poster
Rep: Reputation: 0
Okay UIDs dont match. Port 111 was blocked by the firewall, but 2049 was not.

How do I have to set up my NFS Client?
 
Old 01-02-2011, 09:58 AM   #13
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Please post the output of commands from post #10 and #11.

Last edited by eSelix; 01-02-2011 at 09:59 AM.
 
Old 01-02-2011, 10:03 AM   #14
blue_bob
LQ Newbie
 
Registered: Jan 2011
Posts: 13

Original Poster
Rep: Reputation: 0
Code:
/home/bob # rpcinfo  -p 192.168.1.45   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  35202  status
    100024    1   tcp  40415  status
    100021    1   udp  52340  nlockmgr
    100021    3   udp  52340  nlockmgr
    100021    4   udp  52340  nlockmgr
    100021    1   tcp  34639  nlockmgr
    100021    3   tcp  34639  nlockmgr
    100021    4   tcp  34639  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  42489  mountd
    100005    1   tcp  59454  mountd
    100005    2   udp  53808  mountd
    100005    2   tcp  58140  mountd
    100005    3   udp  53557  mountd
    100005    3   tcp  59449  mountd
Code:
/home/bob # ps -A | grep rpc
 1754 ?        00:00:00 rpcbind
 8165 ?        00:00:00 rpciod/0
19474 ?        00:00:00 rpciod/1
Code:
showmount -e 192.168.1.45
clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)
 
Old 01-02-2011, 10:56 AM   #15
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379

Rep: Reputation: 38
Have you run this on the client?
Code:
yast2 -i nfs-client
Here is a nice Opensus 11.3 NFS tutorial
http://www.howtoforge.com/setting-up...-opensuse-11.3
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] NFS mount fails (times out): NFS server is in DMZ, NFS client is in intranet Hiroshi Linux - Networking 2 05-24-2010 10:22 AM
nfs server on ubuntu doesn't play nice with nfs client on solaris mathiraj Linux - Networking 11 09-15-2009 02:08 PM
LXer: Run your NFS server in the user address space with NFS-GANESHA LXer Syndicated Linux News 0 11-27-2008 04:40 AM
Allowing NFS in IPTABLES: Fix port for NFS Lock Manager Swakoo Linux - General 10 08-25-2006 05:24 AM
NFS client = Linux, NFS server = Mac OS X Tiger --> Hell of a problem make Linux - Networking 9 03-10-2006 05:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:00 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration