Recreate Snapshots
Oracle on the AIX OS Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B-24
Remote Mirroring of an Oracle Database Using Data Replicator Software
if [[ $DEBUG -eq 1 ]]; then
set -x
fi
display "Unmounting ${VOL_MNT[$1]}"
echo "# umount ${VOL_MNT[$1]}" >> $TRACE
umount ${VOL_MNT[$1]} >> $TRACE 2>&1
sleep 1
if (( $(mount | grep -c "${VOL_MNT[$1]}") > 0 )); then
echo `date +%T`" ERROR: 32 - Unable to unmount
${VOL_MNT[$1]}!" >> $LOG
Kill_WAIT 1
echo "\t${B1}ERROR: 32${EB} - Unable to unmount
${VOL_MNT[$1]}! -- Exiting Now!"
exit 32
else
echo `date +%T`" SUCCESS - Volume ${VOL_MNT[$1]}
is unmounted." >> $LOG
Kill_WAIT 0
return 0
fi
}
recreate ()
{
#-------------------------------------------------------------
# FUNCTION used to recreate Snapshots
#-------------------------------------------------------------
# Args:
# $1 = Index number of volume to process
if [[ $DEBUG -eq 1 ]]; then
set -x
fi
display "Creating Snapshot of ${VOL_MNT[$1]}"
echo "# SMcli -n \"$RMT_ARRAY\" -S -c \"recreateSnapshot
volume [\"${VOL_SP[$1]}\"];\"" >> $TRACE
SMcli -n "$RMT_ARRAY" -S -c "recreateSnapshot volume
[\"${VOL_SP[$1]}\"];" >> $TRACE 2>&1
STATUS=$?
if (( STATUS != 0 )); then
Kill_WAIT 1
echo `date +%T`" ERROR: 30 - Unable to create
${VOL_SP[$1]} Snapshot, errorcode $STATUS ***" >> $LOG
echo "\t${B1}ERROR: 30${EB} Unable to create
${VOL_SP[$1]} Snapshot, STATUS=$STATUS."