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

37
# wait for backgr
ound umount processes to finish
while (( j > 0 ))
do
pid=${pids_list[$j
-
1]}
wait $pid
if (( $? != 0 ))
then
let 0
test_return 13
fi
(( j = j
-
1 ))
done
do
ne
}
# This function deactivates volume groups
#
function deactivate_volume_group
{
typeset result
for I in ${VG[@]}
do
echo "$(date '+%b %e %T')
-
Node
\
"$(hostname)
\
": Deactivating
volume group $I"
(( repeat=${#LV[*]}*2 ))
while (( repe
at > 0 )); do
result=$(vgchange
--
test
-
a n $I 2>&1)
case $result in
*Can*t*deactivate*volume*group*with*open*logical*volume*)
sleep 1
(( repeat = repeat
-
1 ))
echo "VG $I is busy, will try
deactivation..."
;;
*)
repeat=0
;;
esac
done
result=$(vgchange
-
a n $I 2>&1)
case $result in
*successfully*deactivated*)
;;
*0*logical*volume*in*volume*
group*now*active*)
;;
*)
echo
-
e "
\
t$result"
#this will set $? to 1
let 0
test_return 14
;;
esac
#
lvm_sanity_check $I
if (( $? == 0
))
then
# VG has been deactivated, remove the tag.