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_01C37E29.0101F410
Content-Type: text/plain
My "obliterate_tape" script. It'll complete remove a tape. Note, a few
errors are normal as it unsuspends, unfreezes, etc. even if the tape isn't
frozen or suspended. One day I'll smarten it up but it's used to rarely,
it's not a big priority.
#/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: Cavanagh, Kevin B [mailto:KCavanagh AT cbe.ab DOT ca]
Sent: Thursday, September 18, 2003 2:25 PM
To: 'veritas-bu AT mailman.eng.auburn DOT edu'
Subject: [Veritas-bu] Tapes frozen (put in library backwards)
We ran into a problem recently when one of our operators inserted 3 LTO
cartridges into a StorEdge L180 library the incorrect way. The net result
being the tapes were frozen. The following is from the /var/adm message
file:
Sep 16 14:47:12 s400cns12 tldcd[2087]: [ID 983172 daemon.error] TLD(0) key =
0x4
, asc = 0x40, ascq = 0x1, HARDWARE ERROR, GENERAL
Sep 16 14:47:12 s400cns12 tldcd[2087]: [ID 841094 daemon.error] TLD(0)
Move_medi
um error: CHECK CONDITION
Sep 16 14:47:12 s400cns12 tldd[469]: [ID 790780 daemon.notice] Adding media
ID C
BE182 to unmountable media list
Sep 16 14:47:12 s400cns12 tldd[469]: [ID 342215 daemon.error] TLD(0) drive 6
(de
vice 5) is being DOWNED, status: Robotic mount failure
Sep 16 14:47:12 s400cns12 tldd[469]: [ID 229259 daemon.error] Check
integrity of
the drive, drive path, and media
Sep 16 14:48:15 s400cns12 tldcd[2096]: [ID 983172 daemon.error] TLD(0) key =
0x4
, asc = 0x40, ascq = 0x1, HARDWARE ERROR, GENERAL
Sep 16 14:48:15 s400cns12 tldcd[2096]: [ID 841094 daemon.error] TLD(0)
Move_medi
um error: CHECK CONDITION
Sep 16 14:48:15 s400cns12 tldd[469]: [ID 849234 daemon.notice] Removing
media ID
CBE182 from unmountable media list
Sep 16 14:48:15 s400cns12 tldd[469]: [ID 419456 daemon.error] TLD(0) bad
media s
uspected; configuring device 5 back UP
I've removed the 3 tapes in question from the NBU media (via bpexpdate,
vmdelete -m xxxxxx, etc) but when I go into the NBU admin console, select
"reports", "media summary" with verbose, it still shows the 3 tapes as being
frozen. Just wondering if there is some other step I need to perform to
get rid of these tapes entirely??
TIA!
Kevin Cavanagh
Calgary Board of Education
------_=_NextPart_001_01C37E29.0101F410
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 6.00.2800.1226" name=3DGENERATOR>
<STYLE>
<!--
/* Font Definitions */
@font-face
{font-family:"Comic Sans MS";
panose-1:3 15 7 2 3 3 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{font-family:"Comic Sans MS";
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</STYLE>
</HEAD>
<BODY lang=3DEN-US vLink=3Dpurple link=3Dblue>
<DIV><SPAN class=3D203450521-18092003><FONT face=3DArial =
color=3D#0000ff size=3D2>My=20
"obliterate_tape" script. It'll complete remove a tape. =
Note, a few=20
errors are normal as it unsuspends, unfreezes, etc. even if the tape =
isn't=20
frozen or suspended. One day I'll smarten it up but it's used to =
rarely,=20
it's not a big priority.</FONT></SPAN></DIV>
<DIV><SPAN class=3D203450521-18092003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D203450521-18092003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>#/bin/ksh</FONT></SPAN></DIV>
<DIV><SPAN class=3D203450521-18092003><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><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><SPAN class=3D203450521-18092003><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><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><SPAN class=3D203450521-18092003><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><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><SPAN class=3D203450521-18092003><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><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><SPAN class=3D203450521-18092003><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</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> Cavanagh, Kevin B =
[mailto:KCavanagh AT cbe.ab DOT ca]<BR><B>Sent:</B> Thursday, September 18, =
2003 2:25=20
PM<BR><B>To:</B> =
'veritas-bu AT mailman.eng.auburn DOT edu'<BR><B>Subject:</B>=20
[Veritas-bu] Tapes frozen (put in library =
backwards)<BR><BR></FONT></DIV>
<DIV class=3DSection1>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">We ran into a =
problem=20
recently when one of our operators inserted 3 LTO cartridges into a =
StorEdge=20
L180 library the incorrect way. The net result being the tapes =
were=20
frozen. The following is from the /var/adm message=20
file:</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans =
MS'"></SPAN></FONT> </P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">Sep 16=20
</SPAN></FONT><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans =
MS'">14:47:12</SPAN></FONT><FONT=20
face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"> s400cns12 =
tldcd[2087]:=20
[ID 983172 daemon.error] TLD(0) key =3D 0x4</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">, asc =3D =
0x40, ascq =3D=20
0x1, HARDWARE ERROR, GENERAL</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">Sep 16=20
</SPAN></FONT><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans =
MS'">14:47:12</SPAN></FONT><FONT=20
face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"> s400cns12 =
tldcd[2087]:=20
[ID 841094 daemon.error] TLD(0) Move_medi</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">um error: =
CHECK=20
CONDITION</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">Sep 16=20
</SPAN></FONT><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans =
MS'">14:47:12</SPAN></FONT><FONT=20
face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"> s400cns12 =
tldd[469]:=20
[ID 790780 daemon.notice] Adding media ID C</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">BE182 to =
unmountable=20
media list</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">Sep 16=20
</SPAN></FONT><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans =
MS'">14:47:12</SPAN></FONT><FONT=20
face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"> s400cns12 =
tldd[469]:=20
[ID 342215 daemon.error] TLD(0) drive 6 (de</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">vice 5) is =
being DOWNED,=20
status: Robotic mount failure</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">Sep 16=20
</SPAN></FONT><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans =
MS'">14:47:12</SPAN></FONT><FONT=20
face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"> s400cns12 =
tldd[469]:=20
[ID 229259 daemon.error] Check integrity of</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"> the =
drive, drive=20
path, and media</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">Sep 16=20
</SPAN></FONT><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans =
MS'">14:48:15</SPAN></FONT><FONT=20
face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"> s400cns12 =
tldcd[2096]:=20
[ID 983172 daemon.error] TLD(0) key =3D 0x4</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">, asc =3D =
0x40, ascq =3D=20
0x1, HARDWARE ERROR, GENERAL</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">Sep 16=20
</SPAN></FONT><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans =
MS'">14:48:15</SPAN></FONT><FONT=20
face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"> s400cns12 =
tldcd[2096]:=20
[ID 841094 daemon.error] TLD(0) Move_medi</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">um error: =
CHECK=20
CONDITION</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">Sep 16=20
</SPAN></FONT><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans =
MS'">14:48:15</SPAN></FONT><FONT=20
face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"> s400cns12 =
tldd[469]:=20
[ID 849234 daemon.notice] Removing media ID</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"> CBE182 =
from=20
unmountable media list</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">Sep 16=20
</SPAN></FONT><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans =
MS'">14:48:15</SPAN></FONT><FONT=20
face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"> s400cns12 =
tldd[469]:=20
[ID 419456 daemon.error] TLD(0) bad media s</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">uspected; =
configuring=20
device 5 back UP</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans =
MS'"></SPAN></FONT> </P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">I've removed =
the 3 tapes=20
in question from the NBU media (via bpexpdate, vmdelete -m xxxxxx, =
etc) but=20
when I go into the NBU admin console, select "reports", "media =
summary" with=20
verbose, it still shows the 3 tapes as being frozen. Just =
wondering if there is some other step I need to perform to get rid of =
these=20
tapes entirely??<BR><BR></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans =
MS'">TIA!<BR><BR></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'">Kevin=20
Cavanagh</SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans =
MS'">Calgary</SPAN></FONT><FONT=20
face=3D"Comic Sans MS" size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Comic Sans MS'"> Board of=20
Education</SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>
------_=_NextPart_001_01C37E29.0101F410--
|