# [SOLVED] mount.nfs: an incorrect mount option was specified

## Joseph_sys

I can not seem to make nfs to work.

I'm following instructions from:

http://en.gentoo-wiki.com/wiki/NFS/Server

```
 cat /etc/exports examples

# /etc/exports: NFS file systems being exported.  See exports(5).

/home/joseph 10.0.*.*(async,rw,no_subtree_check)
```

```
cat /etc/fstab

10.0.0.103:/home/joseph/   /home/joseph/mnt/syscon2/    nfs   defaults,users,noauto    0 0
```

nfs-utils is compiled without "nfsv4"

It starts OK, but when I try to mount it 

```
mount -t nfs 10.0.0.103:/home/joseph /home/joseph/mnt/syscon2

mount.nfs: an incorrect mount option was specified
```

 or 

```
mount /home/joseph/mnt/syscon2/

mount.nfs: an incorrect mount option was specified
```

Last edited by Joseph_sys on Sat Apr 23, 2011 10:28 pm; edited 1 time in total

----------

## Joseph_sys

```
rpcinfo -p 10.0.0.103

   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  39346  status

    100024    1   tcp  49886  status

    100005    1   udp  43549  mountd

    100005    1   tcp  47665  mountd

    100005    2   udp  54395  mountd

    100005    2   tcp  46436  mountd

    100005    3   udp  47309  mountd

    100005    3   tcp  40399  mountd

    100003    2   tcp   2049  nfs

    100003    3   tcp   2049  nfs

    100003    2   udp   2049  nfs

    100003    3   udp   2049  nfs

    100021    1   udp  40997  nlockmgr

    100021    3   udp  40997  nlockmgr

    100021    4   udp  40997  nlockmgr

    100021    1   tcp  33762  nlockmgr

    100021    3   tcp  33762  nlockmgr

    100021    4   tcp  33762  nlockmgr
```

----------

## bernd_b

Just a wild guess:

I added "vers=3" to my mount options in /etc/fstab.

At least it gave me luck.

https://forums.gentoo.org/viewtopic-t-844778-highlight-nfs.html

----------

## Joseph_sys

I've change fstab entry to:

```
10.0.0.103:/home/joseph/   /home/joseph/mnt/syscon2/    nfs   nfsvers=3,users,noauto    0 0
```

and I get: 

```
mount /home/joseph/mnt/syscon2/

mount.nfs: access denied by server while mounting 10.0.0.103:/home/joseph/
```

----------

## krinn

nfs-utils change behavior at some version that i forget, now it default to always try nfs4 first, the nfsv4 flag is there to add dependies for nfsv4 usage, but still nfsv4 will be use when querying a mount

try mount -t nfs 10.0.0.103:/home/joseph /home/joseph/mnt/syscon2 -v -o nfsvers=3,vers=3

----------

## Joseph_sys

 *krinn wrote:*   

> nfs-utils change behavior at some version that i forget, now it default to always try nfs4 first, the nfsv4 flag is there to add dependies for nfsv4 usage, but still nfsv4 will be use when querying a mount
> 
> try mount -t nfs 10.0.0.103:/home/joseph /home/joseph/mnt/syscon2 -v -o nfsvers=3,vers=3

 

No go: 

```
mount -t nfs 10.0.0.103:/home/joseph /home/joseph/mnt/syscon2 -v -o nfsvers=3,vers=3

mount.nfs: timeout set for Sat Apr 23 15:48:26 2011

mount.nfs: trying text-based options 'nfsvers=3,vers=3,addr=10.0.0.103'

mount.nfs: prog 100003, trying vers=3, prot=6

mount.nfs: trying 10.0.0.103 prog 100003 vers 3 prot TCP port 2049

mount.nfs: prog 100005, trying vers=3, prot=17

mount.nfs: trying 10.0.0.103 prog 100005 vers 3 prot UDP port 54976

mount.nfs: mount(2): Permission denied

mount.nfs: access denied by server while mounting 10.0.0.103:/home/joseph
```

----------

## Joseph_sys

 *bernd_b wrote:*   

> Just a wild guess:
> 
> I added "vers=3" to my mount options in /etc/fstab.
> 
> At least it gave me luck.
> ...

 

I've seen this link, it doesn't help.

Do you mean fstab entry like this:

```
10.0.0.103:/home/joseph   /home/joseph/mnt/syscon2    nfs   vers=3,nfsvers=3,users,noauto    0 0
```

Still same error: 

```
mount -v /home/joseph/mnt/syscon2/

mount.nfs: timeout set for Sat Apr 23 15:57:31 2011

mount.nfs: trying text-based options 'vers=3,nfsvers=3,addr=10.0.0.103'

mount.nfs: prog 100003, trying vers=3, prot=6

mount.nfs: trying 10.0.0.103 prog 100003 vers 3 prot TCP port 2049

mount.nfs: prog 100005, trying vers=3, prot=17

mount.nfs: trying 10.0.0.103 prog 100005 vers 3 prot UDP port 54976

mount.nfs: mount(2): Permission denied

mount.nfs: access denied by server while mounting 10.0.0.103:/home/joseph
```

----------

## Joseph_sys

SOLVED,

/etc/exports should be:

/home/joseph 10.0.0.0/255.255.0.0(async,rw,no_subtree_check)

The correct setting if somebody will encounter the same problem:

```
fstab:

...

10.0.0.103:/home/joseph   /home/joseph/mnt/syscon2    nfs   nfsvers=3,users,noauto    0 0
```

```
cat /etc/exports 

/home/joseph 10.0.0.0/255.255.0.0(async,rw,no_subtree_check)
```

----------

