# nfs mount problem

## thecooptoo

server:

```
grenada log # grep ^[0-9A-Za-z] /etc/shorewall/rules

ACCEPT  loc             fw              tcp     53

ACCEPT  loc             fw              tcp     68

ACCEPT  all             all             tcp     22

ACCEPT  loc             fw              tcp     25

ACCEPT  all             all             tcp     80

ACCEPT  all             all             tcp     10000

AllowSMB  fw       loc

AllowSMB  loc      fw

DROP    net             fw              icmp    8

ACCEPT          loc     fw      udp    111

ACCEPT          loc     fw      tcp     111

ACCEPT          loc     fw      udp    2049

ACCEPT          loc     fw      tcp     2049

ACCEPT          loc     fw      udp    32765:32770

grenada log # rpcinfo -p

   program vers proto   port

    100000    2   tcp    111  portmapper

    100000    2   udp    111  portmapper

    100024    1   udp  32768  status

    100024    1   tcp  32768  status

    100021    1   udp  32770  nlockmgr

    100021    3   udp  32770  nlockmgr

    100021    1   tcp  32769  nlockmgr

    100021    3   tcp  32769  nlockmgr

    100003    2   udp   2049  nfs

    100003    2   tcp   2049  nfs

    100005    1   udp    914  mountd

    100005    1   tcp    917  mountd

    100005    2   udp    914  mountd

    100005    2   tcp    917  mountd

    100005    3   udp    914  mountd

    100005    3   tcp    917  mountd

grenada log # cat /etc/exports |grep tmp

/tmp    192.168.0.0/24(rw,async,no_root_squash)

```

client 

```
dads# mount -t nfs grenada:/tmp   /mnt/tmp

mount: grenada:/tmp failed, reason given by server: Permission denied

```

then server log 

```
grenada log # tail -n1 /var/log/messages

Aug 16 15:51:28 grenada rpc.mountd: authenticated mount request from 192.168.0.8:685 for /tmp (/tmp)

grenada log #         
```

what am I missing ?

----------

## patsonrt1

I recently had the same issue. I changed my exports to read  /tmp 192.168.0.0/255.255.255.0 instead of /tmp 192.168.0.0/24 and it worked. 

-HTH

----------

## thecooptoo

done that  

no different:( 

also server 

```

grenada ~ # cat /etc/hosts.allow

portmap: 192.168.0.0/255.255.255.0

mountd: 192.168.0.0/255.255.255.0

statd: 192.168.0.0/255.255.255.0

```

```
grenada ~ # cat /etc/exports |grep tmp

/tmp    192.168.0.0/255.255.255.0(rw,async,no_root_squash)

grenada ~ #  
```

```

grenada ~ # tail -n1 /var/log/messages

Aug 17 21:28:15 grenada rpc.mountd: authenticated mount request from 192.168.0.8:890 for /tmp (/tmp)

grenada ~ #                         

```

----------

## thecooptoo

still trying to get this sorted . Does the nfsd error mean anything ?

other than that i still get a permssion denied error , even with the firewall off.

I can mount a client share from the server , but cant mount a server share from the client 

```
grenada paul # /etc/init.d/portmap restart

 * Saving portmap table ...                                                                                                                      [ ok ]

 * Unmounting network filesystems ...                                                                                                            [ ok ]

 * Stopping NFS mountd ...                                                                                                                       [ ok ]

 * Stopping NFS daemon ...                                                                                                                       [ ok ]

 * Unexporting NFS directories ...                                                                                                               [ ok ]

 * Stopping NFS statd ...

 * Error stopping NFS statd                                                                                                                      [ !! ]

 * Stopping portmap ...                                                                                                                          [ ok ]

 * Starting portmap ...                                                                                                                          [ ok ]

 * Reloading portmap table ...                                                                                                                   [ ok ]

 * Exporting NFS directories ...                                                                                                                 [ ok ]

 * Starting NFS daemon ...                                                                                                                       [ ok ]

 * Starting NFS mountd ...                                                                                                                       [ ok ]

 * Mounting network filesystems ...                                            
```

----------

## thecooptoo

bit more experimenting

server

```

grenada / # cat /etc/exports |grep -v '#'

/var/www        192.168.0.0/24(rw)

grenada / #                                 
```

client 

```
dads / # mount -t nfs 192.168.0.1:/var/www    /mnt/GRENADA

```

mounts it 

but 

```

dads apache2 # mount -t nfs grenada:/var/www    /mnt/GRENADA

mount: grenada:/var/www failed, reason given by server: Permission denied

dads apache2 #                   
```

even though 

```
dads apache2 # ping grenada

PING grenada.home.nw(192.168.0.1) 56(84) bytes of data.

64 bytes from vexim (192.168.0.1): icmp_seq=1 ttl=64 time=0.506 ms

64 bytes from vexim (192.168.0.1): icmp_seq=2 ttl=64 time=0.494 ms

64 bytes from vexim (192.168.0.1): icmp_seq=3 ttl=64 time=0.484 ms

--- grenada.home.nw ping statistics ---

3 packets transmitted, 3 received, 0% packet loss, time 2002ms

rtt min/avg/max/mdev = 0.484/0.494/0.506/0.027 ms

dads apache2 #     
```

if the server /etc/exports is 

```
grenada / # cat /etc/exports |grep -v '#'

/tmp     192.168.0.0/24(rw)

/home           192.168.0.0/24(rw)

grenada / #                  
```

 home mounts but tmp doesnt 

```
dads apache2 # mount -t nfs 192.168.0.1:/home    /mnt/GRENADA

dads apache2 # umount /mnt/GRENADA/

dads apache2 # mount -t nfs 192.168.0.1:/tmp    /mnt/GRENADA

mount: 192.168.0.1:/tmp failed, reason given by server: Permission denied

dads apache2 #                                                     
```

with the file persmissions     

```

grenada / # ls -la |grep tmp

drwxrwxrwt   4 root root   940 Sep 28 11:15 tmp

grenada / # ls -la |grep home

drwxr-xr-x   5 root root  4096 Aug 26 09:19 home

grenada / #                        
```

and trying it from my laptop I get the same ( ie can mount /home with a numeric IP address but not name)

 for a successful mount

ie mount -t nfs 192.168.0.1:/home /mnt/grenada

in /var/log/messages

```
Sep 30 18:28:21 gravity nfs warning: mount version older than kernel

Sep 30 18:28:21 gravity RPC: call_verify: program 100003, version 3 unsupported by server 192.168.0.1

Sep 30 18:28:21 gravity RPC: call_verify: program 100003, version 3 unsupported by server 192.168.0.1

Sep 30 18:28:21 gravity nfs warning: mount version older than kernel

```

for an unsuccessful mount

ie mount -t nfs grenada:/home /mnt/grenada

gives in /var/log/messages

```

Sep 30 18:29:26 gravity nfs warning: mount version older than kernel

Sep 30 18:29:26 gravity RPC: call_verify: program 100003, version 3 unsupported by server 192.168.0.1

Sep 30 18:29:26 gravity RPC: call_verify: program 100003, version 3 unsupported by server 192.168.0.1[b]

Sep 30 18:29:26 gravity nfs warning: mount version older than kernel

Sep 30 18:30:30 gravity rpc.mountd: mount request from localhost:635 for /home (/home) gave -1208432128

```

whats  rpc.mountd: mount request from localhost:635 for /home (/home) gave -1208432128

all about 

why doesnt DNS lookup work within nfs ?

why cant I mount the /tmp directory ?

----------

## rasmussen

Which kernel are you running?

As already described in other threads, NFS is apparently partially broken in 2.6.13+. I have problems with the permission denied problem myself. I just hope the hopefully soon-to-be-released 2.6.14 addresses this issue.

----------

## thecooptoo

server *Quote:*   

> 
> 
> grenada ~ # uname -a
> 
> Linux grenada 2.6.11-hardened-r15 #2 Thu Jul 14 22:34:34 BST 2005 i686 Pentium III (Katmai) GenuineIntel GNU/Linux
> ...

 

client

 *Quote:*   

> dads paul # uname -a
> 
> Linux dads 2.6.11-gentoo-r4 #6 SMP Fri Aug 19 06:48:30 BST 2005 i686 AMD Athlon(tm) processor AuthenticAMD GNU/Linux
> 
> 

 

----------

## MadScientist

 *rasmussen wrote:*   

> As already described in other threads, NFS is apparently partially broken in 2.6.13+

 

I can't find anything about this. Do you have links to the threads or bug reports? I have this problem too and I'd like to learn more.

----------

## linear

Greetings,

I know I'm coming in a bit late to this one, but a couple of quick questions:

1) What does your /etc/nsswitch.conf have in it?

2) Do you have the server annotated in your /etc/hosts file?

/bk

----------

## MadScientist

 *linear wrote:*   

> 1) What does your /etc/nsswitch.conf have in it?

 

It's the default - I haven't edited it. Looks like this on both server and client:

```
# /etc/nsswitch.conf:

# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/nsswitch.conf,v 1.1 2005/05/17 00:52:41 vapier Exp $

passwd:      compat

shadow:      compat

group:       compat

# passwd:    db files nis

# shadow:    db files nis

# group:     db files nis

hosts:       files dns

networks:    files dns

services:    db files

protocols:   db files

rpc:         db files

ethers:      db files

netmasks:    files

netgroup:    files

bootparams:  files

automount:   files

aliases:     files
```

 *linear wrote:*   

> 2) Do you have the server annotated in your /etc/hosts file?

 

No, but I'm mounting by IP address not hostname.

I just noticed in the syslog of the nfs server, I get this when I try to mount:

```
rpc.mountd: bad path in mount request from [IP address]: "[path]"
```

Odd error considering the path exists (I can copy/paste the path in front of an ls and it exists - not a typo) and I never changed the configs recently anyway - it used to work. It broke after my last set up updates, which did include a kernel update to 2.6.13.

----------

## thecooptoo

I think ive still got problems

For the network the machines use a common /usr/portage

ie from my client 

```
dads #  mount |grep portage

nervada:/usr/portage/ on /usr/portage type nfs (rw,addr=192.168.0.7)

dads everything #
```

and from the client I can browse /usr/portage/distfiles etc 

when from the client I do 

emerge -p  ******

the console hangs 

I have to close the console window  but 

```

dads # fuser -u /usr/portage/

/usr/portage/:       12768c(root)

dads everything #                       
```

and  I cant stop portmap  *Quote:*   

> dads everything # /etc/init.d/portmap stop
> 
>  * Unmounting network filesystems ...
> 
>  * Failed to simply unmount filesystems                                                                     [ !! ]
> ...

 

wish i could sort this out ....................

----------

