cancel
Showing results for 
Search instead for 
Did you mean: 

VTL wizard from the command line

nivw_infinidat
Level 3

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 
/usr/openv/volmgr/bin/tpconfig -add -robot testnb1-hcart3-robot-tld-0 -robtype tld -cntlhost testnb1 -robpath $rob_path
done< <(/usr/openv/volmgr/bin/tpautoconf -report_disc |awk -F' = ' '/Robot Path/ {print $2}')

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

4 REPLIES 4

Marianne
Level 6
Partner    VIP    Accredited Certified

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. 

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?

 

Marianne
Level 6
Partner    VIP    Accredited Certified

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'.

Genericus
Moderator
Moderator
   VIP   

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.

 

NetBackup 9.1.0.1 on Solaris 11, writing to Data Domain 9800 7.7.4.0
duplicating via SLP to LTO5 & LTO8 in SL8500 via ACSLS