Knowledge Base Article

Drive Up Script for Netbackup

Hi Folks,

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. smiley

 

Usage:

I acknowledge its a bit crude and fine tuning is required, which i'll do that at liesure wink.

 

The script consists of 3 parts.

Main Script.

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
./a >c
./d >e
./e


====================================================================


=========== Script D ============================================
while read line
do
a=`echo $line | cut -f1 -d' '`
if [ $a = SERVER]
then
ser=`echo $line | cut -f2 -d''`
else
echo 'vmoprcmd -h $ser -up $a"
fi
done < /user/nbhelp/c
====================================================================

=========== Script a ============================================
for i in `cat /user/nbhelp/b`
do
echo 'SERVER $i"
vmoprcmd -dp -h $i | grep DoWN | grep -v MISSING
done

====================================================================

 

Thanks!

Satkay Satish

Published 14 years ago
Version 1.0

Was this article helpful?