NFS4

I used Fedora (F16) with SELinux. On the start I advice to disable the firewall on the box where the exports are shared.
I made chcon to all my exported directories:

chcon -t nfs_t /home
chcon -t nfs_t /home/phos
# -R means reccurence
chcon -R -t nfs_t /home/phos/www

And encountered the following problems:
1. Cannot mount (mount.nfs4) the directory within /home path:

root@host:~# mount -v /storage_nfs2
mount.nfs: timeout set for Mon Jun  4 07:53:54 2012
mount.nfs: trying text-based options 'tcp,hard,intr,nfsvers=4,timeo=15,nolock,addr=192.168.122.1,clientaddr=192.168.122.11'
mount.nfs: mount(2): No such file or directory
mount.nfs: mounting mother.local:/home/phos/www2 failed, reason given by server:
  No such file or directory

I tried fsid=0 and many other w/o success.
The solution is to replace nfsvers=4 with nfsvers=3 + nolock option.
This is my fstab:

192.168.122.1:/home/phos/www2 /storage_nfs2         nfs    tcp,rw,hard,nodev,noatime,intr,sync,nfsvers=3,timeo=15,nolock 0 0

I encountered also the following problem:
rpcbind: server localhost not reposponding, timed out.
Now, I am not enable to present my remedy but I think that the most helpfull was to replace portmaper with rpcbind

aptitude install rpcbind

Very helpful is:
check on client which versions are on the server:

rpcinfo -n 2049 -t 192.168.122.1 nfs
program 100003 version 2 ready and waiting
program 100003 version 3 ready and waiting
program 100003 version 4 ready and waiting

check the exports

showmount -e 192.168.122.1
Export list for 192.168.122.1:
/share_nfs_www 192.168.122.0/8
  1. No comments yet.

  1. No trackbacks yet.