cancel
Showing results for 
Search instead for 
Did you mean: 

barcode rule using end of the barcode tag

viktor_Soldan
Level 0

I'd like to put all LTO4 tapes to the same volume pool. I need to create barcode rule, which uses end of the barcode tag "L4" - something like this "*L4" .
Is it way how to write that rule ?


thanks
10 REPLIES 10

Will_Restore
Level 6

Andy_Welburn
Level 6

of the barcode. We've changed ours so it ignores the last two (L3 in our case).

Judy - as a matter of interest, as we've never really used barcode tags except for cleaning tapes, can the character string be anywhere in the barcode? Obviously the L4 will be at the end in the above case & was CLN in our case is at the beginning.

J_H_Is_gone
Level 6
I did a big read on this before setting up my rules

But I have to admit I have never tried

I have custom barcodes and it is the starting Letter(s) that I have unique.

From the help page:

Barcode tag

The barcode tag is a unique string of characters from the barcode that identifies the type of media. For example, you can use DLT as the barcode tag for a barcode rule if:

You use DLT on your barcodes to identify DLT tapes

DLT is not used on any other barcodes in the robot

Similarly, if you use CLND for DLT cleaning media, you can use CLND as the barcode tag for the rule for DLT cleaning media.

The barcode tag can have from 1 to 16 characters but cannot contain any spaces.

The following are special barcode rules that can match special characters in the barcode tags:

NONE. Matches when rules are used and the volume has an unreadable barcode or the robot does not support barcodes.

DEFAULT. For volumes with barcodes, this tag matches when none of the other barcode tags match. However, the following must be compatible: the media type in the DEFAULT rule and the media type on the Media Settings tab.

You cannot change the barcode tag of a barcode rule. You must first delete the old rule and then add a rule with a new barcode tag.

Use the Media Settings tab to set up the criteria for a robot update.

See Media Settings tab.

Andy_Welburn
Level 6

Thought maybe you'd applied it with a trailing tag. Couldn't test it here as we 'cut-off' the Ln suffix - unless I tried it with a number combination tag for one of our new tapes.......now there's something to play with tomorrow!

The only other way around it that I could think of for Viktor was in the "Media Settings" tab "New Media" section in Robot Inventory if the LTO4 tapes were a different media type to any others already in the robot.

J_H_Is_gone
Level 6
I looks like it is suppose to work, and I have always had it in my head that it would.

I have some new tapes, and will try a test latter today to see if I can get them to go by that part of the barcode.

J_H_Is_gone
Level 6
What my test consisted of

I took a tape that started with a D and ended with L4

I created a new pool called testing
I created a barcode rule where the Barcode Tag was L4 and set to put into the Testing pool.

I then injected the tape into the library.
It ended up in the NetBackup pool.

I deleted the tape
I changed my media id generation from 1:2:3:4:5:6 to 3:4:5:6:7:8
and re-inventoried the lib
Again the tape went into the NetBackup pool.

---------------------

In the help it says "The barcode tag is a unique string of characters from the barcode that identifies the type of media."
Which I have always taken to mean anywhere in the barcode, not specifically at the beginning of the barcode.

Sad to say that it did not work...

J_H_Is_gone
Level 6

When going to make the bar code rule - the "BAR CODE Tag"  is nothing more then a unique set of characters found in your physical bar code ( which can actually be up to 16 characters long).

Most bar codes are 8 characters where the last 2 quite often depict the 'type' of media.
In the case of LTO media it tells you what version.

So if you have bar codes that end in L4 you can have a rule that  has
Barcode Tag = L4
Media type = 1/2 inch cartridge tape (which is hcart) - or use 2 or 3 (which ever you are using for for LTO4's)
Volume Pool = your choice

No on the Media ID Generation
you can have your Bar code length 8 and the Media ID Generation Rule set to 1:2:3:4:5:6

now when you look at your media
the Media id will be 6 characters but the Bar code tag will show all 8 - this allows you to see if you really have your L4's coming in at the correct Media Type

 

TROE
Level 4
I did a lot of testing on the "The barcode tag is a unique string of characters . . ."  I read that to mean the characters could show up anywhere in the tag, but my testing showed that it really means "unique string of characters starting from the beginning".  My recollection of the testing I did (this was a few weeks ago, so I may be misremembering and you may want to recheck my work) was that If I used an 8 character rule like "AK2048L3", it would happily follow the rule and stick in the appropriate pool, and if I used a rule like "AL2048L7", it would ignore it so I could tell that it was looking at the 7th and 8th characters, but if I used a rule like "L3", it would ignore the rule.  Luckily all of my LTO2 tapes start with AK1, all of my LTO3 tapes start with AK2, and all of my LTO4 tapes start with AK3.  This means I can use the first 3 characters to appropriately assign tapes to pools and media types.

My library reports all 8 characters, so I use characters 1 through 6.  Here are my docs:

  • Select “Update volume configuration” and click “Advanced Options...”
  • “Barcode Rules” tab:
  • Click “New...”
    • Media type: ½” cartridge tape 2
    • Barcode tag: AK1
    • Max mounts: 0
    • Volume pool: LTO2
    • Description: LTO2
  • Click “New...”
    • Media type: ½” cartridge tape 3
    • Barcode tag: AK2
    • Max mounts: 0
    • Volume pool: LTO3
    • Description: LTO3
  • Click “New...”
    • Media type: ½” cartridge tape
    • Barcode tag: AK3
    • Max mounts: 0
    • Volume pool: LTO4
    • Description: LTO4
  • “Media ID Generation” tab:
  • Click “New...”
    • Robot number: 0
    • Barcode length: 8
    • Media ID generation rule: 1:2:3:4:5:6

Note the looping on media type.  LTO2 = HCART2, LTO3 = HCART3, LTO4 = HCART.  The general rule I plan on following is HCART# = ( (LTO# - 1) % 3 ) + 1.  That is to say, take the LTO generation.  Subtract 1.  Take that modulo 3 (i.e. the remainder after dividing by 3).  Take that and add 1.  That is the HCART#, except that HCART1 is HCART.  If I end up with LTO5 some day, they will get HCART2 and I'll have to give up on LTO2.  And so forth.

BTW, looks like cut and paste from Word gets some of the formatting, but not all of the indentation levels make it perfectly.  Still, it should be fairly clear.

Will_Restore
Level 6
I misunderstood the OP.  Perhaps this would do the trick: 
media id generation  7:8:3:4:5:6
barcode rule L4  ...

TROE
Level 4

Worth testing, although that will only work if the barcode rule is really a media ID rule.  If my recollection of what I tested is correct, the barcode rule is applied to the barcode, not the media ID, and so you wouldn't be able to trick it like that.