# Can't access NAS via nfs (SOLVED)

## andrewwalker27

I'm having major trouble connecting my NAS box to my Gentoo box via nfs. Here's the error I get

athlon64 fred # mount -t nfs 192.168.0.9:/mnt/ide3/fred /home/fred/nfs

mount.nfs: an incorrect mount option was specified

athlon64 fred #

The mount point is correct, I can telnet into the NAS box to check and can access the files so why is nfs complaining? I've checked portmap is working and I'm logged in as root. I've even checked the NAS box /etc/exports script, here it is.

/mnt/ide3/fred 192.168.0.0/255.255.255.0(rw,root_squash) 192.168.0.3(rw,root_squash)

Anyone know where to go from here? I can access the NAS box with samba ok but nfs is driving me mad. I'm running ~x86_64 and kernel 2.6.29-gentoo-r4 but this problem has been going on for months. I can access the NAS via nfs on a Ubuntu box so why not Gentoo?

Any help would be greatly appreciated!Last edited by andrewwalker27 on Mon May 18, 2009 6:29 pm; edited 1 time in total

----------

## Hu

What is the output of rc-update show | nl ; emerge --pretend --verbose net-fs/nfs-utils on the Gentoo client?  Are any packets sent from the Gentoo machine to the NAS when you run the mount command?  Can the Gentoo system mount shares from any other system, such as the Ubuntu client?

----------

## cyrillic

 *andrewwalker27 wrote:*   

> I'm logged in as root ... 

 

 */etc/exports wrote:*   

> ... root_squash 

 

Could permissions have something to do with the problem you are having ?

----------

## Hu

That may cause him problems later, but root squashing should only be meaningful when root tries to access a file/directory exported via the NFS mount.  So far, the NFS mount has not even completed, so he has not gotten far enough for root squashing to break anything.

----------

## Sven Vermeulen

What information do you get when you add the -v option (to have mount be more verbose)?

----------

## andrewwalker27

Thanks for the response, sorry it's taken me so long to reply!

Here's the info as requested

athlon64 fred # rc-update show | nl ; emerge --pretend --verbose net-fs/nfs-utils  

     1               bootmisc |        boot                                        

     2                   fsck |        boot                                        

     3               hostname |        boot                                        

     4                   root |        boot                                        

     5                    gpm |             default                                

     6                  local |             default nonetwork                      

     7             localmount |        boot                                        

     8                   swap |        boot                                        

     9                 sysctl |        boot                                        

    10                urandom |        boot                                        

    11                hwclock |        boot                                        

    12            consolefont |        boot

    13                keymaps |        boot

    14                modules |        boot

    15                   mtab |        boot

    16                   sshd |             default

    17                 procfs |        boot

    18           termencoding |        boot

    19                 net.lo |        boot

    20                 hdparm |        boot

    21              syslog-ng |             default

    22             vixie-cron |             default

    23                hotplug |             default

    24                    xdm |             default

    25                   dbus |             default

    26                  cupsd |             default

    27                  samba |             default

    28                   hald |             default

    29                   udev |                               sysinit

    30                  lircd |             default

    31                portmap |             default

    32                hddtemp |             default

    33                   ntpd |             default

    34             lm_sensors |             default

    35             ntp-client |             default

    36                  devfs |                               sysinit

    37                  acpid |             default

    38                 cpudyn |             default

    39          device-mapper |        boot

    40             fbcondecor |        boot default

    41               net.eth0 |             default

    42              lcd4linux |             default

    43                  dmesg |                               sysinit

    44              savecache |                                       shutdown

    45              killprocs |                                       shutdown

    46               mount-ro |                                       shutdown

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] net-fs/nfs-utils-1.1.6  USE="tcpd -kerberos -nonfsv4" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

athlon64 fred #

I've tried re-building nfs-utils but no change.

The -v option doesn't anything more useful I'm afraid.

athlon64 fred #

mount -v -t  nfs 192.168.0.9:/mnt/ide3/fred /home/fred/nfs

mount.nfs: timeout set for Sun May 17 18:11:12 2009

mount.nfs: text-based options: 'addr=192.168.0.9'

mount.nfs: mount(2): Operation not supported

mount.nfs: an incorrect mount option was specified

athlon64 fred #

I'm out of ideas!

----------

## Nerevar

Confirm you have support built into your kernel:

```
grep NFS /usr/src/linux/.config
```

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

----------

## andrewwalker27

Looks like it is,

CONFIG_NFS_FS=y

CONFIG_NFS_V3=y

# CONFIG_NFS_V3_ACL is not set

# CONFIG_NFS_V4 is not set

CONFIG_ROOT_NFS=y

CONFIG_NFSD=y

CONFIG_NFSD_V3=y

# CONFIG_NFSD_V3_ACL is not set

# CONFIG_NFSD_V4 is not set

CONFIG_NFS_COMMON=y

----------

## krinn

result of 

```
rpcinfo -p 192.168.0.9
```

----------

## andrewwalker27

Here we are

athlon64 fred # rpcinfo -p 192.168.0.9

   program vers proto   port

    100000    2   tcp    111  portmapper

    100000    2   udp    111  portmapper

    100003    2   udp   2049  nfs

    100003    3   udp   2049  nfs

    100021    1   udp   1024  nlockmgr

    100021    3   udp   1024  nlockmgr

    100021    4   udp   1024  nlockmgr

    100005    1   udp    600  mountd

    100005    1   tcp    603  mountd

    100005    2   udp    600  mountd

    100005    2   tcp    603  mountd

    100005    3   udp    600  mountd

    100005    3   tcp    603  mountd

athlon64 fred #

----------

## krinn

ok then try 

```
mount -v -o proto=udp -t nfs 192.168.0.9:/mnt/ide3/fred /home/fred/nfs 
```

----------

## andrewwalker27

Well don't know quite why but that worked!

Any idea what this proves?

athlon64 fred # mount -v -o proto=udp -t nfs 192.168.0.9:/mnt/ide3/fred /home/fred/nfs

mount.nfs: timeout set for Sun May 17 22:17:01 2009

mount.nfs: text-based options: 'proto=udp,addr=192.168.0.9'

192.168.0.9:/mnt/ide3/fred on /home/fred/nfs type nfs (rw,proto=udp)

athlon64 fred #

----------

## krinn

 *andrewwalker27 wrote:*   

> 
> 
>     100003    2   udp   2049  nfs
> 
>     100003    3   udp   2049  nfs
> ...

 

It prove you have a dirty nas that should also handle tcp instead of only udp

you should have seen

```
    100003    2   udp   2049  nfs

    100003    3   udp   2049  nfs

    100003    2   tcp   2049  nfs

    100003    3   tcp   2049  nfs

```

this is a know bug, that should have been fix in nfs-utils, the proto detectioin is bork because the mountd in your NAS do handle tcp

----------

## andrewwalker27

Many thanks, should I report this as a bug even though it's a known one?

I'm using a 35HD-DUAL-NAS if anyone else is following this thread (centroid chipset and sausalito firmware).

 I've heard a rumour Debian can be run on this box, maybe that may be a good solution!

----------

## krinn

i'm not quiet sure what was the fix.

2 issues were found : issue 1: can't mount without udp, issue2: crash when detecting.

So it was fix, but i don't know witch one was fix, considering your case, i suppose the crash was fix, but not the proto detection.

As far as i know, using udp doesn't disturb operations, it's just you have to force the proto to udp (witch is nothing to do when you know you should do it, can't really say adding -o proto=udp or proto=udp in fstab is something hard to do  :Very Happy:  )

I don't have a nas personnaly, but if you think this might cause trouble to many users, you could still file bug it, i suppose it will endup in vapier's hands and he kick ass at nfs trouble.

a won't fix/invalid won't kill you no ?

edit: at least, adding solve to your thread will help next nas user find that thread got a solve with a nas problem

----------

