Discover new arrays
Oracle on the AIX OS Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B-8
Remote Mirroring of an Oracle Database Using Data Replicator Software
#---------------------------
ANS=N
echo "\n\nGathering arrays known to this host....\c"
rotate &
RPID=$!
# The following calls SMcli to load a temp file with a list of
known arrays.
/usr/sbin/SMcli -d -v -S |awk -F'\t' '{print $1}' |uniq >
${TMP_FILE[1]}
kill -9 $RPID
echo "\n"
cat ${TMP_FILE[1]}
echo "Are all the arrays to be used listed here (Y or N)? [
]\b\b\c"
read ANS
# This loop will prompt the user to discover new arrays via a
menu option.
while [[ $ANS != 'Y' ]]; do
PS3="
Enter SMcli discovery choice: "
clear
echo "\nAvailable options are:\n"
echo " Auto - Autodiscover all arrays on network. (May
take awhile!)"
echo " Manual - Manually enter the IP address(es) of the
array"
echo " Print - Display currently configured arrays"
echo " Done - Done adding array(s)\n"
select TEMP in Auto Manual Print Done
do
case $TEMP in
Auto) clear
echo "Auto discovering arrays, please
wait...\c"
rotate &
RPID=$!
/usr/sbin/SMcli -A
kill -9 $RPID
echo "\n\nPress Enter to continue.\c"
read BLANK
break ;;
Manual) clear
echo "\n\nEnter the first IP address of
the array to add: \c"
read IP1_ADDR
echo "\nEnter the second IP address of
the array to add: \c"
read IP2_ADDR