Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Can not mount nfs partition (SOLVED)

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
andrewwalker27
l33t
l33t
User avatar
Posts: 660
Joined: Mon Jun 27, 2005 6:56 pm

Can not mount nfs partition (SOLVED)

  • Quote

Post by andrewwalker27 » Wed Sep 15, 2010 8:44 pm

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.
Top
tony-curtis
Tux's lil' helper
Tux's lil' helper
Posts: 111
Joined: Sat May 20, 2006 11:52 pm

  • Quote

Post by tony-curtis » Wed Sep 15, 2010 11:16 pm

What does

Code: Select all

rpcinfo -p 192.168.0.2
say? Do you see portmapper and various NFS versions?
Top
andrewwalker27
l33t
l33t
User avatar
Posts: 660
Joined: Mon Jun 27, 2005 6:56 pm

  • Quote

Post by andrewwalker27 » Thu Sep 16, 2010 6:49 pm

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 #
Top
tony-curtis
Tux's lil' helper
Tux's lil' helper
Posts: 111
Joined: Sat May 20, 2006 11:52 pm

  • Quote

Post by tony-curtis » Thu Sep 16, 2010 6:53 pm

Try telling mount explicitly to use nfs v3 (since that's the only one being offered by the server).
Top
andrewwalker27
l33t
l33t
User avatar
Posts: 660
Joined: Mon Jun 27, 2005 6:56 pm

  • Quote

Post by andrewwalker27 » Thu Sep 16, 2010 7:37 pm

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
Top
andrewwalker27
l33t
l33t
User avatar
Posts: 660
Joined: Mon Jun 27, 2005 6:56 pm

  • Quote

Post by andrewwalker27 » Thu Sep 16, 2010 9:45 pm

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?
Top
tony-curtis
Tux's lil' helper
Tux's lil' helper
Posts: 111
Joined: Sat May 20, 2006 11:52 pm

  • Quote

Post by tony-curtis » Thu Sep 16, 2010 10:11 pm

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.
Top
andrewwalker27
l33t
l33t
User avatar
Posts: 660
Joined: Mon Jun 27, 2005 6:56 pm

  • Quote

Post by andrewwalker27 » Fri Sep 17, 2010 7:58 am

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!
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Fri Sep 17, 2010 10:05 am

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.
Top
overshoot
n00b
n00b
User avatar
Posts: 62
Joined: Sun May 19, 2002 1:54 pm
Location: Socorro, NM

Found same problem today

  • Quote

Post by overshoot » Tue Mar 22, 2011 12:58 am

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.
Top
Seron
Apprentice
Apprentice
User avatar
Posts: 293
Joined: Tue Dec 31, 2002 11:49 pm
Location: Malmö, Sweden

Re: Found same problem today

  • Quote

Post by Seron » Tue Apr 05, 2011 2:09 pm

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: Select all

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
Top
Post Reply

11 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy