Setting up HP SIM 5.x on an HP-UX Serviceguard Cluster (448492-002, February 2008)

26
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"
printf "******************* WARNING
***************************
\
n
\
n"
printf "Forcing activation can lead to data corruption if
\
n"
printf "
\
"$hostid
\
" is still runn
ing and has
\
"$vg
\
"
\
n"
printf "active. It is imperitive to positively determine that
\
n"
printf "
\
"$hostid
\
" is not running prior to performing
\
n"
printf "this operation.
\
n
\
n"
printf
"*********
**********************************************
\
n
\
n"
printf "To force activate
\
"$vg
\
", execute the following
\
n"
printf "command on the local system:
\
n"
printf " vgchange
--
deltag $hostid $vg
\
n
\
n"
printf "The package may then be restarted via either
\
n"
printf "cmmodpkg(1M) or cmrunpkg(1M) commands.
\
n
\
n"
return 2;;
esac
else
ok_to_activate=1
fi
else
ok_to_ac
tivate=1
fi
if (( ok_to_activate == 1 )); then
vg_tag addtag ${vg} ${host}
fi
return 0
}
# This function will activate (raidstart) any md devices
# that are used by the VG's defined in this package.
#
function activate_md
{
fo
r I in ${MD[@]}
do
echo "$(date '+%b %e %T')
-
Node
\
"$(hostname)
\
": Starting md $I ."
$RAIDSTART $I
test_return 25
done
}
# This function will activate a volume group
#
function activate_volume_group
{
typeset vgname
typeset pvname
typeset
-
i numvg
mygrep="grep
-
w "
num=0
for I in ${VG[@]}
do
vgname=${I##*/}
numvg=$(vgdisplay | grep
-
w
-
e ${vgname} | wc
-
l)
if (( numvg == 0 && ${#MD[*]} > 0 ))
then
# First l
ets do a sanity check to see if the vg really has
# a configuration backup. If not then we report this and
# exit. It is a prereq that a vgcfgbackup be done after
# the vg configuration is built and before sg is started.
#
Perform a check to see if it is LVM Version 2 or LVM version 1