Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > Red Hat Enterprise Linux 5 > Issue <<  88 of 364 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 10850
Last update: 07-16-08
Issue:
How do I export a directory with NFS v4?
Resolution:

One of the large differences with NFS v4 is that all exports are seen as single virtual root directories similar to ftp or a web server. For example, if the directory /shared was exported from the NFS server, clients would be able to mount it as servername:/. Please note that this can only export one directory with the fsid=0 option. This directory will be the root of the NFSv4 share. To export a directory over NFS v4, first define the directory in the /etc/exports file with the option fsid=0. For example:

/shared *(rw,fsid=0,sync)

Restart the nfs service for this change to take effect. The clients can then mount the export using the following command:

mount -t nfs4 servername:/ /mnt/
The /shared directory will then be seen as the root directory for the NFSv4 filesystem. With NFS v4 all of the exports are contained within this filesystem, and must be subdirectories of this root directory. For example, if these were the directories that needed to be exported:

/shared/data
/shared/home

The clients would see them as /data and /home. If any of these subdirectories are on a different filesystem than the main export, then a line in the /etc/exports file will need to be added with the nohide option for them to be seen by the clients:

/shared/data *(rw,nohide,sync)


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > Red Hat Enterprise Linux 5 > Issue <<   88  of  364  >>