background image
<< Read in global script variables | Recreate snapshots >>
<< Read in global script variables | Recreate snapshots >>

Unmount volumes

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .The
sun_erm.ksh
Script
Remote Mirroring of an Oracle Database Using Data Replicator Software
C-17
fi
# Sets Flash Copy script log file...
LOG=$RMT_LOG_DIR/sun_erm_${RMT_HOST}_log.`date +%m%d%y'.'%H%M`
# Used to capture all stdout and errors during execution.
TRACE=$RMT_LOG_DIR/sun_erm_$RMT_HOST.trace
echo "Trace started at `date +%T` on `date +%A' '%B', '%d' '%Y`"
> $TRACE
echo `date +%T`" Started on `date +%A' '%B' '%e', '%Y' @
'%H:%M`" >> $LOG
chmod 777 $LOG
echo `date +%T`" Using config file $RMT_SCRIPT_DIR/$CFG_FILE"
>> $LOG
chmod 777 $TRACE
# BEGIN Defined Functions
unmount ()
{
###########################################
# FUNCTION used to unmount volumes #
###########################################
# Args:
# $1 = Index number of volume to process
if [[ $VERIFY -eq 1 ]]; then
set -n
elif [[ $DEBUG -eq 1 && $VERIFY -eq 0 ]]; then
set -x
fi
display "Unmounting ${VOL_MNT[$1]}"
# Write command to $TRACE file for debugging
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