Setting up HP SIM 5.x on an HP-UX Serviceguard Cluster (448492-002, February 2008)

22
test_return 51
}
# This function is a place holder for customer define functions.
# Y
ou should define all actions you want to happen here, after the service is
# halted.
#
function customer_defined_halt_cmds
{
# ADD customer defined halt commands.
: # do nothing instruction, because a function must contain some command.
test_retur
n 52
}
# END OF CUSTOMER DEFINED FUNCTIONS
# START OF RUN FUNCTIONS
# Initialize FS_TYPE_ARG
# This set the FS_TYPE_ARG, if there are non
-
null FS_TYPE variables
i=0
for type in "${FS_TYPE[@]}"
do
FS_TYPE_ARG[$i]="
-
t $type"
let i=$i+
1
done
action=$1
#
# This function checks for the existence of MetroCluster
# packages that use physical data replication via Continuous
# Access XP on HP SureStore XP series disk arrays.
#
# If the DATA_REP variable is set, DATA_REP="clx",
# then the cl
uster has at least one package which will be
# configured for remote data mirroring in a metropolitan environment.
#
# The function is called before attempting to activate the
# volume group.
#
function verify_physical_data_replication
{
if [[ ${#DATA_
REP}
-
eq 0 ]]
then
echo
-
e "ERROR: The DATA_REP variable is not set. It has to be set to"
echo
-
e "
\
teither "none" or the supported method of remote data
replication."
echo
-
e "
\
tSet this variable to the appropriated value and
then restart"
echo
-
e "
\
tthe package."
let 0
test_return 41
fi
if [[ $DATA_REP != "none" ]]
then
if [[
-
x ${SGSBIN}/DRCheckDiskStatus ]]
then
echo "$(date '+%b %e %T')
-
Node
\
"$(hostname)
\
":
This package is
configured with remote data replication."
echo
-
e "
\
tChecking disk status on package $1"
${SGSBIN}/DRCheckDiskStatus "${0}" "${1}" "${DATA_REP}" "${VGCHANGE}"
"${XDC_CONFIG_FILE}" "${VG[*]}"
#