/etc/exports contains the list of system directories to export, who has access to them, and the nature of the access (e.g. rw or ro, root, etc.). A file server might have the following exports file to service diskless and dataless clients of multiple hardware architectures.
If you don't specify restrictions it defaults to allow read/write access to all, e.g. if exports contains:
your root directory is accessible to everyone on the net.
After you edit /etc/exports to make the directories mountable by other systems you need to run:
# /usr/etc/exportfs -a
The server needs to run the NFS mount daemon, rpc.mountd, and several NFS service daemons, nfsd (typically 8 for a low use server). These two daemons handle NFS mount requests and client requests, respectively. NFS also requires that the block IO daemons, biod, be running (normally 4 are started) to buffer read-ahead and write-behind requests. These are used for all client requests, both local and through NFS. The block IO daemons are always started by rc.local; the other NFS daemons started for the server during boot by rc.local only if /etc/exports exists. The relevant lines in rc.local are:
if [ -f /usr/etc/biod ]; then
biod 4; (echo -n ' biod') >/dev/console
if [ -f /etc/exports ]; then
exportfs -a >/dev/console
nfsd 8 & (echo -n ' nfsd') >/dev/console
rpc.mountd -n >/dev/console
If you create an exports file later you will need to start these by hand before your system can become a server.
The file /etc/xtab contains the list of files actually exported via exportfs. If you execute exportfs without any options it will display this list.
You can use the showmount command to see who is mounting your file systems, though it's not a very accurate representation of the current state.