09-07-2017 07:37 PM
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
09-07-2017 09:15 PM
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
09-07-2017 11:46 PM
Hello Mario
Sure it is !!
Check this command out
vmrule -listall
where is it located -> #which vmrule
/usr/openv/volmgr/bin/vmrule
09-08-2017 12:47 AM
09-08-2017 12:14 PM
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
Y'know, the basics. :)
Thanks again everyone!
-Mario
09-10-2017 11:19 PM
vm.conf, as above actually shows the media ID generaion rule(s)
09-10-2017 11:53 PM
I agree with you Martin - Media id generation rules, but not barcode rules.
09-11-2017 01:25 PM
Still useful though ... easier than ploughing through the GUI to find them
09-12-2017 07:57 AM
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