/etc/vx/voladm.d/bin/disk.list
Parm Patram
Oracle, Linux and UNIX tips, tricks and stuff
/etc/vx/voladm.d/bin/disk.list
#!/bin/sh
#
# parmanand patram; 2010-11-25
# find and clear faulted VCS resource
#
# This script takes a list of VCS resource groups
# and clears any FAULTED states in the cluster.
# ex.
# clear_VCS_faulted.sh 'GROUP1 GROUP2 ...'
VCS_GROUPS=$1
VCS_BINPATH=/opt/VRTSvcs/bin
for VCS_GROUP in ${VCS_GROUPS}
do
# hares will show all resources of this group that are faulted
# but we will only need to clear based on the unique hostname
for SYS in `${VCS_BINPATH}/hares -display -group ${VCS_GROUP} -attribute State | grep FAULTED | awk '{print $3}' | sort | uniq`
do
#echo ${VCS_BINPATH}/hares -display -group ${VCS_GROUP} -attribute State | grep FAULTED
${VCS_BINPATH}/hagrp -clear ${VCS_GROUP} -sys ${SYS}
done
done




