03-12-2009 07:36 AM
Hi!
Using Netbackup 6.5.1, I developed a GUI to import and export tapes from a scalar i500 robotic.
The matter is vmchange needs a user interaction to know when the user have removed tapes from the mailslot. Otherwise, the tape is ingested again. I wrote this script in perl (newb in perl) but the user interaction i sumulate seems to fail with vmchange. The vmupdate indicates that the tape is still ingested although it's not the case. Here is the code:
# Export tape
if (@ARGV != 1) {
print "usage: export barcode \n";
exit -1;
}
$barcode=$ARGV[0];
$enter="\n\n";
$quit="q\n";
$sleepBeforeEnter = 120;
$sleepBeforeQuit = 30;
print "Running vmchange...\n";
open (ENTER, "|\"C:\\Program Files\\VERITAS\\Volmgr\\bin\\vmchange\" -res -multi_eject -w -rt TLD -rn 0 -rh hostname -h hostname -ml $barcode") or die "Impossible de lancer import_bande";
print "Sleep before simulating ENTER. Please remove tape from mailslot\n";
sleep $sleepBeforeEnter;
print "Simulating ENTER \n";
print ENTER $enter;
print "Sleep before exit to let vmchange exit\n";
sleep 30;
exit 0;
Some help will be appreciated ;).
Regards.
03-12-2009 12:40 PM
Do you know that if you say NO to the quesiton it will NOT put the tapes back into the robot and it will leave them in the MAP until you are ready to take the out?
03-12-2009 06:23 PM
Oh, there is a question of same name/contents.
Programatically interact with vmchange
(https://www-secure.symantec.com/connect/forums/programatically-interact-vmchange-0)
03-13-2009 02:50 AM
Don't know why my thread was posted two times
Thanks J.Hinchcliffe for the tip. Will try it soon.