HACMP stop script example
A stop script that operates in an HACMP™ environment is illustrated.
Depending on the installation environment, the sample stop script might have to ensure that any backup or restore operation in progress can be stopped.
The stop script
is used in the following situations:
- HACMP is stopped.
- A failover occurs because of a failure of one component of the resource groups. The other members are stopped so that the entire group can be restarted on the target node in the failover.
- A fallback occurs and the resource group is stopped on the node currently hosting it to allow transfer back to the node by entering the cluster again.
The stop script is called by HACMP with the root user ID.
Note: This script
is not in its final form. It is to be considered pseudo code that
indicates the functions it processes.
#!/bin/ksh
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# This sample script is provided for use with #
Data Protection for SAP in an HACMP #
# environment #
# It should be reviewed and customized to meet your specific environment #
# #
# #
# Name: stop_tdpr3.sh #
# #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if ["$VERBOSE_LOGGING"="high"]
then
set -x
fi
# Function to update all disk information for Data Protection for SAP
STOP_BACKUP()
{
# You may want to cancel all backups currently running
# Note that this will generate errors in the current backup logs and it will also
# cancel the connection to the Admin Assistant.
# *** Note that if you are using Data Protecion for Snapshot Devices for SAP,
# this may leave your FlashCopy device in an
# inconsistent state.
# kill –9 `cat /var/tdp_r3/prole.pid`
# This stops any running backup or archive process.
STOP_BACKUP
Exit 0