source: gpfs_3.1_ker2.6.20/lpp/mmfs/samples/nfscluster/mmfsdown.scr @ 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.9 KB
Line 
1#!/bin/ksh
2# @(#)60        1.6  src/avs/fs/mmfs/samples/nfscluster/mmfsdown.scr, mmfs, avs_rgpfs24, rgpfs24s010a 1/24/07 08:56:49
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 on a particular node the automatic trace handling,
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# Stop nfs monitor
47/var/mmfs/etc/nfsmonitor -e
48# To stop nfs cluster on this node
49/var/mmfs/etc/stop.nfs
50
51# if [[ $status = active ]]
52# then
53#   # The GPFS daemon died but will be restarted.
54
55#   # Optional unmount of all GPFS file systems (uncomment the umount line).
56#   # The GPFS daemon will remount anything left mounted in VFS.
57#   # For multi-node recovery, there may be reasons to force the unmount now.
58
59#   # Uncomment the next line for unforced unmount.
60#   # Busy file systems will not unmount.
61#   #$(eval $UMOUNTALL -t $FSTYPE $STDERR_REDIRECT)
62 
63#   # Uncomment the next line for forced unmount.
64#   #$UMOUNTALL -f -t $FSTYPE
65
66#   # Do any commands here to clean up local state
67#   # before the GPFS daemon restarts.
68
69# else
70
71#   # GPFS daemon is shutting down.
72
73#   # Do any commands here to clean up local state
74#   # when the GPFS daemon is shutting down.
75# fi
76
77return 0
Note: See TracBrowser for help on using the repository browser.