Veritas-bu

[Veritas-bu] Drive Down logs?

2002-01-10 14:00:15
Subject: [Veritas-bu] Drive Down logs?
From: ggagnon AT ibasis DOT net (George Gagnon)
Date: Thu, 10 Jan 2002 14:00:15 -0500
Here is a script that automatically up's any downed drives. This has solved
my problem with the L700 cleaning tape downing the drive.

#! /bin/sh
#
############################################################################
##################
##
##    up_drives - Bring any DOWN drives back on-line
##                This script is intended to be run out of cron to keep any
downed
##                drives up. This will help prevent the vaults from hanging
for
##                long periods of time while waiting for tapes in downed
drives.
##                If there is a serious problem with a drive this script
will ignore
##                that and keep bringing it up which could be bad. A better
approach
##                would be to monitor the down-to-up transitions and only
re-up the
##                drives a set number of times. That would require a state
file to be
##                kept which is tougher.
##                Another solution would be to watch the vault log and only
go after
##                the tapes if the vault has been hanging for a long time.
Also a more
##                complicated solution.
##
##
############################################################################
##################
#

LOGFILE=/tmp/up_drive.log.$$
TMPFILE=/tmp/t_stats.$$
RCPT_LIST=""
DONT_CHECK=""

if [ $# -eq 1 ]
then
   case $1 in
       -[nN] )
           NOTIFY="Y"
           ;;

       * )
           echo "Unknown option: $1"
           exit 2
           ;;
   esac

else

   NOTIFY="N"

fi

if [ ! `/usr/openv/volmgr/bin/vmoprcmd -d ds | /usr/bin/grep -c DOWN` -eq 0
]
then

   ENABLED_DRIVES="N"
   /usr/bin/echo "Down drives detected on `uname -n`\n" >$LOGFILE
   /usr/openv/volmgr/bin/vmoprcmd -d ds >>$LOGFILE
   /usr/bin/echo "" >>$LOGFILE

   /usr/openv/volmgr/bin/vmoprcmd -d ds | /usr/bin/grep DOWN >$TMPFILE

   for drive in `/usr/bin/cat $TMPFILE | /usr/bin/awk '{print $1}'`
   do
      if [ "`/usr/bin/echo $DONT_CHECK | /usr/bin/grep -w  $drive`" != "" ]
      then
         /usr/bin/echo "*** Skipping drive $drive ***" >>$LOGFILE
      else
         /usr/bin/echo "Setting drive $drive to UP status" >>$LOGFILE
         /usr/openv/volmgr/bin/vmoprcmd -up $drive
         ENABLED_DRIVES="Y"
      fi
   done

   /usr/bin/echo "\nPlease verify that the drives are all set.\n" >>$LOGFILE

   # Send email to notify staff that drives were reset.
   if [ $NOTIFY = "Y" -a $ENABLED_DRIVES = "Y" ] ;
   then
      /usr/bin/cat $LOGFILE |/usr/bin/mailx -s "Drives enabled on
`/usr/bin/uname -n`" $RCPT_LIST
   else
      /usr/bin/more $LOGFILE
   fi

   /usr/bin/rm -rf $TMPFILE $LOGFILE

fi

exit 0

 -----Original Message-----
From:   Sokolowski Ric-ERS004 [mailto:Ric.Sokolowski AT motorola DOT com] 
Sent:   Thursday, January 10, 2002 1:53 PM
To:     'Robert.L.Harris AT rdlg DOT net'
Cc:     'veritas-bu AT mailman.eng.auburn DOT edu'
Subject:        RE: [Veritas-bu] Drive Down logs?

I've seen similar problems when NetBackup is unaware that a cleaning tape is
in the drive.  We use library controlled cleaning (L700) and occasionally,
the library will decide to clean a drive and when NB attempts to put another
tape into that drive, whamo, the drive gets downed.  Once the cleaning is
finished, the CLN tape is put back where it belongs but you're stuck with a
down drive.  With verbose logging on all Media Manager daemons, you should
see movement of the CLN tapes show up in syslog on your robotic controller
which corresponds to the downing of the drive.  HTH!

--
Regards,

Ric Sokolowski (Ric.Sokolowski AT motorola DOT com)
Staff Systems Engineer
Phone: (954) 723-6332  Pager: 8776050503 AT skytel DOT com
Motorola, Inc.  / CGISS / Enterprise Computing
8000 West Sunrise Blvd, MS 22-2F, Plantation, FL 33322

_______________________________________________
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>