[Veritas-bu] available_media fix (was Re: [Veritas-bu] Solution not band-aid

2000-02-23 11:06:15
Subject: [Veritas-bu] available_media fix (was Re: [Veritas-bu] Solution not band-aid
From: Rob Worman rob AT colltech DOT com
Date: Wed, 23 Feb 2000 10:06:15 -0600
Hi Brian-

Don't necessarily trust the available media script when it tells that 
a tape's status is DBBACKUP.  It's certainly possible to have "extra" 
tapes which are marked for DB backups, but more likely it's a bug in 
the available_media script.  IIRC the bpmedialist call (which is 
inefficiently called hundreds or thousands of times, depending on how 
many tapes you have, see fix below) occasionally hits a snag and 
doesn't return info on one of your tapes and in this case the tape 
gets the "DBBACKUP" status assigned.

Here's what I suggest - not only is it a fix, but it will 
tremendously speed up your available_media script if you have a lot 
of tapes.  (e.g. surveying 600 tapes takes about 45 seconds instead 
of 10 minutes)

Edit the available_media shell script like so:  (I'm looking at a box 
running 3.1.1 at the moment, but the 3.2 available_media script is 
identical or close enough)

1--go to the line "cat $VMPOOL_OUTPUT |"
    (line 152 for me)

2--BEFORE this line, add the following command:
     /usr/openv/netbackup/bin/admincmd/bpmedialist -mlist -l > 

   (this command should be all one line, and that's a
    lowercase "L" flag, not the digit "1")

3--go to the line where bpmedialist is being piped to a while loop
    (line 177 for me)

4--comment out the bpmedialist line, and replace it with the following:

         grep $vmediaid /tmp/vmedialist.out 2>/dev/null |

   (don't forget that pipe at the end....)

sorry, the above fix won't necessarily work on an NT Master server :))


>Being new to this list my question maybe a repeat, if so please point me
>to the archives and I will be a happy person but.....
>When I run the available_media script on a 3.2 NBU box I get the
>DBBACKUP listing on some tapes.  Yes I know how to get rid of it and
>change it back to the correct pool.  What I am looking for is a way to
>prevent this from happening.  It is happening with more freq. and would
>like to solve it not band-aid it.
>Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu

Rob Worman, Consultant
Collective Technologies           cell: 612/802-6850
"The Power of Many Minds"         alpha page: 1-800-946-4646, pin=1422494

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