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 > AS/ES/WS v. 3 > Issue <<  461 of 594 >>

Solution Tools:


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

Article Reference

Article ID: 3740
Last update: 09-02-04
Issue:
How do I export a directory under a different name with the Network File System (NFS)?
Resolution:
Release Found: Red Hat Enterprise Linux 3

Problem:
You need client machines to mount a filesystem from your NFS server under a specific name. The actual location of the filesystem on the server is different from the location the clients are expecting to use.

Solution:
Assuming that you have a basic understanding of NFS; You can use symlinks to make a filesystem "appear" to clients, as having a different path on the server. All you need to do is create the symlink to the actual location of the files. Then add an export entry referencing the link.

For example:
You want the NFS filesystem server1:/very/long/path/name/on/server1 to be mounted by clients as "server1:/server1".

You would first create a symlink on server1 with the command:

 
# ln -s /very/long/path/name/on/server1 /server1
      


Next you would add an export entry in /etc/exports similar to:

 
/server1	*(ro,sync)
       


Lastly, reload your NFS exports file:
 
# exportfs -r 
      


You should now be able to mount using this name from the client:

 
# mount server1:/server1 /mount/point/
      


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > AS/ES/WS v. 3 > Issue <<   461  of  594  >>