Veritas-bu

Re: [Veritas-bu] labelling a media when it is deassigned

2007-12-05 08:36:39
Subject: Re: [Veritas-bu] labelling a media when it is deassigned
From: "Mellor, Adam A." <Adam.Mellor AT woodside.com DOT au>
To: "Kevin Whittaker" <Kevin.Whittaker AT syniverse DOT com>
Date: Wed, 5 Dec 2007 22:21:51 +0900
Kevin,

I have not done this before, however I waspondering how I might actually
perform it.

Just some thoughs, Not knowing exactly what netbackup is trying to do at
the time,

How long does it take to erase the tapes in question ?

Did you background your "erase_media.pl" script called by
deassign_notify ?

Also, I might suggest put a sleep in the perl script for <undefined
period here> to allow netbackup to finish performing it's thing before
you go erasing the tape.

My thoughts.

Adam.

-----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
kwhittaker
Sent: Tuesday, 20 November 2007 4:17 AM
To: VERITAS-BU AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] labelling a media when it is deassigned


I am currently running Solaris 9 with NetBackup 6.5, and a EMC CDL720
(virtual tape library).  I have over subscrided to help reduce the
amount of multiplexing that I do, so I have to quick erase the tapes as
they are deassigned.

When I upgraded to 6.5, I saw the
/usr/openv/netbackup/bin/media_deassign_notify script, and figured I
could just throw my bplabel command within this.  Well, the first issue
I ran into was that NB is not passing the correct # of parameters to the
script.  Well, after I got around that, I needed more than the media id
to run bplabel, so I wrote a perl script.

Well, when I run the perl script by hand, it works great!  When I run it
under the media_deassign_notify it reflects the correct options on the
bplabel command but it freezes vmd.  What do I mean?  I mean it I can
not select any tapes and I can not kill the erase job on the activity
screen.  I have to do a UNIX kill to get rid of it.

Below is what I wrote, but my question is does anybody else already do
this?  If so, I would appreciate any direction on what I have done
wrong.

This is the line I added in the media_deassign_notify:

/usr/openv/scripts/erase_media.pl $1

Here is the perl script&#058;

#!/usr/bin/perl
#
#  This script was created, because the CDL does not release space
already allocated.  So
#  when a virtual tape is used on the CDL and uses 200GB, it does not
release that space after
#  the tape is unassigned.  This is being called by
media_deassign_notify
#
#
open (LOG,">/tmp/erase_media.log") || die("can not open file");
$#rv=-1;
@rv = (split ' ', `/usr/openv/volmgr/bin/vmquery -l -m $ARGV[0]
|/usr/xpg4/bin/awk '{print \$1,\$8,\$12,\$15,\$20,\$21}'`);
# ###############################################
# check to see if it NOT robot 3 (physical robot), and the assign date
is empty, and the # of mounts is greater than 0
# ###############################################
if ($rv[1] != "3" && $rv[1] gt -1 && $rv[4] == "00/00/0000" && $rv[3] gt
0) {
   print LOG "Erasing.... " . $rv[0] . " Pool " . $rv[2] . "\n";
   system `/usr/openv/netbackup/bin/admincmd/bplabel -erase -m $rv[0] -d
hcart2 -o -p $rv[2]`;
} else {
   print LOG "Not Erasing.... " . $rv[0] . " Pool " . $rv[2] . " Robot "
. $rv[1] . " Date " . $rv[4] . " Mounts " . $rv[3] . "\n";
}
close(LOG);

+----------------------------------------------------------------------
|This was sent by kevin.whittaker AT syniverse DOT com via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------


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

NOTICE: This email and any attachments are confidential. 
They may contain legally privileged information or 
copyright material. You must not read, copy, use or 
disclose them without authorisation. If you are not an 
intended recipient, please contact us at once by return 
email and then delete both messages and all attachments.

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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Veritas-bu] labelling a media when it is deassigned, Mellor, Adam A. <=