Cannot mount nfs4 share: no such file or directory

I am trying to get a basic nfs4 working between two machines (let's call them server and client). I have followed this manual by letter to no avail. Here's what I'm getting:

root@server#: tail -n 2 /etc/exports
/export client-ip/24(rw,nohide,insecure,no_subtree_check,async,no_root_squash)
/export/users client-ip/24(rw,nohide,insecure,no_subtree_check,async,no_root_squash)

root@server#: showmount --exports
Export list for server-ip:
/export/users client-ip/24
/export       client-ip/24

Server side seems to be OK. Directories exist, their permissions are granted (775). Addresses (client-ip and server-ip) are numeric - replaced with acronyms here for obvious reasons. Next, the client:

root@client#: mount -v -t nfs4 server-ip:/export /opt/nfstest
mount.nfs4: timeout set for Thu Apr 14 15:52:31 2011
mount.nfs4: text-based options: 'clientaddr=client-ip,addr=server-ip'
mount.nsf4: mount(2): No such file or directory
mount.nfs4: mounting server-ip:/export failed, reason given by server:
   No such file or directory

It just doesn't accept the remote folder. Apart from one above, I tried server-ip:/export/users, server-ip:/ - getting same result. Client does have access to server:

root@client#: telnet server-ip 2049
Trying server-ip...
Connected to server-ip.
Escape character is '^]'.

root@client#: showmount -e server-ip
Export list for server-ip:
/export/users client-ip/24
/export       client-ip/24

Local directory /opt/nfstest exists. Module nfs is loaded on the nfs client. There are no firewall between the server and client. What else should I check?

Additional information: Ubuntu Lucid (10.04.2), running on Amazon ec2 box. NFS versions (nfs-common, nfs-kernel-server) are 1:1.2.0-4ubuntu4.1.


The value 0 has a special meaning when use with NFSv4. NFSv4 has a concept of a root of the overall exported filesystem. The export point exported with fsid=0 will be used as this root.

Therefore include fsid=0 into /etc/exports and then do the following:

mount -t nfs4 <serverip>:/ /localmount/point

and not

mount -t nfs4 <serverip>:/exports /localmount/point

That's it.


My experiences are that NFSv4 is case sensitive, so when I was forced to switch from nfsv3 to nfsv4 (client linux, server wintel) I had to correct path exported from server