cancel
Showing results for 
Search instead for 
Did you mean: 

List of barcode rules from the command line?

mroberti
Level 2

Hey folks, I've dealt with barcode rules from the GUI for years, but curious if there's a way to list existing barcode rules from the command line?

Thanks!

Mario

8 REPLIES 8

Systems_Team
Moderator
Moderator
   VIP   

Hi Mario,

I haven't been able to find a command line option to display barcode rules, however if you look in NetBackup_Installation_Path/volmgr/vm.conf, you should be able to see them there.

Here's what I see inside vm.conf on the Master server that controls my tape system:

MEDIA_ID_BARCODE_CHARS = 0 8 1:2:3:4:5:6

Hope that helps,

Steve

quebek
Moderator
Moderator
   VIP    Certified

Hello Mario

Sure it is !!

Check this command out

vmrule -listall

where is it located -> #which vmrule
/usr/openv/volmgr/bin/vmrule

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified
vmrule -listall

mroberti
Level 2

Awesome!! The ability to do that will definitely help in our automation processes to confirm a library has been set up with barcode rules for both regular media AND cleaning tapes. :)

Recently we had a library that had been active for 1-2 months that had cleaning tapes in it yet the barcode rule for them was never set up. Found out the hard way when drives started going down. :\

I plan to write a perl script that will go out and audit for some basic checklist stuff like

  • library has cleaning tapes
  • library has barcode for cleaning tapes
  • library has scratch

Y'know, the basics. :)

 

Thanks again everyone!

-Mario

mph999
Level 6
Employee Accredited

vm.conf, as above actually shows the media ID generaion rule(s)

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

I agree with you Martin - Media id generation rules, but not barcode rules.

mph999
Level 6
Employee Accredited

Still useful though ... easier than ploughing through the GUI to find them

Genericus
Moderator
Moderator
   VIP   

vm.conf is also the place to define your HCART values if you have multiple tape types.

There were bugs in some versions where your scratch pool could get lost or reassigned

This command sets the scratch pool: (where scratch_pool is teh actual pool name)

/usr/openv/volmgr/bin/vmpool -set_scratch scratch_pool 

This command will list what NB thinks is the scratch pool:

/usr/openv/volmgr/bin/vmpool -list_scratch

Before you check for tapes, you  should inventory the robot ( update the robot type -rt, robot number -rn, and master name)

/usr/openv/volmgr/bin/vmupdate -rt acs -rn 0 -use_barcode_rules -h MASTER

With unix, grep makes checking for tapes pretty easy, run vmquery, pool name and grep the tape and robot number.

/usr/openv/volmgr/bin/vmquery -pn scratch_pool -b | grep "TLD      6" | /usr/bin/wc -l

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