Veritas-bu

Re: [Veritas-bu] erase option to bplabel does what?

2009-10-19 10:10:36
Subject: Re: [Veritas-bu] erase option to bplabel does what?
From: "Jonathan Dyck" <jdyck AT bank-banque-canada DOT ca>
To: "A Darren Dunham" <ddunham AT taos DOT com>, <veritas-bu AT mailman.eng.auburn DOT edu>
Date: Mon, 19 Oct 2009 10:07:20 -0400
Don't know if you're looking for a *nix script Darren (or if this thread
is long dead for you), but here's our script if you want it (I have a
Diligent Protectier v2 VTL, requires regular bplabel to clear newly
"Scratch"ed tapes so that the defrag process can kick in):

Cheers,
Jon
----------------------------------------------------------

[root@<snip> ~]# crontab -l
30 9 * * * /NB-scripts/cluster_label_script.sh

#!/bin/sh

# This script generates a list of media located on VTL which have
expired and     #
# have been returned to the Scratch pool since the last time the script
was run.  #
# It should be called on a regular basis from cron, or by a Netbackup
session     #
# notify script.
#

# generate a full current listing of all scratch tapes you want to
parse,  ours happen to start with the prefix "PD"
/usr/openv/volmgr/bin/vmquery -pn Scratch -b | grep PD | sort | awk
'{print $1}' > /tmp/temp1.tmp

# diff compares the curent list of Scratch to the list from the previous
#
# iteration of this script and stores the new IDs in a new temp file
#
/usr/bin/diff /NB-scripts/clus_prev.scratch /tmp/temp1.tmp | grep ">" |
awk '{print $2}'  > /tmp/temp2.tmp

# The script is finished with the previous iteration's info, so we clean
up       #
/bin/rm -f /NB-scripts/clus_prev.scratch

# we now bplabel all of the new Scratch media
#
for i in `cat /tmp/temp2.tmp`; do
/usr/openv/netbackup/bin/admincmd/bplabel -m $i -d dlt -o -p Scratch;
done 2>&1

# Once the bplabel is complete, we take today's list of total Scratch
and store   #
# it as prev.scratch for the next iteration.
#
/bin/mv /tmp/temp1.tmp /NB-scripts/clus_prev.scratch

# We also clean up
#
/bin/rm -f /tmp/temp2.tmp







-----Original Message-----
From: veritas-bu-bounces AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] On Behalf Of A Darren
Dunham
Sent: October 13, 2009 1:56 PM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] erase option to bplabel does what?


On Mon, Oct 12, 2009 at 09:21:38AM +0100, Clooney, David wrote:
> Darren
>
> Have written the code already in perl if you want a copy? Runs daily,
figures out what vtl volumes have been returned to scratch in the last
24 hours and labels accordingly.

Ah, interesting.  Are you just parsing one of the log files to create
that list, or do you keep state yourself?

For now, my count is low enough that I can just relabel all scratch in a
reasonable period of time.  But I was thinking of checking the VTL
directly for information about size used.  Of course doing that would
mean reducing compatibility and doing non-netbackup things.

--
Darren
_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
====================================================================================

La version française suit le texte anglais.

------------------------------------------------------------------------------------

This email may contain privileged and/or confidential information, and the Bank 
of
Canada does not waive any related rights. Any distribution, use, or copying of 
this
email or the information it contains by other than the intended recipient is
unauthorized. If you received this email in error please delete it immediately 
from
your system and notify the sender promptly by email that you have done so. 

------------------------------------------------------------------------------------

Le présent courriel peut contenir de l'information privilégiée ou 
confidentielle.
La Banque du Canada ne renonce pas aux droits qui s'y rapportent. Toute 
diffusion,
utilisation ou copie de ce courriel ou des renseignements qu'il contient par une
personne autre que le ou les destinataires désignés est interdite. Si vous 
recevez
ce courriel par erreur, veuillez le supprimer immédiatement et envoyer sans 
délai à
l'expéditeur un message électronique pour l'aviser que vous avez éliminé de 
votre
ordinateur toute copie du courriel reçu.
_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu