# NFS4 mounting problem

## zhushazang

I'm using net-fs/nfs-utils1.2.2-r1 in server and client host and trying to mount under nfs4 /usr/portage/distfiles mount point to share downloaded archs. But something are wrong:

in server

/etc/fstab

rpc_pipefs              /var/lib/nfs/rpc_pipefs             rpc_pipefs      defaults                    0       0

nfsd                    /proc/fs/nfsd                       nfsd            defaults                    0       0

/etc/exports

/usr/portage/           mynetwork.0/24(fsid=0,rw,sync,no_subtree_check,secure,anonuid=1000,anongid=100) 

/usr/portage/distfiles  mynetwork.0/24(nohide,rw,sync,no_subtree_check,secure,anonuid=1000,anongid=100)

in client

/et/fstab

server.mydomain:/usr/portage/distfiles/                     /usr/portage/distfiles                  nfs4     tcp,sync,rw,hard,intr                0       0

But, i'm blocked in this message:

mount -v -t nfs4 myserver:/usr/portage/distfiles/ /usr/portage/distfiles/

mount.nfs4: timeout set for Mon Jun  7 16:37:43 2010

mount.nfs4: trying text-based options 'addr=xxx.xxx.xxx.150,clientaddr=xxx.xxx.xxx.138'

mount.nfs4: mount(2): No such file or directory

mount.nfs4: mounting myserver:/usr/portage/distfiles/ failed, reason given by server:

  No such file or directory

What is the matter?

Att

----------

## maxime1986

Hello

try : 

```
mount -v -t nfs4 myserver:/distfiles /usr/portage/distfiles
```

does /usr/portage/distfiles is a "bind mounted" directory ?? because if it's not .. I think that you can remove :

```
/usr/portage/distfiles mynetwork.0/24(nohide,rw,sync,no_subtree_check,secure,anonuid=1000,anongid=100) 
```

from your exports file.

----------

## zhushazang

Man, you save me.

Thanks a lot. Now, NFS4 on the road.

Thanks again.

----------

## zhushazang

Hi again. 

Problems in NFS4 world.

I can mount, but now i can't write inside mounted directory.

I'm using this options now:

client:

myserver:/distfiles/                     /usr/portage/distfiles                  nfs4     tcp,sync,rw,hard,intr            0       0

server:

/usr/portage/          mynetwork/24(fsid=0,rw,sync,no_subtree_check,insecure)

In mount answer command, apear rw, but, don't workk yet.

Some hide option?

Thanks...

----------

## zhushazang

Changing some options inside /etc/exports (+no_root_squash,-insecure) and now, really working.

Bye

----------

## dol-sen

Could you please post your final server and client setup again.  I can't get mine to have write access either, despite everything   :Sad: 

----------

## dol-sen

I found the problem.  It turned out that rpc.idmapd wasn't running on the client, so the uid and gid's were wrong for portage and pkgcore.  I could touch and write using cp.

----------

