[Veritas-bu] expire tapes
2002-12-11 14:18:37
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C2A14A.1B416E80
Content-Type: text/plain
Here's my "obliterate_tape" script. It does everything to every tape - some
of which is unnecessary so sometimes there's non-critical error messages:
$ cat /usr/openv/local/obliterate_tape?
#/bin/ksh
PATH=$PATH:/usr/openv/netbackup/bin:/usr/openv/netbackup/bin/admincmd
PATH=$PATH:/usr/openv/volmgr/bin:/usr/openv/local
export PATH
if [ $# -eq 0 ]
then
echo "Usage: `basename $0` tapenum [tapenum...]"
else
echo "\n\nWARNING: This completely removes a tape from Netbackup,"
echo "destroying all data on the tape. Therefore, this could be a very"
echo "stupid move.\n"
response=""
while [ -z "$response" ]
do
echo "Are you sure. (y/N) \c"
read response
done
response=`echo $response | cut -c1 | tr 'a-z' 'A-Z'`
if [ "$response" != "Y" ]
then
echo "No action taken."
else
echo "OK - it's your funeral."
for tapenum in $*
do
echo "\nStarting $tapenum..."
echo " Erasing images."
bpexpdate -force -ev $tapenum -d 0
echo " Unfreezing tape."
bpmedia -unfreeze -ev $tapenum
echo " Unsuspending tape."
bpmedia -unsuspend -ev $tapenum
pool=`vmquery -w -m $tapenum | awk 'NR>3 {print $13}'`
status=`vmquery -w -m $tapenum | awk 'NR>3 {print $28}'`
echo " Deassigning tape: pool=$pool, status=$status"
vmquery -deassignbyid $tapenum $pool $status
echo " Deleting tape."
vmdelete -m $tapenum
done
fi
echo "Done."
fi
exit
-----Original Message-----
From: Timothy Arnold [mailto:timothy.arnold AT becta.org DOT uk]
Sent: Wednesday, December 11, 2002 11:26 AM
To: 'veritas-bu AT mailman.eng.auburn DOT edu'
Subject: [Veritas-bu] expire tapes
Hiya
Here is my question for today :-) How does one get rid of a media ID in
Netbackup VM? I know you can use bpexpdate but VM still thinks it is
available for use..
I want to completely get rid of it since we no longer need that set of
barcodes.
Cheers,
Tim.
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
------_=_NextPart_001_01C2A14A.1B416E80
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DUS-ASCII">
<META content=3D"MSHTML 5.50.4922.900" name=3DGENERATOR>
<STYLE>@font-face {
font-family: Wingdings;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; =
}
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=3DEN-US vLink=3Dpurple link=3Dblue>
<DIV><SPAN class=3D817131719-11122002><FONT face=3DArial =
color=3D#0000ff size=3D2>Here's=20
my "obliterate_tape" script. It does everything to every tape - =
some of=20
which is unnecessary so sometimes there's non-critical error=20
messages:</FONT></SPAN></DIV>
<DIV><SPAN class=3D817131719-11122002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D817131719-11122002><FONT face=3DArial =
color=3D#0000ff size=3D2>$ cat=20
/usr/openv/local/obliterate_tape?<BR>#/bin/ksh</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D817131719-11122002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>PATH=3D$PATH:/usr/openv/netbackup/bin:/usr/openv/netbackup/bin/=
admincmd<BR>PATH=3D$PATH:/usr/openv/volmgr/bin:/usr/openv/local<BR>expor=
t=20
PATH<BR>if [ $# -eq 0 ]<BR>then<BR> echo "Usage: `basename $0` =
tapenum=20
[tapenum...]"<BR>else</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D817131719-11122002><FONT face=3DArial =
color=3D#0000ff size=3D2> =20
echo "\n\nWARNING: This completely removes a tape from=20
Netbackup,"<BR> echo "destroying all data on the tape. =
Therefore,=20
this could be a very"<BR> echo "stupid =
move.\n"</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D817131719-11122002><FONT face=3DArial =
color=3D#0000ff size=3D2> =20
response=3D""<BR> while [ -z "$response" ]<BR> =20
do<BR> echo "Are you sure. (y/N) =
\c"<BR> =20
read response<BR> done<BR> response=3D`echo $response | cut =
-c1 | tr=20
'a-z' 'A-Z'`<BR> if [ "$response" !=3D "Y" ]<BR> =20
then<BR> echo "No action taken."<BR> =20
else<BR> echo "OK - it's your =
funeral."</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D817131719-11122002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2> for tapenum in $*<BR> =20
do<BR> echo "\nStarting=20
$tapenum..."<BR> echo " Erasing=20
images."<BR> bpexpdate -force -ev =
$tapenum=20
-d 0<BR> echo " Unfreezing=20
tape."<BR> bpmedia -unfreeze -ev=20
$tapenum<BR> echo " Unsuspending=20
tape."<BR> bpmedia -unsuspend -ev=20
$tapenum</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D817131719-11122002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2> pool=3D`vmquery -w -m $tapenum =
| awk=20
'NR>3 {print $13}'`<BR> =
status=3D`vmquery -w -m=20
$tapenum | awk 'NR>3 {print $28}'`<BR> =
echo=20
" Deassigning tape: pool=3D$pool,=20
status=3D$status"<BR> vmquery =
-deassignbyid=20
$tapenum $pool $status<BR> echo " =
Deleting=20
tape."<BR> vmdelete -m=20
$tapenum<BR> done<BR> fi<BR> echo=20
"Done."<BR>fi<BR>exit<BR></FONT></SPAN></DIV>
<BLOCKQUOTE>
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> Timothy Arnold=20
[mailto:timothy.arnold AT becta.org DOT uk]<BR><B>Sent:</B> Wednesday, =
December 11,=20
2002 11:26 AM<BR><B>To:</B>=20
'veritas-bu AT mailman.eng.auburn DOT edu'<BR><B>Subject:</B> [Veritas-bu] =
expire=20
tapes<BR><BR></FONT></DIV>
<DIV class=3DSection1>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hiya</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"></SPAN></FONT> </P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Here is my question for =
today=20
</SPAN></FONT><FONT face=3DWingdings size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Wingdings">J</SPAN></FONT><FONT=20
face=3DArial size=3D2><SPAN style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"> How=20
does one get rid of a media ID in Netbackup VM? I know you can use =
bpexpdate=20
but VM still thinks it is available for use..</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"></SPAN></FONT> </P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">I want to completely =
get rid of it=20
since we no longer need that set of barcodes.</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"></SPAN></FONT> </P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">Cheers,</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><BR>Tim.</SPAN></FONT></P></DIV><CODE><FONT=20
=
size=3D3><BR><BR>*******************************************************=
***************<BR>This=20
email and any files transmitted with it are confidential =
and<BR>intended=20
solely for the use of the individual or entity to whom they<BR>are =
addressed.=20
If you have received this email in error please notify<BR>the system=20
manager.<BR>This footnote also confirms that this email message has =
been swept=20
by<BR>MIMEsweeper for the presence of computer=20
=
viruses.<BR>www.mimesweeper.com<BR>*************************************=
*********************************<BR></BLOCKQUOTE></FONT></CODE></BODY><=
/HTML>
------_=_NextPart_001_01C2A14A.1B416E80--
|
|
|