source: gpfs_3.1_ker2.6.20/lpp/mmfs/samples/gpfsrecover.sample @ 211

Last change on this file since 211 was 16, checked in by rock, 17 years ago
  • Property svn:executable set to *
File size: 2.4 KB
RevLine 
[16]1#!/bin/ksh
2# @(#)40  1.1  src/avs/fs/mmfs/ts/config/gpfsrecover.sample, mmfs, avs_rgpfs24, rgpfs240610b 10/31/05 10:18:06
3##############################################################################
4#
5# When properly installed, this script is invoked by the GPFS daemon during
6# node failure recovery before any distributed locks held by failed nodes
7# are released.  This script is invoked once for each file system on all
8# nodes on which the file system is mounted or otherwise in use (e.g., due
9# to a pending file system management command).
10#
11# The script is invoked with the following parameters:
12#  - The first parameter is the name of the file system.
13#  - The second parameter is the "recovery phase".  In this release,
14#    the recovery phase parameter will always be zero.
15#  - The remaining parameters are the node numbers 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 per file system.
20# In this case, the list of failed nodes will not necessarily be the same for
21# all file systems for which this script is invoked, and multiple invocations
22# for the same file system may contain non-disjoint sets of failed nodes.
23# Hence, all actions invoked by this script should be idempotent.
24#
25# Example: Say there are two file systems, gpfs1 and gpfs2, and nodes 10, 11,
26# and 12 fail, in that order.  This may result in the following sequence of
27# calls to this script:
28#   gpfsrecover gpfs1 0 10
29#   gpfsrecover gpfs2 0 10 11
30#   gpfsrecover gpfs1 0 10 11
31#   gpfsrecover gpfs2 0 10 11 12
32#   gpfsrecover gpfs1 0 12
33# The only guarantee is that for each file system and each failed node, this
34# script will be invoked at least once with that file system and node as
35# parameters.
36#
37# IMPORTANT: This script is invoked synchronously, i.e., gpfs recovery will
38# not progress until this script finishes.  Therefore, it should not invoke
39# any long-running actions, and it MUST NOT attempt to access any files or
40# directories in a gpfs file system.
41#
42#
43# To activate the code:
44#
45#   a) edit this script and make the appropriate changes
46#   b) copy this script to /var/mmfs/etc/gpfsrecover
47#   c) ensure this script is executable (chmod +x /var/mmfs/etc/gpfsrecover)
48#
49##############################################################################
50
51# Get the input parameters.
52fsname=$1
53phase=$2
54shift 2
55failednodes=$*
56
57
58return 0
Note: See TracBrowser for help on using the repository browser.