Veritas-bu

[Veritas-bu] drive status

2003-05-27 05:35:55
Subject: [Veritas-bu] drive status
From: Dave Markham" <dave.markham AT icl DOT net (Dave Markham)
Date: Tue, 27 May 2003 10:35:55 +0100
Here is a script which i run which automatically ups downed drives. If you
want to manually do it, just rip out the commands and adjust the parameters.
If stuck let me know and I can explain more.

********** SCRIPT START ***********

#!/bin/sh
#
#Script to check status of drives and UP them if they are DOWN
#
NBU=/usr/openv/netbackup/bin
ADMCMD=$NBU/admincmd
VOLMGR=/usr/openv/volmgr/bin
#SERVERS=`$ADMCMD/bpstulist | awk '{print $3}' | sort -u`
SERVERS=`hostname`
LOGFILE=/var/netbackup/drivewatch.log
MAIL="another_address AT domain DOT com"
#
#Clean up log
for SERVER in $SERVERS
do
if [ -s $LOGFILE ];then
rm $LOGFILE
fi
done
# Clean up done
#
for x in $SERVERS
do
$VOLMGR/vmoprcmd -h $x -d ds | grep TLD | grep DOWN > /dev/null 2>&1
if [ $? -ne 1 ];then
        echo "Please Check DLT drives on Media Server $x:

`$VOLMGR/vmoprcmd -d ds -h $x`

Will attempt to place drive(s) in UP STATUS" > $LOGFILE
        echo "" >> $LOGFILE

        for drives in `$VOLMGR/vmoprcmd -d ds -h $x | tail +5 | grep TLD |
grep
DOWN | awk '{print $1}'`
        do
                echo $x $drives
                $VOLMGR/vmoprcmd -up $drives -h $x
        done

        echo "****Check all logs to determine cause.****" >> $LOGFILE
        $VOLMGR/vmoprcmd -d ds >> $LOGFILE

        cat $LOGFILE | mailx -s "DLT Drivewatch for `uname -n`" $MAIL
someone_whoe_cares AT domain DOT com

fi
done
#
#Support may ask you to do below?
#/usr/openv/netbackup/bin/admincmd/bpschedreq -read_stunits


*********** SCRIPT END ************

----- Original Message ----- 
From: "ramon cunha" <kurbisgemuse AT hotmail DOT com>
To: <Veritas-bu AT mailman.eng.auburn DOT edu>
Sent: Friday, May 23, 2003 2:43 PM
Subject: [Veritas-bu] drive status


> how can i up a drive in the command line in a remote media server?
>
> _________________________________________________________________
> Add photos to your messages with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
> _______________________________________________
> Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
> http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


<Prev in Thread] Current Thread [Next in Thread>