Veritas-bu

[Veritas-bu] tapes expiring

2002-06-10 11:45:04
Subject: [Veritas-bu] tapes expiring
From: Mark.Donaldson AT experianems DOT com (Donaldson, Mark)
Date: Mon, 10 Jun 2002 09:45:04 -0600
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_01C21095.CA470A20
Content-Type: text/plain;
        charset="iso-8859-1"

Dave,

You can use the "vmchange" command to place a deassigned tape into whatever
pool you wish:

vmchange -p <scratchpoolnum> -m <tapenum>

I've got a script that does this daily run by cron:

#!/bin/sh

##Auto_ScratchPool
## This script is used to identify all tapes in the robot which are
available
## for use (all expired images) but are not in the "ScratchPool" and change
## them to be in the Scratchpool.  This should increase tape availability
for
## all Classes of backups.

## Mark Donaldson - Nov 11, 1999

PATH=$PATH:/usr/openv/netbackup/bin:/usr/openv/volmgr/bin:/usr/local/bin
PATH=$PATH:/usr/openv/netbackup/bin/admincmd:/usr/openv/local
export PATH

#Get Scratchpool name
SPname=`vmpool -listscratch | tail -1`

#Now lookup scratchpool pool number.
SPnum=`vmpool -listall | \
   awk -F: '$1=="pool number" {pn=$2}
            $1=="pool name" && $2~/^ *'$SPname'$/ {print pn}'`

# Note: vmquery col  1 is tape number
#               col  3 is tape type
#               col 12 is poolname
#               col 20 is "assigned" date

tapelist=`vmquery -a -w |  awk '$3 !~ /CLN/ && \
                               $20 == "00/00/0000" && \
                               $12 != "'$SPname'" && \
                               $28 == 0 {print $1}' `

for eachtape in $tapelist
do
  #Tape available for reassignment to scratchpool.
  vmchange -p $SPnum -m $eachtape
done

exit

-----Original Message-----From: David Markham [mailto:dave.markham AT icl DOT 
net]
Sent: Monday, June 10, 2002 4:38 AM
To: 'Veritas-Bu (E-mail)
Subject: [Veritas-bu] tapes expiring


If i take tapes which are assigned to a pool for eg weekly_full , daily_inc
out of my jukebox ( sun L1000, netbackup 3.2 running on solaris 8  ) and do
not put them back in until the retention period is over, they then are read
in and are still assigned to the pool they were in before. Although they can
be written to by schedules using that pool now that the retention period is
over.

Thing is, how do i make tapes which come into the jukebox that are known
about from other pools but have gone past their retention period move into
the scratch pool.

I have a barcode rule so any new tapes which come in automatically go into
the scratch pool, but these are tapes which have been used before. currently
I have to expire each one with bpexpdate -ev <tape> -d 0  then delete them
from the gui, then run vmupdate -x -rn 0 -rt tld -rh `uname -n` -vh `uname
-n` -use_barcode_rules to get them into the scratch pool.

Anyone any ideas ?

Dave

------_=_NextPart_001_01C21095.CA470A20
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [Veritas-bu] tapes expiring</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Dave,</FONT>
</P>

<P><FONT SIZE=3D2>You can use the &quot;vmchange&quot; command to place =
a deassigned tape into whatever pool you wish:</FONT>
</P>

<P><FONT SIZE=3D2>vmchange -p &lt;scratchpoolnum&gt; -m =
&lt;tapenum&gt;</FONT>
</P>

<P><FONT SIZE=3D2>I've got a script that does this daily run by =
cron:</FONT>
</P>

<P><FONT SIZE=3D2>#!/bin/sh</FONT>
</P>

<P><FONT SIZE=3D2>##Auto_ScratchPool</FONT>
<BR><FONT SIZE=3D2>## This script is used to identify all tapes in the =
robot which are available</FONT>
<BR><FONT SIZE=3D2>## for use (all expired images) but are not in the =
&quot;ScratchPool&quot; and change</FONT>
<BR><FONT SIZE=3D2>## them to be in the Scratchpool.&nbsp; This should =
increase tape availability for</FONT>
<BR><FONT SIZE=3D2>## all Classes of backups.</FONT>
</P>

<P><FONT SIZE=3D2>## Mark Donaldson - Nov 11, 1999</FONT>
</P>

<P><FONT =
SIZE=3D2>PATH=3D$PATH:/usr/openv/netbackup/bin:/usr/openv/volmgr/bin:/us=
r/local/bin</FONT>
<BR><FONT =
SIZE=3D2>PATH=3D$PATH:/usr/openv/netbackup/bin/admincmd:/usr/openv/local=
</FONT>
<BR><FONT SIZE=3D2>export PATH</FONT>
</P>

<P><FONT SIZE=3D2>#Get Scratchpool name</FONT>
<BR><FONT SIZE=3D2>SPname=3D`vmpool -listscratch | tail -1`</FONT>
</P>

<P><FONT SIZE=3D2>#Now lookup scratchpool pool number.</FONT>
<BR><FONT SIZE=3D2>SPnum=3D`vmpool -listall | \</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp; awk -F: '$1=3D=3D&quot;pool =
number&quot; {pn=3D$2}</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; $1=3D=3D&quot;pool name&quot; &amp;&amp; $2~/^ *'$SPname'$/ {print =
pn}'`</FONT>
</P>

<P><FONT SIZE=3D2># Note: vmquery col&nbsp; 1 is tape number</FONT>
<BR><FONT =
SIZE=3D2>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp; col&nbsp; 3 is tape type</FONT>
<BR><FONT =
SIZE=3D2>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp; col 12 is poolname</FONT>
<BR><FONT =
SIZE=3D2>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp; col 20 is &quot;assigned&quot; date</FONT>
</P>

<P><FONT SIZE=3D2>tapelist=3D`vmquery -a -w |&nbsp; awk '$3 !~ /CLN/ =
&amp;&amp; \</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $20 =3D=3D =
&quot;00/00/0000&quot; &amp;&amp; \</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $12 !=3D =
&quot;'$SPname'&quot; &amp;&amp; \</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $28 =3D=3D 0 {print $1}' =
`</FONT>
</P>

<P><FONT SIZE=3D2>for eachtape in $tapelist</FONT>
<BR><FONT SIZE=3D2>do</FONT>
<BR><FONT SIZE=3D2>&nbsp; #Tape available for reassignment to =
scratchpool.</FONT>
<BR><FONT SIZE=3D2>&nbsp; vmchange -p $SPnum -m $eachtape</FONT>
<BR><FONT SIZE=3D2>done</FONT>
</P>

<P><FONT SIZE=3D2>exit</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----From: David Markham [<A =
HREF=3D"mailto:dave.markham AT icl DOT net">mailto:dave.markham AT icl DOT 
net</A>]</F=
ONT>
<BR><FONT SIZE=3D2>Sent: Monday, June 10, 2002 4:38 AM</FONT>
<BR><FONT SIZE=3D2>To: 'Veritas-Bu (E-mail)</FONT>
<BR><FONT SIZE=3D2>Subject: [Veritas-bu] tapes expiring</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>If i take tapes which are assigned to a pool for eg =
weekly_full , daily_inc&nbsp; out of my jukebox ( sun L1000, netbackup =
3.2 running on solaris 8&nbsp; ) and do not put them back in until the =
retention period is over, they then are read in and are still assigned =
to the pool they were in before. Although they can be written to by =
schedules using that pool now that the retention period is =
over.</FONT></P>

<P><FONT SIZE=3D2>Thing is, how do i make tapes which come into the =
jukebox that are known about from other pools but have gone past their =
retention period move into the scratch pool.</FONT></P>

<P><FONT SIZE=3D2>I have a barcode rule so any new tapes which come in =
automatically go into the scratch pool, but these are tapes which have =
been used before. currently I have to expire each one with bpexpdate =
-ev &lt;tape&gt; -d 0&nbsp; then delete them from the gui, then run =
vmupdate -x -rn 0 -rt tld -rh `uname -n` -vh `uname -n` =
-use_barcode_rules to get them into the scratch pool.</FONT></P>

<P><FONT SIZE=3D2>Anyone any ideas ?</FONT>
</P>

<P><FONT SIZE=3D2>Dave</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C21095.CA470A20--