Business Copy XP and/or Continuous Access XP for HPe3000

fi
done
echo
echo "Split has completed. We may now resume processing on source volumes."
echo
}
delete_pairs ()
{
# Split Business Copy pairs
date
echo "Deleting pairing of volumes for group $GROUP. "
# Checking for required state of SPLIT (guarentees syncing)
pairevtwait -g $GROUP $MEMBER -nowait -nomsg
RETURN="$?"
if [ $RETURN -ne $RC_SPLIT ]
then
echo "Error: Pairs $GROUP are not in PSUS state."
pairevtwait -g $GROUP $MEMBER -nowait
exit 7
fi
# Split pairs to Simplex state (delete)
pairsplit -g $GROUP $MEMBER -S
echo "Waiting for delete to complete."
pairevtwait -nomsg -s smpl -g $GROUP $MEMBER -t $SHORTTIMEOUT
RETURN="$?"
if [ "$RETURN" -ne $RC_COMPLETE ]
then
echo "Error: Pairs did not transition into SMPL state in $SHORTTIMEOUT seconds."
pairevtwait -g $GROUP $MEMBER -nowait
echo "Return code was: ${RETURN}."
exit 8
fi
echo
echo "Delete has completed."
echo
}
resync_pairs ()
{
# Resync previously split Business Copy pairs
date
echo "Resyncing ${GROUP}."
# Check if in required Split state
pairevtwait -g $GROUP $MEMBER -nowait > /dev/null 2>&1
RETURN=$?
if [ "$RETURN" -ne "$RC_SPLIT" ]
then
echo "Error: Volumes $GROUP are not in a PSUS state!"
pairevtwait -g $GROUP $MEMBER -nowait
echo "Return code was: ${RETURN}."
exit 9
fi
# Resync Split volumes back to paired state
pairresync -g $GROUP $MEMBER -c 15
echo
echo "Waiting for differential synchronization to complete."
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}."