Unmount any local volume copies
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .The
sun_erm.ksh
Script
Remote Mirroring of an Oracle Database Using Data Replicator Software
C-25
# Check script variables and file access #
##############################################
clear
display "Begin sun_erm.ksh script, checking configuration"
# Need sleep to allow display to function correctly
sleep 1
if [[ ${#VOL_MNT[*]} -ne MIRROR_NUM || ${#VOL_FC[*]} -ne
MIRROR_NUM || ${#VOL_VC[*]} -ne MIRROR_NUM ]]; then
Kill_WAIT 1
echo "\t${B1}ERROR:${EB} Configuration file variables do
not match!"
echo "\tPlease edit the $CFG_FILE and verify the
variables."
echo "\nExiting Now!"; exit 2
else
echo "`date +%T` SUCCESS - Array variables match." >> $LOG
fi
# Verify SMcli is installed and executable
if [[ -x /usr/sbin/SMcli ]]; then
echo `date +%T`" SUCCESS - SMcli status is good." >> $LOG
Kill_WAIT 0
else
Kill_WAIT 1
echo "\t${B1}ERROR:${EB} You must have SMcli installed
and have executable status to use this script"
echo `date +%T`" ERROR: 3 - You must have SMcli installed
and executable status to it." >> $LOG
echo "Exiting now!"; exit 3
fi
######################################
#
Check storage system status
#
######################################
display "Checking status of subsystem: $RMT_SUBSYSTEM"
# Write command to $TRACE file for debugging
echo "# SMcli -n \"$RMT_SUBSYSTEM\" -S -c \"show storagesubsystem
healthStatus;\" -o \"$RMT_LOG_DIR/
${RMT_SUBSYSTEM}_status.tmp\"" >> $TRACE
# Do not use spaces in subsystem names.
SMcli -n "$RMT_SUBSYSTEM" -S -c "show storagesubsystem
healthStatus;" -o "$RMT_LOG_DIR/${RMT_SUBSYSTEM}_status.tmp"
2>>$TRACE
if [[ `grep -c "optimal" $RMT_LOG_DIR/
${RMT_SUBSYSTEM}_status.tmp` -ge 1 ]]; then
Kill_WAIT 0