#!/bin/ksh # @(#)60 1.6 src/avs/fs/mmfs/samples/nfscluster/mmfsdown.scr, mmfs, avs_rgpfs24, rgpfs24s010a 1/24/07 08:56:49 ############################################################################## # # When properly installed, this script is invoked by the GPFS daemon during # normal or abnormal shutdown cleanup processing. # # The script is invoked with one parameter which represents the status of # the GPFS daemon. The possible values are: # down - this is normal shutdown processing as a result of a mmshutdown # command. The GPFS daemon will not be restarted. # active - this is abnormal shutdown processing as a result of some # unrecoverable condition. The GPFS daemon will be restarted. # # If this is a normal shutdown, GPFS has already unmounted all file systems. # # If this is abnormal shutdown, GPFS leaves the file systems mounted and # will attempt to remount them after the daemon restarts. If you do not # wish the file systems to be automatically remounted, add the appropriate # umount commands in this script. # # You can also use this script to add any commands to clean up local state # before the GPFS daemon restarts. # # If GPFS was started with the -T option (activate tracing) on the mmstartup # command, trace records have already been cut prior to invoking this script. # If you want to disable on a particular node the automatic trace handling, # run the following command on the desired nodes: # touch /var/mmfs/etc/ignoreMMTRACE # # If you have disabled the automatic trace handling, or if you have started # tracing with the mmtrace command, add the appropriate trace handling commands. # # # To activate the code: # # a) edit this script and make the appropriate changes # b) copy this script to /var/mmfs/etc/mmfsdown # c) ensure this script is executable (chmod +x /var/mmfs/etc/mmfsdown) # ############################################################################## # Process the parameters. status=$1 # Possible values are "active" or "down". # Stop nfs monitor /var/mmfs/etc/nfsmonitor -e # To stop nfs cluster on this node /var/mmfs/etc/stop.nfs # if [[ $status = active ]] # then # # The GPFS daemon died but will be restarted. # # Optional unmount of all GPFS file systems (uncomment the umount line). # # The GPFS daemon will remount anything left mounted in VFS. # # For multi-node recovery, there may be reasons to force the unmount now. # # Uncomment the next line for unforced unmount. # # Busy file systems will not unmount. # #$(eval $UMOUNTALL -t $FSTYPE $STDERR_REDIRECT) # # Uncomment the next line for forced unmount. # #$UMOUNTALL -f -t $FSTYPE # # Do any commands here to clean up local state # # before the GPFS daemon restarts. # else # # GPFS daemon is shutting down. # # Do any commands here to clean up local state # # when the GPFS daemon is shutting down. # fi return 0