cancel
Showing results for 
Search instead for 
Did you mean: 

What is the command to refresh the tape library?

King25may
Level 4

Hi,

When tapes are loaded in the library, few tapes are automatically moving to "Unintialed" volume pool. We'll move those tapes to "Scratch" pool through the console.

I've written following script to move the tapes from "Unitialed" to Scratch pool. 

if [ `vmquery -b -pn Uninitialed | wc -l` -gt 3 ]
then
for i in `/usr/openv/volmgr/bin/vmquery -b -pn Uninitialed | awk '{if(NR>3)print$1}'`
do
/usr/openv/volmgr/bin/vmchange -p 10 -m $i                          #10 is Scratch pool number
done
fi

This scripts fails to move those tapes in some situation. But it is working After i've refeshed the "Media and Device Management ->media" in the Netback up console. 

Is there is any command to refersh it throgh the script.? Hence that my script will work without any failures.

1 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Check Barcode Rules and also the Defaults in Inventory -> Advanced Options -> Media settings.

Best to have new tapes got to Scratch by default, is to add a Barcode Rule similar to this:

Barcode tag: <DEFAULT> 

Media type: select correct density

pool name:  Scratch

 

Previously used tapes will go back to the same pool that it came from unless expired and originally from Scratch.

View solution in original post

6 REPLIES 6

Satyajit_Pal
Level 3

Hi,

I think an inventory will solve the issue.

You can use the below to run the inventory from command line.

/usr/openv/volmgr/bin/vmupdate -rt <robot_type> -rn <robot_no> -rh <robot_control_host> -empty_map -use_barcode_rules

Once you do the inventory, if still the tapes don't move to scratch pool, then you may try the below.

vmchange -p <pool number> -m <media ID>

Cheers...

King25may
Level 4

Thanks Satyajit.

But we'll alwz run the inventory before running tat script. So I think this wil not resolve the problem.

That scripts works if run that after refreshing the media page in netbackup console. So I just want refresh from command line

Possible
Level 6
Accredited Certified

....few tapes are automatically moving to "Unintialed" volume pool....why ?

 

Are these particular set of medias with specific barcodes ? Check your barcode rule configuration in Advanced robot inventory options.

mph999
Level 6
Employee Accredited

To answer your question, not that I know of.

I do not doubt your explanation, but it is odd, you don't refresh the vmupdate command, it is how can I say, the boss ... it doesn't need refreshing as it refreshes each time it is run.

Still, as I always say, consider anything until it is proven otherwise ...

You could run your vmupdate commands to the screen, or a file, then refresh the media in the gui and run them again and see what the difference is, that will prove things one way or another.

Vmupdate output comes from nbdb Sybase database, as does emmcmd -listmedia, and is a cut down version of the emm command, so info comes from the same place, just less fields.  Guess where the gui gets the info from, yep, nbdb again - so you see why it makes no sense. 

From the post above, maybe these media are not matching a barcode rule to put them in scratch during an inventory, so that could be a way around the issue, but I have to say I'm curious about the script issue. 

When the script fails to move the tapes, what is the error.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Check Barcode Rules and also the Defaults in Inventory -> Advanced Options -> Media settings.

Best to have new tapes got to Scratch by default, is to add a Barcode Rule similar to this:

Barcode tag: <DEFAULT> 

Media type: select correct density

pool name:  Scratch

 

Previously used tapes will go back to the same pool that it came from unless expired and originally from Scratch.

King25may
Level 4

Thanks Marianne