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

27
# and execute the appropriate commands.
if (( LVM_VER == 2 ))
then
vgcfgrestore
-
ll
-
t ${vgname} >/dev/null 2>&1
test_return 27
vgcfgr
estore ${vgname} >/dev/null 2>&1
else
vgcfgrestore
-
n ${vgname}
-
ll
-
t >/dev/null 2>&1
test_return 27
vgcfgrestore
-
n ${vgname}
-
ll |
\
awk '/PV Name/ {print $3}' | while read pvname
do
vgcfgrestore
-
n ${vgname} ${pvname} >/dev/null 2>&1
done
fi
fi
activation_check $I
test_return 53
echo "$(date '+%b %e %T')
-
Node
\
"$(hostname)
\
": Activating volume group
$I ."
result=$($VGCHANGE $
I 2>&1)
test_return 1
case $result in
*volume*group*does*not*exist*)
echo
-
e "
\
t$result"
#this will set $? to 1
let 0
test_return 1
;;
esac
done
}
#This
function is used to kill the user to freeup a mountpoint
#that could be busy and then do the mount operation.
#freeup_busy_mountpoint_and_mount_fs(w, x, z)
#
w = Logical volume group to be mounted.
#
x = File System where the logical volume is to be m
ounted.
# z = Mount Options to be used for mount operation, including
#
file system type if applicable
#
function freeup_busy_mountpoint_and_mount_fs
{
local vol_to_mount
local mount_pt
local fs_mount_opt
vol_to_mount=$1
mount_pt=$2
shift 2
fs_mount_opt=$*
echo "WARNING: Running fuser on ${mount_pt} to remove anyone using the busy
mount point directly."
UM_COUNT=0
RET=1
# The control script exits, if the mount failed after
# retrying FS_MOUN
T_RETRY_COUNT times.
while (( $UM_COUNT < $FS_MOUNT_RETRY_COUNT ))
do