Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can not mount nfs partition (SOLVED)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
andrewwalker27
l33t
l33t


Joined: 27 Jun 2005
Posts: 660

PostPosted: Wed Sep 15, 2010 8:44 pm    Post subject: Can not mount nfs partition (SOLVED) Reply with quote

I'm having a nightmare trying to get nfs working on my Gentoo box. I've set up a NAS box to export a directory which I can access from my laptop running Kubuntu but I can't get my Gentoo box to access it at all.
Here's what I get

athlon64 linux # mount 192.168.0.2:/home/fred /mnt/stora
mount.nfs: an incorrect mount option was specified
athlon64 linux #

This is exactly the same command I run with Kubuntu which works so I don't understand what is wrong with Gentoo.
I've installed nfs-utils with the following use flags
net-fs/nfs-utils-1.2.2-r2 USE="ipv6 nfsv3 nfsv4 tcpd -caps -kerberos"
I've also checked my kernel options are set correctly and the following daemons are running as default, netmount and nfsmount. I believe portmap is also required but is started by netmount?


The /etc/exports on the NAS are as follows

/home/fred 192.168.0.0/24(rw,anonuid=1003,anongid=1003,all_squash,no_root_squash)

and the /mnt/stora directory exists on my Gentoo box.



Anyone got any suggestions?


Last edited by andrewwalker27 on Thu Sep 16, 2010 10:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
tony-curtis
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2006
Posts: 111

PostPosted: Wed Sep 15, 2010 11:16 pm    Post subject: Reply with quote

What does
Code:
rpcinfo -p 192.168.0.2
say? Do you see portmapper and various NFS versions?
Back to top
View user's profile Send private message
andrewwalker27
l33t
l33t


Joined: 27 Jun 2005
Posts: 660

PostPosted: Thu Sep 16, 2010 6:49 pm    Post subject: Reply with quote

Looks like it's available on the NAS box ok

athlon64 fred # rpcinfo -p 192.168.0.2
program vers proto port service
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100003 3 udp 2049 nfs
100003 3 tcp 2049 nfs
100005 1 udp 2049 mountd
100005 3 udp 2049 mountd
100005 1 tcp 2049 mountd
100005 3 tcp 2049 mountd
athlon64 fred #
Back to top
View user's profile Send private message
tony-curtis
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2006
Posts: 111

PostPosted: Thu Sep 16, 2010 6:53 pm    Post subject: Reply with quote

Try telling mount explicitly to use nfs v3 (since that's the only one being offered by the server).
Back to top
View user's profile Send private message
andrewwalker27
l33t
l33t


Joined: 27 Jun 2005
Posts: 660

PostPosted: Thu Sep 16, 2010 7:37 pm    Post subject: Reply with quote

Not quite sure how you mean, I'm assuming this is explicitly setting nfs v3

mount -t nfs 192.160.0.2:/home/fred /mnt/stora

here's what I get as an error

mount.nfs: an incorrect mount option was specified
Back to top
View user's profile Send private message
andrewwalker27
l33t
l33t


Joined: 27 Jun 2005
Posts: 660

PostPosted: Thu Sep 16, 2010 9:45 pm    Post subject: Reply with quote

Upon further reading I think I understand what you meant!
I tried the following method and it worked correctly

mount -t nfs -o nfsvers=3 192.168.0.2:/home/fred /mnt/stora

This seems like a bug to me, or is it meant to do this? I'll mark this thread as solved as it seems to work but can anyone confirm that this is a bug so I can report it?
Back to top
View user's profile Send private message
tony-curtis
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2006
Posts: 111

PostPosted: Thu Sep 16, 2010 10:11 pm    Post subject: Reply with quote

I was just going to add something about nfsvers=3 :D

Your nfs-utils is built with nfsv4 support, so I suppose "nfs" translates to v4 by default unless you explicitly say otherwise. Seems like trying 4 then 3 automatically might be a good idea when both are configured, but I'm not familiar enough with the NFS specs.

BTW, a tcpdump watching the failed mount attempt would probably have spotted the v4/v3 mismatch. I would have suggested this if the rpcinfo output hadn't been what I expected.
Back to top
View user's profile Send private message
andrewwalker27
l33t
l33t


Joined: 27 Jun 2005
Posts: 660

PostPosted: Fri Sep 17, 2010 7:58 am    Post subject: Reply with quote

I re-compiled nfs-utils with -ntfsv4 flag but the problem still occurs, I'm pretty sure nfs4 isn't even compiled into the kernel I'm using. I'm thinking it must be a bug, surely it should be able to spot an nfs v3 without failing? How do I specify nfsv3 to an /etc/fstab by the way?

Can anyone verify this behavoiur or is it just my system that can't cope with nfs correctly?
Thanks for your help by the way, I've been struggling with this for days!
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Fri Sep 17, 2010 10:05 am    Post subject: Reply with quote

nfsserver mountpoint nfs nfsvers=3,rw... 0 0

try add -v to see, but default is to ask for v4 now. and the bug might comes from the server that don't answer to that unknown query.
nfs mount doesn't "detect" the server version, it try 4 and wait for a the server to tell him it can't.
i suppose it will try 3 next...

same for the "nfs" keyword, nfs was use to v3 and nfs4 for 4, but now a mount -t nfs always ask 4 at first.
Back to top
View user's profile Send private message
overshoot
n00b
n00b


Joined: 19 May 2002
Posts: 62
Location: Socorro, NM

PostPosted: Tue Mar 22, 2011 12:58 am    Post subject: Found same problem today Reply with quote

Updating nfs-tools, no other changes.

The fun part comes when you use NIS and autofs -- I'm still trying to figure out where to put the NFS version to force V3. Suggestions welcome.
Back to top
View user's profile Send private message
Seron
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 293
Location: Malmö, Sweden

PostPosted: Tue Apr 05, 2011 2:09 pm    Post subject: Re: Found same problem today Reply with quote

overshoot wrote:
Updating nfs-tools, no other changes.

The fun part comes when you use NIS and autofs -- I'm still trying to figure out where to put the NFS version to force V3. Suggestions welcome.

I had the same problem as the op and am able to mount now with autofs. I have this line in /etc/autofs/auto.net:
Code:
opts="-fstype=nfs,nfsvers=3,hard,intr,nodev,nosuid"

That file I believe comes with autofs and needs to be made executable.
_________________
man cannot be brave without being afraid
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum