nfs.clean Command

Purpose

Stops NFS and NIS operations.

Syntax

/etc/nfs.clean [-d][-y][-t nfs|nis]

Description

The /etc/nfs.clean command is used to shut down operations of NFS, NIS, or both. This script is used by the shutdown command but can be used to stop operations of only NFS or NIS (NIS+). By default, all NFS and NIS daemons are stopped.

This command is recommended instead of using stopsrc -g nfs since the nfs.clean command shuts daemons down in the correct order. The stopsrc command has no notion of stopping daemons of a group in the proper order. This can cause problems if the statd and lockd daemons are running and the statd daemon is stopped before the lockd daemon.

Flags

Item Description
-d Stops only server-specific daemons. Daemons that can run on clients are not stopped.
-y Stops only server-specific NIS (and NIS+) daemons. This flag is presumed if the -d flag is used.
-t Stops only the specified system. If -t nfs is specified, only the NFS daemons are stopped. If -t nis is specified, only the NIS daemons are stopped.

Exit Status

Item Description
0 Command completed successfully.
1 Argument error.

Examples

  1. To stop all NFS and NIS daemons, type:
    /etc/nfs.clean
    
  2. To stop only NFS, type:
    /etc/nfs.clean -t nfs
    
  3. To stop only NFS service daemons, type:
    /etc/nfs.clean -d -t nfs
    

Location

/etc/nfs.clean