Setting up an HP SIM server 6.0 or greater on a Linux-based Serviceguard Cluster White Paper 444847-004, February 2010

35
echo "$(date '+%b %e %T')
-
Node
\
"$(hostname)
\
": Halting service
$I"
cmhaltserv $I
test_return 9
done
}
# For each IP address/subnet pair, remove the IP address from the
subnet
# using cmmodnet(1m).
#
function remove_ip_address
{
S=0
for I in ${IP[@]}
do
echo "$(date '+%b %e %T')
-
Node
\
"$(hostname)
\
": Remove IP address
$I from subnet ${SUBNET[$S]}"
XX=$( cmmodnet
-
r
-
i $I ${SUBNET[$S]} 2>&1 )
if (( $? !=
0 ))
then
if echo $XX | grep "is not configured on the subnet" >/dev/null
2>&1
then
echo "$XX" >> $log_file
# `let 0` is used to set the value of $? to 1.
# The function test_return requires $? to be set
# to 1 if it has to print error m
essage.
let 0
test_return 12
fi
fi
(( S = $S + 1 ))
done
}
# Unmount each file system.
#
function umount_fs
{
typeset
-
i j=0
typeset
-
i L
typeset
-
i UM_CNT
typeset
-
i ret
if [[ ${GFS} == "YE
S" ]]
then
return 0
fi
UM_CNT=${FS_UMOUNT_COUNT:
-
1}
if (( ${UM_CNT} < 1 ))
then
UM_CNT=1
fi
L=${#LV[*]}
# Perform parallel file system umounts for better performance.