Business Copy XP and/or Continuous Access XP for HPe3000
echo "Waiting for pairs to transition to PAIRED state."
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
exit 12
fi
done
echo "Volumes in group $GROUP synced. Copy completed"
date
}
display_pairs ()
{
# Display config and status of Business Copy pairs
pairdisplay -g $GROUP $MEMBER -fxc
}
#########################
# Main Body of Code #
#########################
# Check if required number of parms
if [ "$#" -lt 2 ]
then
echo "Usage: $0 GROUP ACTION [MEMBER]"
echo "Must supply the HORCM Group name and action (member optional) to be performed."
exit 1
fi
check_raidmgr
# Get BC group name and action to perform
GROUP=$1
ACTION=$2
DEVICE=$3
if [ -z "$DEVICE" ]
then
MEMBER=""
else
MEMBER="-d $DEVICE"
fi
# Select and execute action
case "$ACTION"
in
'create') create_pairs
break;;
'split') split_pairs
break;;
'delete') delete_pairs
break;;
'resync') resync_pairs
break;;
'diffrestore') restore_pairs_diff
break;;
'fullrestore') restore_pairs_full
break;;
'display') display_pairs
break;;
*) echo "Error: Unknown Action $ACTION requested!"
exit 2;;
esac
exit 0