Export a directory with NFS v4
A major difference between NFS v4 and earlier versions is the ability to export a single directory in a way similar to an FTP or web server. For example, export /shared and let clients mount it as servername:/. Configure /etc/exports as follows:
/shared *(rw,fsid=0,sync)
** This type of export requires fsid=0, and only one directory can use it.
Restart the service, then try the following command on the client.
#mount -t nfs4 servername:/ /mnt/
With this export, directories within /shared, such as:
/shared/data
/shared/home
are available to the client without another mount. However, if a subdirectory of /shared is on a different filesystem or partition, add nohide to /etc/exports so that the client can see it, as shown below.
/shared/data *(rw,nohide,sync)