Business Copy XP and/or Continuous Access XP for HPe3000
#CAN_DIFF_RESTORE=${CAN_DIFF_RESTORE}"
}
create_pairs ()
{
# Create Business Copy pairs
date
echo "Creating Business Copy pairs for group $GROUP"
# Check status of volumes to be paired. Must be in SIMPLEX state.
pairevtwait -g $GROUP $MEMBER -nowait -nomsg
RETURN="$?"
if [ $RETURN -ne $RC_SIMPLEX ]
then
echo "Error: Pairs $GROUP are not in SIMPLEX state. Cannot initiate copy."
pairevtwait -g $GROUP $MEMBER -nowait
echo "Return code was: ${RETURN}."
exit 3
fi
# Create pairs with maximum track rate (15)
paircreate -g $GROUP $MEMBER -vl -c 15
# Monitor Status
echo "Waiting for pairs to transition to PAIRED state."
let COUNTER=0
RESULT=-1
while [ "$RESULT" -ne "$RC_COMPLETE" ]
do
pairevtwait -g $GROUP $MEMBER -s pair -nomsg -t $SHORTTIMEOUT
RESULT=$?
let COUNTER=$COUNTER+$SHORTTIMEOUT
if [ "$COUNTER" -ge "$MASTERTIMEOUT" ]
then
echo "Error: Timeout while waiting for pair $GROUP to transition to PAIRED state"
pairevtwait -g $GROUP $MEMBER -nowait
echo "Return code was: ${RESULT}."
exit 4
fi
done
echo "Volumes in group $GROUP synced. Copy completed"
date
}
split_pairs ()
{
# Split Business Copy pairs
date
echo "Splitting paired volumes for group $GROUP. "
# Checking for required state of PAIR
pairevtwait -g $GROUP $MEMBER -nowait -nomsg
RETURN="$?"
if [ $RETURN -ne $RC_PAIRED ]
then
echo "Error: Pairs $GROUP are not synchronized."
pairevtwait -g $GROUP $MEMBER -nowait
exit 5
fi
# Split pairs
pairsplit -g $GROUP $MEMBER
echo "Waiting for split to complete."
let COUNTER=0
RESULT=-1
while [ "$RESULT" -ne "$RC_COMPLETE" ]
do
pairevtwait -g $GROUP $MEMBER -s psus -nomsg -t $SHORTTIMEOUT
RESULT=$?
let COUNTER=$COUNTER+$SHORTTIMEOUT
if [ "$COUNTER" -ge "$MASTERTIMEOUT" ]
then
echo "Error: Timeout while waiting for pair $GROUP to transition to PAIRED state"
pairevtwait -g $GROUP $MEMBER -nowait
echo "Return code was: ${RESULT}."
exit 6