2/5/09

How to export NFS share and mount it on a client (AIX)

bash-3.00# exportfs
/data/fs/fs1 -rw=pw41,access=pw41.test.pw.com,root=pw41.test.pw.com

NOTE: the exported directory (e.g., /data/fs/fs1) must be a file system itself, not just any directory.
In this case, /data/fs/fs1 is a file system itself, but /data is not. So if you export /data, when you
mount it from client, it will not work (you will get an error).

bash-3.00# exportfs -a

This commands exports (or freshes) the list again from the server. Man page for exportfs shows this:
Flags

-a Exports all directories listed in the exports file.
-v Prints the name of each directory as it is exported or unexported.

To verify what’s been exported, run:
bash-3.00# exportfs
/cesa/fs/fs1 -rw=pw41,access=pw41.test.pw.com,root=pw41.test.pw.com

From client side, you can run showmount to list what’s exported:
bash-3.00# showmount -a pw40
pw41.test.pw.com:/data/fs/fs1

Then you mount it to an existing directory (create it if it doesn’t exist yet):

bash-3.00# mount pw40:/data/fs/fs1 /data/clientfs
bash-3.00# cd /data/clientfs
bash-3.00# ls


No comments:

Post a Comment