Setting up an HP SIM server 5.x on a Linux-based Serviceguard Cluster 444847-003, March 2009

27
IFS=$OLDIFS
return 1
fi
#get the hostname of
the node
host=$(uname
-
n)
if (( $? != 0 )) ; then
printf "activation_check: Error in getting the hostname
\
n"
return 1
fi
#check hostid
if [[ "$hostid" != "" ]] ; then
status=""
if [[ $host != $ho
stid ]] ; then
cl_hostid=${hostid%%.*}
#get status of node
status=$(cmviewcl
-
f line
-
n $cl_hostid | grep state)
if (( $? != 0 )) ; then
#try again
status=$(cmviewcl
-
f line
-
n $
cl_hostid | grep state)
if (( $? != 0 )) ; then
#give up
printf "activation_check: Error in cmviewcl.
\
n"
printf "cmviewcl output:
\
n"
cmviewcl
-
n $cl_hostid
return 1
fi
fi
status=${status#*=}
case $status in
*ailed*)
printf "activation_check:
\
n$hostid status
failed..okay to activate $vg
\
n"
# remove the ol
d tag since that host is failed.
vg_tag deltag $vg $hostid
ok_to_activate=1
;;
*)
printf "activation_check:
\
n"
printf "Error $vg may still be activate
d on $hostid
\
n"
printf "To correct this situation, logon to
\
"$hostid
\
"
and
\
n"
printf "execute the following commands:
\
n"
printf " vgchange
-
a n $vg
\
n"
printf " vgchange
--
deltag $hostid $
vg
\
n
\
n"
printf "Once
\
"$vg
\
" has been deactivated from
\
"$hostid
\
",
\
n"
printf "this package may be restarted via either
cmmodpkg(1M)
\
n"
printf "or cmrunpkg(1M).
\
n
\
n"
printf "In the event that
\
"$hostid
\
" is either powered
off
\
n"
printf "or unable to boot, then
\
"$vg
\
" must be
forced
\
n"
printf "to be activated on this node.
\
n
\
n"