Veritas-bu

[Veritas-bu] automated ejection of full tapes

2004-02-03 05:38:47
Subject: [Veritas-bu] automated ejection of full tapes
From: Dave Markham" <dave.markham AT fjserv DOT net (Dave Markham)
Date: Tue, 3 Feb 2004 10:38:47 -0000
This is a multi-part message in MIME format.

------=_NextPart_000_0031_01C3EA41.E79F3390
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I wrote something similar to this ages ago. Would find tapes used in a =
schedule and then go through a loop moving them to the inport.
I found it easier in the end to just tell the ops guys the barcodes of =
tapes to remove and they manually open the library up rather than =
waiting for tapes at an inport.

I also let them know which tapes are full with this script :-

You will need to change the awk find statement for your robot.


#!/bin/sh
#set -x

VMDIR=3D/usr/openv/volmgr/bin
NBUDIR=3D/usr/openv/netbackup/bin
NBUDIRA=3D$NBUDIR/admincmd
JBINV=3D/tmp/tcinv

#robot parameters
if [ -r /tmp/robot ];then
        ROBOT=3D`cat /tmp/robot`
else
        ROBOT=3D`/opt/openv/volmgr/bin/sgscan | awk -F: '/P1000/ {print =
$1}'`
        echo $ROBOT > /tmp/robot
fi

ROBCMD=3D"$VMDIR/tldtest -r $ROBOT"

#Get Jukebox Inventory
get_jb_inv()
{
        cp $JBINV $JBINV.old
        echo "s s" | $ROBCMD | egrep "slot|Barcode" > $JBINV
}


#Command finds full tapes
bpmedialist -mlist -l | awk ' { if ( int($15/8)%2 ) {print $1} }'  > =
/tmp/tapechk

get_jb_inv

echo ""
echo "Tapes contained in L1000 which are Full"
echo ""
for x in `cat /tmp/tapechk`
do
        grep $x $JBINV > /dev/null
        if [ $? =3D 0 ];then
                $VMDIR/vmquery -m $x | egrep "media ID|pool"
        fi
done





Hope this helps
Dave
  ----- Original Message -----=20
  From: koconnor AT midsouth.rr DOT com=20
  To: veritas-bu AT mailman.eng.auburn DOT edu=20
  Sent: Wednesday, February 04, 2004 12:54 AM
  Subject: [Veritas-bu] automated ejection of full tapes



  Does anyone have a script that will take the info from, say the =
bpmedialist output, create a list, and eject the FULL tapes from a TLD =
library to the mail slots?  I have checked the archives and found a few =
examples that were similar, but a bit more elaborate than what I need.  =
I think from the research=20
  I have done, that you can use the vmquery command with the -ev option =
for the eject?  I would appreciate any suggestions/help.  BTW, I am =
running Netbackup 4.5 on Solaris 2.6 with a StorEdge L11000 that has 10 =
mail slots.  Drives are DLT 7000.  Thanks again.
------=_NextPart_000_0031_01C3EA41.E79F3390
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I wrote something similar to this ages =
ago. Would=20
find tapes used in a schedule and then go through a loop moving them to =
the=20
inport.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I found it easier in the end to just =
tell the ops=20
guys the barcodes of tapes to remove and they manually open the library =
up=20
rather than waiting for tapes at an inport.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I also let them know which tapes are =
full with this=20
script :-</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>You will need to change the awk find =
statement for=20
your robot.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#!/bin/sh<BR>#set -x</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>VMDIR=3D/usr/openv/volmgr/bin<BR>NBUDIR=3D/usr/openv/netbackup/b=
in<BR>NBUDIRA=3D$NBUDIR/admincmd<BR>JBINV=3D/tmp/tcinv</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#robot parameters<BR>if [ -r /tmp/robot =

];then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ROBOT=3D`cat=20
/tmp/robot`<BR>else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
ROBOT=3D`/opt/openv/volmgr/bin/sgscan | awk -F: '/P1000/ {print=20
$1}'`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo $ROBOT &gt;=20
/tmp/robot<BR>fi</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>ROBCMD=3D"$VMDIR/tldtest -r =
$ROBOT"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#Get Jukebox=20
Inventory<BR>get_jb_inv()<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; cp=20
$JBINV $JBINV.old<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "s =
s" |=20
$ROBCMD | egrep "slot|Barcode" &gt; $JBINV<BR>}</FONT></DIV>
<DIV>&nbsp;</DIV><FONT face=3DArial size=3D2>
<DIV><BR>#Command finds full tapes<BR>bpmedialist -mlist -l | awk ' { if =
(=20
int($15/8)%2 ) {print $1} }'&nbsp; &gt; /tmp/tapechk</DIV>
<DIV>&nbsp;</DIV>
<DIV>get_jb_inv</DIV>
<DIV>&nbsp;</DIV>
<DIV>echo ""<BR>echo "Tapes contained in L1000 which are Full"<BR>echo =
""<BR>for=20
x in `cat =
/tmp/tapechk`<BR>do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; grep=20
$x $JBINV &gt; /dev/null<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
if [ $? =3D=20
0=20
];then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
$VMDIR/vmquery -m $x | egrep "media=20
ID|pool"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
fi<BR>done<BR></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Hope this helps</DIV>
<DIV>Dave</DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Dkoconnor AT midsouth.rr DOT com=20
  href=3D"mailto:koconnor AT midsouth.rr DOT com">koconnor AT midsouth.rr DOT 
com</A> =
</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
  title=3Dveritas-bu AT mailman.eng.auburn DOT edu=20
  =
href=3D"mailto:veritas-bu AT mailman.eng.auburn DOT edu">veritas-bu AT mailman 
DOT eng.=
auburn.edu</A>=20
  </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Wednesday, February 04, =
2004 12:54=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Veritas-bu] automated =
ejection=20
  of full tapes</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Does anyone have a script that will =
take the info=20
  from, say the bpmedialist output,&nbsp;create a list, and eject the =
FULL=20
  tapes&nbsp;from a TLD library to the mail slots?&nbsp;&nbsp;I have =
checked the=20
  archives and found a few examples that were similar, but a bit more =
elaborate=20
  than what I need.&nbsp; I think from the research </FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>I have done, that you can use the =
vmquery=20
  command&nbsp;with the -ev option for the eject?&nbsp; I&nbsp;would =
appreciate=20
  any suggestions/help.&nbsp; BTW, I am running Netbackup 4.5 on Solaris =
2.6=20
  with a StorEdge L11000&nbsp;that has&nbsp;10 mail slots.&nbsp; Drives =
are DLT=20
  7000.&nbsp; Thanks again.</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0031_01C3EA41.E79F3390--


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