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

28
(( UM_COUNT = $UM_COUNT + 1 ))
fuser
-
kuv ${mount_pt}
if (($UM_COUNT == $FS_MOUNT_RETRY_COUNT))
then
mount ${fs_mount_opt} ${vol_to_mount} ${mount
_pt}
test_return 17
else
mount ${fs_mount_opt} ${vol_to_mount} ${mount_pt}
(( RET = $? ))
if (( $RET == 0 ))
then
break
else
sleep 1
fi
fi
done
}
# For each {file system/device} pair, fsck the file system
# and mount it.
#
# If the underlying file system is Red Hat GFS, mount the file system
# if it is not already mounted; fsck operations are not performed for
# GFS.
#
#
If the mount point is busy and if FS_MOUNT_RETRY_COUNT = 0,
# mounting of the file system will fail and the control script
# will exit with an error.
#
function check_and_mount
{
typeset
-
i j=0
typeset pids_list
if [[ ${GFS} == "NO" ]]
t
hen
# Verify that there is at least one file system to check and what type.
if (( ${#LV[*]} > 0 ))
then
echo "$(date '+%b %e %T')
-
Node
\
"$(hostname)
\
": Checking
filesystems:"
echo ${LV[@]} | tr ' ' '
\
012' | sed
-
e 's/^/
/'
# Perform parallel fsck's for better performance.
# Limit the number of concurrent fsck to CONCURRENT_FSCK_OPERATIONS
R=0
while (( R < ${#LV[*]} ))
do
j=0
while (( j < CONCURRENT_
FSCK_OPERATIONS && R < ${#LV[*]} ))
do
(
case ${FS_TYPE[$R]} in
ext2|ext3) e2fsck ${FS_FSCK_OPT[$R]}
-
y ${LV[$R]}
# on linux fsck will return a 1 if filesystem errors
# were corrected. This means that the filesystem was
# dirty but is now clean so we should be able to
# continue. Any other errors we should abort as normal.
if (( $? > 1 ))
then
# this will set $? to 1
let 0
test_return 2
fi
;;