View previous topic :: View next topic |
Author |
Message |
andrewwalker27 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/83826677472d02d3cd7c8.jpg)
Joined: 27 Jun 2005 Posts: 660
|
Posted: Wed Sep 15, 2010 8:44 pm Post subject: Can not mount nfs partition (SOLVED) |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
tony-curtis Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 20 May 2006 Posts: 111
|
Posted: Wed Sep 15, 2010 11:16 pm Post subject: |
|
|
What does Code: | rpcinfo -p 192.168.0.2 | say? Do you see portmapper and various NFS versions? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
andrewwalker27 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/83826677472d02d3cd7c8.jpg)
Joined: 27 Jun 2005 Posts: 660
|
Posted: Thu Sep 16, 2010 6:49 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
tony-curtis Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 20 May 2006 Posts: 111
|
Posted: Thu Sep 16, 2010 6:53 pm Post subject: |
|
|
Try telling mount explicitly to use nfs v3 (since that's the only one being offered by the server). |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
andrewwalker27 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/83826677472d02d3cd7c8.jpg)
Joined: 27 Jun 2005 Posts: 660
|
Posted: Thu Sep 16, 2010 7:37 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
andrewwalker27 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/83826677472d02d3cd7c8.jpg)
Joined: 27 Jun 2005 Posts: 660
|
Posted: Thu Sep 16, 2010 9:45 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
tony-curtis Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 20 May 2006 Posts: 111
|
Posted: Thu Sep 16, 2010 10:11 pm Post subject: |
|
|
I was just going to add something about nfsvers=3
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 |
|
![](templates/gentoo/images/spacer.gif) |
andrewwalker27 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/83826677472d02d3cd7c8.jpg)
Joined: 27 Jun 2005 Posts: 660
|
Posted: Fri Sep 17, 2010 7:58 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
krinn Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/gallery/Blade Runner/movie_blade_runner_howl.gif)
Joined: 02 May 2003 Posts: 7470
|
Posted: Fri Sep 17, 2010 10:05 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
overshoot n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/6396602064c3a18c2238c1.jpg)
Joined: 19 May 2002 Posts: 62 Location: Socorro, NM
|
Posted: Tue Mar 22, 2011 12:58 am Post subject: Found same problem today |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Seron Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9355648183e480daf5c105.jpg)
Joined: 31 Dec 2002 Posts: 293 Location: Malmö, Sweden
|
Posted: Tue Apr 05, 2011 2:09 pm Post subject: Re: Found same problem today |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|