#!/bin/ksh # @(#)59 1.5 src/avs/fs/mmfs/samples/nfscluster/gpfsrecovernode.scr, mmfs, avs_rgpfs24, rgpfs240610b 2/24/06 10:48:25 # # This shell script is called by the mmfsd daemon during node failure # recovery before any distributed locks held by failed nodes are released. # # IMPORTANT: This script is invoked synchronously, i.e., NAS recovery will # not progress until this script finishes. Therefore, it should not invoke # any long-running actions, and it MUST NOT attempt to access any files or # directories in a NAS file system. # The script is invoked with the following parameters: # - The first parameter is the "recovery phase". # - The second parameter is the IP address used by GPFS for this node. # - The remaining parameters are the IP addresses of all failed nodes # for which recovery is being run. # # Note: Should additional node failures occur while node failure recovery # is in progress, this script may be invoked more than once. if [ ! -f /var/mmfs/etc/nfsrecovernode.scr ]; then echo "$0: Can't find nfsrecovernode.scr in /var/mmfs/etc" exit 0 fi if [ ! -f /var/mmfs/etc/nfsfuncs ]; then echo "$0: Can't find NFS functions in /var/mmfs/etc" exit 0 fi . /var/mmfs/etc/nfsfuncs allparms=$* phase=$1 me=$2 shift 2 failed=$* debugmsg "phase=$phase; I am $me; failed nodes are $failed" # Start grace period before GPFS recovery can complete. if [ $phase -eq 1 ]; then startGrace msg "NLM grace period started due to failure of $failed" fi # Do the rest asynchronously allowing GPFS recovery to complete so we can use # the shared filesystem to keep state. nohup /var/mmfs/etc/nfsrecovernode.scr $allparms >> $LOGFILE 2>&1 &