source: gpfs_3.1_ker2.6.20/lpp/mmfs/samples/mmfsdown.sample @ 108

Last change on this file since 108 was 16, checked in by rock, 17 years ago
  • Property svn:executable set to *
File size: 3.1 KB
Line 
1#!/bin/ksh
2# @(#)41        1.2  src/avs/fs/mmfs/ts/config/mmfsdown.sample, mmfs, avs_rgpfs24, rgpfs240610b 1/27/06 16:14:33
3##############################################################################
4#
5# When properly installed, this script is invoked by the GPFS daemon during
6# normal or abnormal shutdown cleanup processing.
7#
8# The script is invoked with one parameter which represents the status of
9# the GPFS daemon.  The possible values are:
10#   down    - this is normal shutdown processing as a result of a mmshutdown
11#             command.  The GPFS daemon will not be restarted.
12#   active  - this is abnormal shutdown processing as a result of some
13#             unrecoverable condition.  The GPFS daemon will be restarted.
14#
15# If this is a normal shutdown, GPFS has already unmounted all file systems.
16#
17# If this is abnormal shutdown, GPFS leaves the file systems mounted and
18# will attempt to remount them after the daemon restarts.  If you do not
19# wish the file systems to be automatically remounted, add the appropriate
20# umount commands in this script.
21#
22# You can also use this script to add any commands to clean up local state
23# before the GPFS daemon restarts.
24#
25# If GPFS was started with the -T option (activate tracing) on the mmstartup
26# command, trace records have already been cut prior to invoking this script.
27# If you want to disable the automatic trace handling on a particular node,
28# run the following command on the desired nodes:
29#      touch /var/mmfs/etc/ignoreMMTRACE
30#
31# If you have disabled the automatic trace handling, or if you have started
32# tracing with the mmtrace command, add the appropriate trace handling commands.
33#
34#
35# To activate the code:
36#
37#   a) edit this script and make the appropriate changes
38#   b) copy this script to /var/mmfs/etc/mmfsdown
39#   c) ensure this script is executable (chmod +x /var/mmfs/etc/mmfsdown)
40#
41##############################################################################
42
43# Process the parameters.
44status=$1  # Possible values are "active" or "down".
45
46
47# osName=$(/bin/uname -s)
48
49# if [[ $osName = Linux ]]
50# then
51#   FSTYPE=gpfs
52#   UMOUNTALL="/bin/umount -a"
53#   # Note: Do not redirect stderr on Linux umount.
54#   STDERR_REDIRECT=""
55# fi
56
57# if [[ $osName = AIX ]]
58# then
59#   FSTYPE=mmfs
60#   UMOUNTALL="/usr/sbin/umount"
61#   STDERR_REDIRECT="2>/dev/null"
62# fi
63
64
65# if [[ $status = active ]]
66# then
67#   # The GPFS daemon died but will be restarted.
68
69#   # Optional unmount of all GPFS file systems (uncomment the umount line).
70#   # The GPFS daemon will remount anything left mounted in VFS.
71#   # For multi-node recovery, there may be reasons to force the unmount now.
72
73#   # Uncomment the next line for unforced unmount.
74#   # Busy file systems will not unmount.
75#   #$(eval $UMOUNTALL -t $FSTYPE $STDERR_REDIRECT)
76 
77#   # Uncomment the next line for forced unmount.
78#   #$UMOUNTALL -f -t $FSTYPE
79
80#   # Do any commands here to clean up local state
81#   # before the GPFS daemon restarts.
82
83# else
84
85#   # GPFS daemon is shutting down.
86
87#   # Do any commands here to clean up local state
88#   # when the GPFS daemon is shutting down.
89# fi
90
91return 0
Note: See TracBrowser for help on using the repository browser.