Unexporting an NFS file system
You can unexport an NFS directory using the following procedures.
- To unexport an NFS directory using SMIT:
- Type the following at a command prompt and press Enter:
smit rmnfsexp - Enter the appropriate path name in the PATHNAME of exported
directory to be removed field.
The directory is now removed from the /etc/exports file and is unexported.
If the directory was exported to clients using NFS version 4, the unexport may fail due to file state on the server. File state means files in the exported directories are open by a client. You can either take actions to stop applications using that data, or you can forcefully unexport (exportfs -F) the data, which may result in failures for applications that are actively using the data.
- Type the following at a command prompt and press Enter:
- To unexport an NFS directory by using a text editor:
- Open the /etc/exports file with your favorite text editor.
- Find the entry for the directory you wish to unexport, and the delete that line.
- Save and close the /etc/exports file.
- If NFS is currently running, enter:
where dirname is the full path name of the directory you just deleted from the /etc/exports file. If the unexport fails due to access by NFS V4 clients, you can add a -F option to force the directory to be unexported.exportfs -u dirname