Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mount.nfs: an incorrect mount option was specified
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
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5282

PostPosted: Tue Jan 03, 2012 4:03 pm    Post subject: mount.nfs: an incorrect mount option was specified Reply with quote

I can't figure out why this is happening. I seem to have everything in place.

Code:

Tchaikovsky audiodef # mount -t nfs 192.168.1.3:/data /home/audiodef/Beethoven
mount.nfs: an incorrect mount option was specified


nfs is running on both machines. /etc/exports exists on the host machine:

Code:

/data 192.168.0.0/255.255.0.0(async,rw,no_subtree_check)


nfs is compiled into the kernel.

The exact same setup works the other way around between these two machines. I'm at a loss. 8O
_________________
Gentoo Studio: http://gentoostudio.org
Facebook: http://www.facebook.com/gentoostudio
G+: https://plus.google.com/113947758237122861689/posts
Pappy's Kernel Seeds: http://kernel-seeds.org
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 4054
Location: USA

PostPosted: Tue Jan 03, 2012 9:51 pm    Post subject: Reply with quote

Subscribing to this thread. I ran into this issue too but at one point I came up with a workaround, but it didn't stick. Silly thing is that it was working fine before but after either a nfsd update or something (perhaps portmap/rpc.bind?) it broke.

It also could have had something to do with default nfs versions (v3 vs v4?) Need to look into this some more...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4399

PostPosted: Wed Jan 04, 2012 1:10 am    Post subject: Reply with quote

You need to force nfsv3 to mount it with -o nfsvers=3,vers=3
the -t nfs was for nfsv3 and 2 and -t nfs4 for nfsv4, but now -t nfs == nfsv4 per default.

If you use a nfsv4 server (as it's the default now), then your mount point should have a root (define by fsid=0) and your mount point attach to it.

And the root mount point will be name /
So if /data is export as nfsv4 then your mount point is / and not /data

Here's my config, this might help you better seeing one working, note that /export/distfiles is use with version 3 while other use version 4
Code:
# /etc/exports: NFS file systems being exported.  See exports(5).
/export 192.168.0.0/24(rw,sec=sys,fsid=0,no_subtree_check,async,no_root_squash,nohide,anonuid=250,anongid=250)
/export/distfiles 192.168.0.0/24(rw,root_squash,no_subtree_check,nohide,anonuid=250,anongid=250,secure,nohide)
/export/kernel 192.168.0.0/24(rw,no_subtree_check,nohide)
/export/portageshare 192.168.0.0/24(rw,nohide,sync,all_squash,secure,no_subtree_check)


In nfsv3 you can mount it with server:/export/distfiles
In nfsv4 you can mount it with server:/distfiles (and /export is the nfs root that can be mount using server:/ )

and the fstab on the client
Code:
faramir:/export/distfiles   /mnt/faramir/distfiles   nfs          rw,users,nfsvers=3,vers=3                0 0
faramir:/portageshare           /mnt/faramir/portageshare      nfs4       rw,users    0 0


and the mount result
Code:
mount | grep faramir
faramir:/export/distfiles on /mnt/faramir/distfiles type nfs (rw,users,noexec,nosuid,nodev,nfsvers=3,vers=3,addr=192.168.0.6)
faramir:/portageshare on /mnt/faramir/portageshare type nfs4 (rw,users,noexec,nosuid,nodev,addr=192.168.0.6,clientaddr=192.168.0.4)


You can then try
v3: mount -t nfs 192.168.1.3:/data /home/audiodef/Beethoven -o nfsvers=3,vers=3
or
v4: mount -t nfs4 192.168.1.3:/ /home/audiodef/Beethoven

I hope it will help you guys.
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