source: gpfs_3.1_ker2.6.20/lpp/mmfs/samples/nfscluster/gpfsrecovernode.scr @ 16

Last change on this file since 16 was 16, checked in by rock, 16 years ago
  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#!/bin/ksh
2# @(#)59  1.5  src/avs/fs/mmfs/samples/nfscluster/gpfsrecovernode.scr, mmfs, avs_rgpfs24, rgpfs240610b 2/24/06 10:48:25
3#
4# This shell script is called by the mmfsd daemon during node failure
5# recovery before any distributed locks held by failed nodes are released.
6#
7# IMPORTANT: This script is invoked synchronously, i.e., NAS recovery will
8# not progress until this script finishes.  Therefore, it should not invoke
9# any long-running actions, and it MUST NOT attempt to access any files or
10# directories in a NAS file system.
11
12# The script is invoked with the following parameters:
13#  - The first parameter is the "recovery phase".
14#  - The second parameter is the IP address used by GPFS for this node.
15#  - The remaining parameters are the IP addresses of all failed nodes
16#    for which recovery is being run.
17#
18# Note: Should additional node failures occur while node failure recovery
19# is in progress, this script may be invoked more than once.
20
21if [ ! -f /var/mmfs/etc/nfsrecovernode.scr ]; then
22    echo "$0: Can't find nfsrecovernode.scr in /var/mmfs/etc"
23    exit 0
24fi
25if [ ! -f /var/mmfs/etc/nfsfuncs ]; then
26    echo "$0: Can't find NFS functions in /var/mmfs/etc"
27    exit 0
28fi
29. /var/mmfs/etc/nfsfuncs
30
31allparms=$*
32phase=$1
33me=$2
34shift 2
35failed=$*
36
37debugmsg "phase=$phase; I am $me; failed nodes are $failed"
38
39# Start grace period before GPFS recovery can complete.
40if [ $phase -eq 1 ]; then
41    startGrace
42    msg "NLM grace period started due to failure of $failed"
43fi
44
45# Do the rest asynchronously allowing GPFS recovery to complete so we can use
46# the shared filesystem to keep state.
47nohup /var/mmfs/etc/nfsrecovernode.scr $allparms >> $LOGFILE 2>&1 &
Note: See TracBrowser for help on using the repository browser.