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

33
typeset pids_list
while (( L > 0 ))
do
j=0
whi
le (( j < CONCURRENT_MOUNT_AND_UMOUNT_OPERATIONS && L > 0 ))
do
(( L = L
-
1 ))
K=${FS[$L]}
I=${LV[$L]}
mount | grep
-
e " "$K" " > /dev/null 2>&1
if (( $? == 0 ))
then
echo "$(date '+%b %e %T')
-
Node
\
"$(hostname)
\
": Unmounting fil
esystem
on $K"
(
result=$(umount ${FS_UMOUNT_OPT[$L]} $K 2>&1)
ret=$?
if (( ret != 0 ))
then
case $result in
*not*mounted*)
(( ret = 0 ))
;;
*)
echo "WARNING: Running fuser to remove anyone using the file
system directly."
;;
esac
fi
UM_COUNT=$UM_CNT
while (( ret != 0 && $UM_COUNT > 0 ))
do
fuser
-
ku
vm $I
umount ${FS_UMOUNT_OPT[$L]} $K
ret=$?
(( UM_COUNT = $UM_COUNT
-
1 ))
if (( $ret != 0 ))
then
if (( $UM_COUNT > 0 ))
then
echo "$(date '+%b %e %T')
-
WARNING:
Unmount failed,
trying again."
sleep 1
fi
fi
done
return $ret
)&
# save the process id and name of logical volume to be used later
#
while checking the exit status
pids_list[$j]="$!"
(( j = j + 1 ))
fi
done
# wait for background umount processes to finish
while (( j > 0 ))
do
pid=${pids_list[$j
-
1]}
wait $pid
if
(( $? != 0 ))
then
let 0
test_return 13
fi