background image
<< Establish Volume Copies | Export AIX volume groups >>
<< Establish Volume Copies | Export AIX volume groups >>

Check status of Volume Copy

Oracle on the AIX OS Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B-26
Remote Mirroring of an Oracle Database Using Data Replicator Software
copyPriority=$VC_PRIORITY targetReadOnlyEnabled=FALSE;" -
o $RMT_LOG_DIR/${VOL_VC[$1]}_est.log 2>>$TRACE
STATUS=$?
fi
echo "# rm $RMT_LOG_DIR/${VOL_VC[$1]}.vc_status" >> $TRACE
rm $RMT_LOG_DIR/${VOL_VC[$1]}.vc_status >> $TRACE 2>&1
if (( STATUS != 0 )); then
echo `date +%T`" ERROR: 36 - Unable to establish
${VOL_VC[$1]} Volume Copy, errorcode $STATUS ***" >> $LOG
Kill_WAIT 1
echo "\t${B1}ERROR: 36${EB} Unable to establish
${VOL_VC[$1]} Volume Copy, STATUS=$STATUS."
return 1
else
echo "# rm $RMT_LOG_DIR/${VOL_VC[$1]}_est.log" >> $TRACE
rm $RMT_LOG_DIR/${VOL_VC[$1]}_est.log >> $TRACE 2>&1
echo `date +%T`" SUCCESS - Volume Copy of
${VOL_VC[$1]} created." >> $LOG
Kill_WAIT 0
return 0
fi
}
vc_wait ()
{
#-------------------------------------------------------------
# FUNCTION to check status of Volume Copy
#-------------------------------------------------------------
# Args:
# $1 = Number of volumes to process ${#VOL_MNT[*]}
typeset -i VC_STATUS=0 TEMP=0
display "Checking Volume Copy status"
COUNT=0
while (( COUNT < $1 )); do
echo "# SMcli -n \"$RMT_ARRAY\" -S -c \"show
volumeCopy target [\"${VOL_VC[$COUNT]}\"];\" -o $RMT_LOG_DIR/
vc_vol.$COUNT" >> $TRACE
SMcli -n "$RMT_ARRAY" -S -c "show volumeCopy
target [\"${VOL_VC[$COUNT]}\"];" \
-o $RMT_LOG_DIR/vc_vol.$COUNT 2>>$TRACE
TEMP=$(grep -c 'In progress' $RMT_LOG_DIR/
vc_vol.$COUNT)
VC_STATUS=$((VC_STATUS+TEMP))
COUNT=$((COUNT+1));
done
echo "# rm $RMT_LOG_DIR/vc_vol.*" >> $TRACE