NFS Services Administrator's Guide (B.11.31.03) August 2008
Sharing a directory with NFS Clients
Before you share your filesystem or directory, determine whether you want the sharing
to be automatic or manual. To share a directory with NFS clients, select one of the
following methods:
• Automatic Share
• Manual Share
Automatic Share
To share your directories automatically, follow these steps:
1. Add an entry to the /etc/dfs/dfstab file for each directory you want to share
with the NFS clients. Following is an example of an entry in the /etc/dfs/dfstab
file for the netgroup Developers. All the hosts that are part of the netgroup will
now have read and write permissions to the /home directory.
share -F nfs -o rw="Developers" -d "home dirs" /home
Where:
-F Specifies the filesystem type
nfs Specifies that the filesystem type is NFS
-o Enables you to use some of the specific options of the share command,
such as sec, async, public, and others.
-d Enables you to describe the filesystem being shared
When NFS is restarted or the system is rebooted, the /etc/dfs/dfstab file is
read and all directories are shared automatically.
2. Share all the directories configured in the /etc/dfs/dfstab file without restarting
the server by using the following command:
shareall
This command reads the entries in the /etc/dfs/dfstab file and shares all the
directories.
3. Verify that your filesystem is shared by entering the following command:
share
An output similar to the following output is displayed:
/home rw=Developers, ro= "home dirs"
All the directories that you have shared must be present in this list.
Manual Share
To share your directories manually, follow these steps:
1. Enter the following command to add a directory to the server’s internal list of
shared directories:
Configuring and Administering an NFS Server 33