I wrote this script last year during my engagement with a major bank in India. The customer had 150 media servers and it was cumbersome and time consuming to up the drives.
Along with using this script, Its adviceable to closely monitor the frequently going DOWN drives and suspected hardware errors should be fixed.
Hope its of help to NBU folks out there.
I acknowledge its a bit crude and fine tuning is required, which i'll do that at liesure .
The script consists of 3 parts.
Script called as a
Script called as d
Make these above three different scripts and call the main script for execution.
=========== Main Script ============================================
vmoprcmd | grep DOWN | grep -v MISSING | cut -f5 -d' ' | sort | uniq > b
=========== Script D ============================================
while read line
a=`echo $line | cut -f1 -d' '`
if [ $a = SERVER]
ser=`echo $line | cut -f2 -d''`
echo 'vmoprcmd -h $ser -up $a"
done < /user/nbhelp/c
=========== Script a ============================================
for i in `cat /user/nbhelp/b`
echo 'SERVER $i"
vmoprcmd -dp -h $i | grep DoWN | grep -v MISSING
By any chance do yu have the script for a windows environment?