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:
#!/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
|