12-05-2018 01:23 AM - edited 12-05-2018 01:30 PM
Hello,
I have a VTL setup and I can discover the robot and devices using the wizard, but want to achive it using a script, so I can setup and destroy the enviroment for testing.
I understand that I should use the tpautoconf -report_disc to discover the robot and devices then add them. I am using bash read to process the discovered items to the commands, see greg bash
Add all robots found in discovery
while read -r rob_path ; do |
Add all drives found by discovery
arr=() ; while read -r p; do arr+=("$p") ; done< <(/usr/openv/volmgr/bin/tpautoconf -report_disc |awk -F' = ' '/Drive Path/ {print $NF}') let i="${#arr[@]}" ; for p in "${arr[@]}" ; do echo $i $p ; /usr/openv/volmgr/bin/tpconfig -add -drive -type hcart3 -path $p -robot 0 -robtype tld -robdrnum $i; let i-=1 ; done |
Now I need to create a storage unit and try to do it using this command:
/usr/openv/netbackup/bin/admincmd/bpstuadd -label testnb1-hcart3-robot-tld-0 -density hcart3 -cj 10 -dt 1 -host testnb1 -rt tld -rn 0 -odo 0 -maxmpx 1
But After I create this storage unit and open it in the GUI I get an error.
What I wrong?
Next I will create a policy that uses this storage unit, and issue backups.
Thanks,
Niv
12-05-2018 01:41 AM
You have used the Storage Unit name when creating the robot with tpconfig -add:
tpconfig -add -robot testnb1-hcart3-robot-tld-0
You should only specify robot number:
tpconfig -add -robot 0 -robtype tld -cntlhost testnb1 -robpath $rob_path
You need to verify that the robot number is unique - if there is already TLD(0), (or other robot numbers) you need to use the next available number.
12-05-2018 12:32 PM
Thanks Marianne,
Yet after I ran the bpstuadd to define the storage unit, and then I open the GUI and the new storage unit the storage device is missing.
What am I doing wrong?
12-05-2018 11:18 PM
Maybe STU add failed because the tpconfig command to add the robot was wrong.
While you are testing your scripts, best to check/verify each step after command to add.
Check devices with 'tpconfig -l'.
Check STU with 'bpstulist -U'.
12-14-2018 08:55 AM
As Marianne says "While you are testing your scripts, best to check/verify each step after command to add."
I would go one step further and run your find script and echo output, then run the command for a sample to verify it does what you think.