# [SOLVED]Can't mount nfs share

## gasparov

SOLVED post 4

I'm trying to mount a nfs share but i'm getting timeouts, both server and client run gentoo. 

from client (192.168.25. :Cool: 

```

rpcinfo -p server

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

    100024    1   tcp  57845  status

    100005    1   udp  37681  mountd

    100005    1   tcp  41729  mountd

    100005    2   udp  43393  mountd

    100005    2   tcp  57278  mountd

    100005    3   udp  57466  mountd

    100005    3   tcp  47898  mountd

    100003    2   tcp   2049  nfs

    100003    3   tcp   2049  nfs

    100003    4   tcp   2049  nfs

    100003    2   udp   2049  nfs

    100003    3   udp   2049  nfs

    100003    4   udp   2049  nfs

    100021    1   udp  45220  nlockmgr

    100021    3   udp  45220  nlockmgr

    100021    4   udp  45220  nlockmgr

    100021    1   tcp  41133  nlockmgr

    100021    3   tcp  41133  nlockmgr

    100021    4   tcp  41133  nlockmgr
```

from server

```
netstat -an|grep LISTEN

tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN     

tcp        0      0 0.0.0.0:41729           0.0.0.0:*               LISTEN     

tcp        0      0 0.0.0.0:41133           0.0.0.0:*               LISTEN     

tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     

tcp        0      0 0.0.0.0:57845           0.0.0.0:*               LISTEN     

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     

tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     

tcp        0      0 0.0.0.0:47898           0.0.0.0:*               LISTEN     

tcp        0      0 0.0.0.0:17500           0.0.0.0:*               LISTEN     

tcp        0      0 0.0.0.0:57278           0.0.0.0:*               LISTEN  

cat /etc/hosts.allow 

portmap: 192.168.25.8

nfs: 192.168.25.8

mountd: 192.168.25.8

lockd: 192.168.25.8

rquotad: 192.168.25.8 

rpcbind: 192.168.25.8 

```

I've many test with different shares but still no luck, anybody with an idea of what could be the problem?

The client is a raspberry arm board but i guess it shouldn't really matter.Last edited by gasparov on Sun Jun 24, 2012 9:05 am; edited 1 time in total

----------

## NeddySeagoon

gasparov,

Show us your /etc/exports on the server and the mount command you are using.

What version of NFS are you trying to use?

Is there a firewall in the way.

For testing, put 127.0.0.1 in the exports file, run 

```
 exportfs -ra
```

to have the new exports file reread.

Now can you nsfmount on the server an exported filesystem on the server?

mount -t nfs localhost:/...  /mnt/floppy say, on the server.

----------

## krinn

 *NeddySeagoon wrote:*   

> 
> 
> mount -t -v nfs localhost:/...  /mnt/floppy say, on the server.

 

added -v

----------

## gasparov

Thank you guys i solved it, I tried to mount from localhost and it was working so i used the hostname of the server from the client and worked. Basically I had to use "hostname" instead of "ip"

my exports contain something like this

```
/usr/portage 192.168.25.8(rw,nohide,insecure,no_subtree_check,async)
```

and from the client this command works

```
mount -vvv -t nfs serverhostname:/usr/portage /usr/portage
```

while this doesn't

```
mount -vvv -t nfs serverip:/usr/portage /usr/portage
```

honestly i still have to figure out why since i i use ip everywhere (in exports and in hosts.allow)

----------

