background image
<< Export AIX volume groups | Import AIX volume groups >>
<< Export AIX volume groups | Import AIX volume groups >>

Rebuild AIX volume groups

Oracle on the AIX OS Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B-28
Remote Mirroring of an Oracle Database Using Data Replicator Software
COUNT=$((COUNT+1))
done
COUNT=0
while (( COUNT < ${#VOL_HD[*]} )); do
display "Resetting physical disk ${VOL_HD[$COUNT]}"
# chdev is suppose to work, but... I find removing
the device to work more reliably.
# echo "# chdev -l ${VOL_HD[$COUNT]} -a pv=clear"
>> $TRACE
# chdev -l ${VOL_HD[$COUNT]} -a pv=clear >> $TRACE
2>&1
echo "# rmdev -dl ${VOL_HD[$COUNT]}" >> $TRACE 2>&1
rmdev -dl ${VOL_HD[$COUNT]} >> $TRACE 2>&1
STATUS=$?
if (( STATUS > 0 )); then
Kill_WAIT 1
echo "\t${B1}ERROR: XX${EB} Unable to
reset ${VOL_HD[$COUNT]}"
echo `date +%T`" ERROR: XX - Can not
remove device ${VOL_HD[$COUNT]}, errorcode $STATUS" >> $LOG
else
echo `date +%T`" SUCCESS - Removed device
${VOL_HD[$COUNT]}" >> $LOG
Kill_WAIT 0
fi
COUNT=$((COUNT+1))
done
}
vgimport ()
{
#-------------------------------------------------------------
# FUNCTION used to rebuild/import AIX volume groups
#-------------------------------------------------------------
# Args:
# No Arguments
typeset TMP NAME NEW_NAME NEW_MOUNT
if [[ $DEBUG -eq 1 ]]; then
set -x
fi
display "Rebuilding list of physical disks"
echo "# hot_add" >> $TRACE
hot_add >> $TRACE 2>&1
Kill_WAIT 0