I am trying to mount an NFS directory on a server running OEL 6.3, pointing to another OEL 6.3 server. I get the following error:
[oracle@csdowmsdb503 etc]$ mount 192.x.x.x:/home/oracle/m501/m501_f /home/oracle/m501_f/ mount.nfs: access denied by server while mounting 192.x.x.x:/home/oracle/m501/m501_f
The UIDs and GIDs on each server match. If we use "nfsvers=3" it work, so it seems to be something specific to vers 4. We would like to not use the vers 3 workaround.
Your problem might be that NFS4 must be exported from an fsid=0 pseudo root directory. This did not exist in NFS3 and may explain the error you are receiving. For instance, if /ext/nfs is the NFS root (fsid=0), everything else that you want to be shared over NFS4 must be accessible under /ext/nfs. Check your /etc/export file. There are examples on the web, you should be able to find it searching for "NFS4 fsid-0". For example: http://superuser.com/questions/362736/cant-mount-nfs4-share
When I added "- v" I realized it is actually erroring out on vers=4 and defaulting to vers=3 instead. The error it shows is now "No such file or directory."
[oracle@xxx503 m501_g]$ sudo mount -v -t nfs xxx.xxx.xxx.35:/home/oracle/m501/m501_g /home/oracle/m501_g/
mount.nfs: timeout set for Fri Nov 9 10:46:27 2012
mount.nfs: trying text-based options 'vers=4,addr=xxx.xxx.xxx.35,clientaddr=xxx.xxx.xxx.37' mount.nfs: mount(2): No such file or directory
mount.nfs: trying text-based options 'addr=xxx.xxx.xxx.35'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying xxx.xxx.xxx.35 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying xxx.xxx.xxx.35 prog 100005 vers 3 prot UDP port 37692
xxx.xxx.xxx.35:/home/oracle/m501/m501_g on /home/oracle/m501_g type nfs (rw)