Exporting an NFS file system

You can export an NFS file system using the following procedures.

  • To export an NFS file system using the SMIT:
    1. Verify that NFS is already running by typing the command lssrc -g nfs. The output should indicate that the nfsd and the rpc.mountd daemons are active. If they are not, start NFS using the instructions in Starting the NFS daemons.
    2. At a command line, type the following and press Enter:
      smit mknfsexp
    3. Specify appropriate values in the PATHNAME of directory to export, MODE to export directory, and EXPORT directory now, system restart or both fields.
    4. Specify any other optional characteristics you want, or accept the default values by leaving the remaining fields as they are.
    5. When you have finished making your changes, SMIT updates the /etc/exports file. If the /etc/exports file does not exist, it is created.
    6. Repeat steps 3 through 5 for each directory you want to export.
  • To export an NFS file system using a text editor:
    1. Open the /etc/exports file with your favorite text editor.
    2. Create an entry for each directory to be exported using the full path name of the directory. List each directory to be exported starting in the left margin. No directory should include any other directory that is already exported. See the /etc/exports file in Files Reference for a description of the full syntax for entries in the /etc/exports file.
    3. Save and close the/etc/exports file.
    4. If NFS is running, type the following command and press Enter:
      /usr/sbin/exportfs -a
      The -a option tells the exportfs command to send all information in the /etc/exports file to the kernel. If NFS is not running, start NFS using the instructions in Starting the NFS daemons.
  • To temporarily export an NFS file system (without changing the /etc/exports file), type the following command and press Enter:
    exportfs -i /dirname

    where dirname is the name of the file system you want to export. The exportfs -i command specifies that the /etc/exports file is not to be checked for the specified directory, and all options are taken directly from the command line.

    The AIX® NFS version 4 support allows the administrator to create and control an alternate namespace that is rendered by the NFS server to clients. This is done using the exname export option. This support can also be used to hide details of the server's local file system namespace from NFS clients.