#!/bin/ksh # @(#)40 1.1 src/avs/fs/mmfs/ts/config/gpfsrecover.sample, mmfs, avs_rgpfs24, rgpfs240610b 10/31/05 10:18:06 ############################################################################## # # When properly installed, this script is invoked by the GPFS daemon during # node failure recovery before any distributed locks held by failed nodes # are released. This script is invoked once for each file system on all # nodes on which the file system is mounted or otherwise in use (e.g., due # to a pending file system management command). # # The script is invoked with the following parameters: # - The first parameter is the name of the file system. # - The second parameter is the "recovery phase". In this release, # the recovery phase parameter will always be zero. # - The remaining parameters are the node numbers 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 per file system. # In this case, the list of failed nodes will not necessarily be the same for # all file systems for which this script is invoked, and multiple invocations # for the same file system may contain non-disjoint sets of failed nodes. # Hence, all actions invoked by this script should be idempotent. # # Example: Say there are two file systems, gpfs1 and gpfs2, and nodes 10, 11, # and 12 fail, in that order. This may result in the following sequence of # calls to this script: # gpfsrecover gpfs1 0 10 # gpfsrecover gpfs2 0 10 11 # gpfsrecover gpfs1 0 10 11 # gpfsrecover gpfs2 0 10 11 12 # gpfsrecover gpfs1 0 12 # The only guarantee is that for each file system and each failed node, this # script will be invoked at least once with that file system and node as # parameters. # # IMPORTANT: This script is invoked synchronously, i.e., gpfs 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 gpfs file system. # # # To activate the code: # # a) edit this script and make the appropriate changes # b) copy this script to /var/mmfs/etc/gpfsrecover # c) ensure this script is executable (chmod +x /var/mmfs/etc/gpfsrecover) # ############################################################################## # Get the input parameters. fsname=$1 phase=$2 shift 2 failednodes=$* return 0