Business Copy XP and/or Continuous Access XP for HPe3000
#!/usr/bin/ksh
# UNISRC_ID @(#)pairs_control: $Revision: 1.0 $ $Date: 99/10/07 16:38:00 $
# MWR991007
# Sample script to illustrate how to manipulate Hewlett-Packard
# Business Copy volume pairs via command line
# Alter PATH if needed
PATH=$PATH:/HORCM/usr/bin/
# Set Envirnment for HORCM instance
export HORCMINST=0
# Set Env to select Business Copy operations vs CA operations
export HORCC_MRCF=1
# Set timeout variables in seconds
let MASTERTIMEOUT=10000
let SHORTTIMEOUT=600
# Set return or completion codes
RC_COMPLETE=0
RC_SIMPLEX=1
RC_PAIRED=3
RC_SPLIT=4
# Minimum rev of RAID Mgr for differential restore
DIFF_RESTORE_REV="010203"
# Minimum rev of microcode for differential restore
DIFF_RESTORE_MICROCODE="524251"
##########################
# Functions Declarations #
##########################
check_raidmgr ()
# Check if RAIDMgr exists and set revision
{
whence raidqry > /dev/null 2>&1
if [ "$?" -ne 0 ]
then
echo "RAID Manager Software not detected on system!"
exit 1
fi
# Get Rev of RAIDMgr
RMGR_REV=`raidqry -? 2>&1 |grep "^Ver&Rev"|awk '{print $2}'|tr -d "."`
if [ $RMGR_REV -ge $DIFF_RESTORE_REV ]
then
DIFF_RESTORE_RMGR=1
else
DIFF_RESTORE_RMGR=0
fi
# Verify HORCM instance connection
raidqry -l > /dev/null
if [ "$?" -ne 0 ]
then
echo "Cannot make connection to horcm instance!"
exit 1
fi
# Get array microcode version
MICROCODE_REV=`raidqry -l|tail +2|awk '{print $7}'|cut -c 1-8|tr -d "-"`
if [ $MICROCODE_REV -ge $DIFF_RESTORE_MICROCODE ]
then
DIFF_RESTORE_MICROCODE=1
else
DIFF_RESTORE_MICROCODE=0
fi
if [ $DIFF_RESTORE_MICROCODE -eq 1 -a $DIFF_RESTORE_RMGR -eq 1 ]
then
CAN_DIFF_RESTORE=1
else
CAN_DIFF_RESTORE=0
fi
#echo "DIFF_RESTORE_MICROCODE=${DIFF_RESTORE_MICROCODE} \012
#DIFF_RESTORE_RMGR=${DIFF_RESTORE_RMGR} \012