NFS Administration Guide

How to Set Up Automatic File-System Sharing

  1. Edit the /etc/dfs/dfstab file.

    Add one entry to the file for each file system that you want to be automatically shared. Each entry must be on a line by itself in the file and uses this syntax:


    share [-F nfs] [-o specific-options] [-d description] pathname
  2. Check that the NFS service is running on the server.

    If this is the first share command or set of share commands that you have initiated, it is likely that the NFS daemons are not running. The following commands kill the daemons and restart them.


    # /etc/init.d/nfs.server stop
    # /etc/init.d/nfs.server start
    

    This ensures that NFS service is now running on the servers and will restart automatically when the server is at run level 3 during boot.

    At this point, set up your autofs maps so that clients can access the file systems you have shared on the server. See "Setting Up Autofs".