Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

barcode rule

Created: 04 Aug 2012 • Updated: 09 Aug 2012 | 31 comments
This issue has been solved. See solution.

I want only 5 characters of barcode to appear in the NBU gui.

What to do?

Comments 31 CommentsJump to latest comment

NIKHIL2346565959's picture

I have read this but the doubt still persists.

NIKHIL2346565959's picture

If your Barcode is 01450000
and u want NB to read it as 014500 then in VM.conf add the below entry and restart the media manager service and re-introduce the tape to your library.

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

If you want the media id to be read as 01450000 it self update the VM.conf as probably

MEDIA_ID_BARCODE_CHARS 0 8 1:2:3:4:5:6:7:8
;-)

I want barcode to display as 0145  ,Then what?Not media id.The barcode .Above is for media id.

mph999's picture

NBU cannot control the barcode.  This is controlled by the library.

The barcode is physical, what is on the tape.  This is read by the library and passed to netbackup.  NBU does NOT read the barcode, the library tells NBU what the barcode is.

Some libraries allow you to mask the barcode, and only display xx characters, this is nothing to do with NBU.

If you run robtest and do s s, you will see the barcodes, and whatever they are, is what is sent from the library.

It you set the library to display all 8 charaters, you will have something like this;

AA1234L4

You then use the media generation rule to set what NBU will use as the media ID.

EG For robot 0

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

This would give a media id of AA1234  This is generally what people use.

If you did 

MEDIA_ID_BARCODE_CHARS 0 8 3:4:5:6

You would get 1234 as the media id.

Back to your example.

01450000

To make the barcode display as 0145 you would have to set the library to only display the first x4 characters from the left.  It is possible your library does not have this feature.

It is possible to change the barcode with a command but you would have to do this for each tape  - I DO NOT recommend this.

In fact, I do not recommend 

1. Chaging to only 4 characters, why, leave it at 6 or 8 , it is not doing any harm.

2.  If you already have media I would not start changing barcodes, you WILL run into all sorts of issues later on 

3.  If you are setting up a new environment from scratch, and there ar eno media yet, that is the time to change things.

Most perople use media ID of first 6 characters, and the barcode is either the same, or all 8.

I see no reason to limit it to 4, I have never seen this done, and the fact that no one is doing it should tell you something.

martin

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
Marianne's picture

"I want only 5 characters "

NBU Media Id is 6 characters long.  

As per Martin's excellent post, the robot reports on all the barcode characters it can read. Most labels have 8 characters. Some robots report 6 characters, others all 8.

You can tell NBU which SIX (6) characters to use for media ID.

You have give us one media id as example: 

01450000

What does your range look like?
What is the next media id in the range?
The entire range should guide you when deciding on Media Id Generation rule, not just one barcode label.

I have never seen 8-digit barcode labels ending in 00. They normally end in 2 characters that corresponds with media type (L2, L3, L4, etc)
Are you printing your own labels?

PS: If you have been using barcodes/media id's in a certain way in your environment, don't  try and change it now. 
Media Id generation rules must be decided upon before 1st tapes are written.
Trying to change in a live, production environment will end up in a massive mess....

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

mph999's picture

Marianne makes a very good point - "I have never seen 8-digit barcode labels ending in 00."

I have - not recommend.   LTO  barcodes should end in L2/3/4/5 etc .

Some libraries I believe use the last two characters, so they have to be correct, to allow tapes to be loaded into drives - Marianne will comment on this, she is more familiar with it.

You need to put some thought into what your barcodes are ...

Having only 'numbers' is very short sighted, and will make barcode rules very very difficult if you have multiple tape types.  Consider the fact that although you may not have mixed media now, you may do in the future.

Martin

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
NIKHIL2346565959's picture

Suppose my barcode is 8 char long and i did this entry 

MEDIA_ID_BARCODE_CHARS 0 6 3:4:5:6

Then what will happen?

revaroo's picture

Why do you want it 4 characters long and not 6? what is the difference to the operation of your backups? Nothing, so stick with the standard 6 characters and don't try to be clever just for the sake of it :)

mph999's picture

No idea, it is incorrect

MEDIA_ID_BARCODE_CHARS 0 6 3:4:5:6

The '6' needs to be an 8

The '0' is the robot number, the '6' is how many characters in the barcode, you have 8, not 6.

If you correct this to 8, then the rule will give the 3rd, 4th, 5th and 6th characters.

eg

barcode = AA1234L4

The rule would make it appear as 1234.

Martin

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
Marianne's picture

PLEASE read through 'Media ID generation options' in Admin Guide I.

It REALLY answers all your questions/doubts.

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

mph999's picture

Please do not make changes just because you can.  Any change to a system should be fully justified, researched, and recorded accurately in the system documentation.

The system documentation should be so detailed, it contains every change made and when, and the current setting of EVERYTHING that has been changed from the default  - are you doing this ?

I have never seen a barcode of 4 characters, everyone uses 6, with many using letters to allow differnt media to be identified (as I explained in my examples).

Making changes to a system can lead to a system so poorly configured that it can take weeks and weeks to fix.  Sometimes, I see systems that are so badly implementated, that they are unfixable.

I saw one yesterday in fact, not unfixable, but an issue caused by someone making changes for what ever reason that broke various bits.  As they negelted to tell me this, and various other things, my colleague and I spent several hours effectively looking in the 'wrong' place. I spent about an hour alone working out which logs we needed.   I wasn't very impressed when I found out, and even now cannot work out how they managed to make such a mess of things, I think they closed their eyes and started typing.

M

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
NIKHIL2346565959's picture

MEDIA_ID_BARCODE_CHARS 0 6 3:4:5:6

But if i did above entry,Barcode characters in NBU GUI will appear to be 6 char long.Is it?

I wont do it.I just wanna know this.

MEDIA_ID_BARCODE_CHARS 0 4  1:2:3:4

And if i did this,then barcode will be of  4 characters llong in NBU GUI?

mph999's picture

Did you read my post above. ?

The 'command' is incorrect.

Read this TN.   http://www.symantec.com/docs/TECH10824

This is the format of the rule.
 
MEDIA_ID_BARCODE_CHARS <robot_number> <barcode_length> <c1>:<c2>:<c3>:<c4>:<c5>:<c6>
 
where robot_number is the robot number, barcode_length is the number of characters in the media's barcode format.
 
<barcode length> is NOT the length you want, it is the actual length of how many characters the robot displays.  So if the robot displays 8 characters, then the length is 8.  You then 'make' it only display the characters you want by using 1:2:3:4 for example, which would show the 1st, 2nd, 3rd and 4th characters, thus making the length '4' charcters.
 
You have ignored out other questions, why do you want to do this - No one uses 4 characters, stop playing about with the system and leave it standard - 6 characters like everyone else .  You are making changes that are going to cause you serious problems in the future.
 
Martin
Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
NIKHIL2346565959's picture

so we cannot change the barcode length display on NBU gui?

mph999's picture

OK, let me explain it a different way.

My tape has a label

AB6789L4

I can make the library display this to NBU as 8 characters, 7 , 6 etc ...  This controls the true length.

Some libraries can do this, some cannot.

Lets keep things very very simple

I make the library display all 8 characters, so for example, robtest s s command will show AB6789L4.

I will now show <rule>  /  <result> in NBU gui for barcode

MEDIA_ID_BARCODE_CHARS 0 8 1:2:3:4  /  AB67

MEDIA_ID_BARCODE_CHARS 0 8 1:2:3:4:5:6  /AB6789  (This is what most people do)

MEDIA_ID_BARCODE_CHARS 0 8 2:4:6:8  /  B794  (don't even think of doing this, demo only)

MEDIA_ID_BARCODE_CHARS 0 8 8:7:6:5:4:3  /  4L9876  (don't do this)

MEDIA_ID_BARCODE_CHARS 0 8 3:4:5:6:7:8  /  6789L4

BUT, the barcode length in my example is always 8, we just get NBU to only display the characters we want.

Martin

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
Marianne's picture

You REALLY have the patience of a saint my friend... You deserve every single solution point as well as 'thumbs up' possible...

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

mph999's picture

Thank you Marianne.

I see Nikhil is now looking in the manuals, hopefully he will download the latest versions, but it's a good start.  As long as people make an effort, I don't mind explaining things a different way ...

Some stuff is hard, and even the more simple things, are not always explained the best way in the manuals - you should see the discussions that we sometimes  have in the offiice to try and work out what the manuals actually mean and sometimes to work out how bits of NBU work ...

Unfortunately the product is very very complex, as you well know and the sheer size of all the features means we have plenty of discussions - and even then, some bits remain a mystery ...

M

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
NIKHIL2346565959's picture

Thanks Martin.

Hats off !!!

I was very confused in this.Now i know how to change the bardode length to display to NBU gui.

Marianne's picture

Please do not confuse Media Id with Barcode.

Barcode is what is printed on the label - normally 6 or 8 characters.
This cannot be changed or manipulated.

Media Id is what is stored in NBU in this field - by default 6 characters.
This can be changed/manipulated.

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

NIKHIL2346565959's picture

So barcode  cannot be manupulated at NBU level?

Suppose i want Library to display 6 char in NBU GUI out of 8 of barcode .(I am not talking abt media id here).Is this possible?

Andy Welburn's picture

I'm sure this has been covered adequately by Martin & Marianne earlier, but just to reaffirm:

- depending on its make and model you get your library to present the actual barcode length to NetBackup. It is the library that deals with the barcodes: it reads them, it presents them to NetBackup.

NetBackup can only work with the barcode length that has been presented to it by the library.

e.g. Our original library presented six of the eight barcode characters to NetBackup i.e. out of 123456L3 it only presented the first six, so as far as NetBackup was concerned the barcode length was six & could not be anything other than that. Our replacement library was originally configured to present all eight characters - we had to reconfigure it to only present the first six to NetBackup.

Marianne's picture

Some libraries can do that - read the user guide for your library to see if it is possible.

Barcode length can only be manipulated from library side, not NBU.

Please don't make changes in a running, production environment. It WILL break NetBackup.

Changes to Library and NBU should only be made at the beginning of a new installation - before 1st inventory is done.

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

mph999's picture

Blimey, even I am getting confused, thank you Marianne for reminding everyone we are talking about media id ...

OK, here is the final word on this :

From robtest :
 
slot 1 (addr 100) contains Cartridge = yes
Source address = 1030
Barcode = SHR0TW00
 
So the barcode of the tapes  is SHROTW01 / 02 / 03 etc ...    that is 8 characters.
 
I have the rule :
 
MEDIA_ID_BARCODE_CHARS = 1 8 3:4:5:6:7:8
 
I run an inventory and this is what I get 
 
 
 
So the media ID shows as the last 6 characters (as I only told it to display  characters in positions 2,3,4,5,6,7,8 ) - butm we see the barcode is still 8 characters. 
 
The only way for the barcode to change, is if the library is capable to doing it.
 
But, as we have ALL said ...
 
Leave this alone, if you put badly designed systems in you will always have problems.  x4 chaeracters in a media ID is BAD design, DO NOT do it.
 
Also, DO NOT think of changing any barcode/ media id stuff in a running environment.  You will cause many issues when adding new media etc... as you will have a mix of some media with one media id length, and other media with different media id length.
 
Martin 
 
 
Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
CRZ's picture

Also, please don't set your data centre on fire.

(I feel like if somebody doesn't say this, you might very well try to set your data centre on fire)


bit.ly/76LBN | APPLBN | 75LBN

Marianne's picture

LOL!  I haven't laughed this much in a long time!!!

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

NIKHIL2346565959's picture

MEDIA_ID_BARCODE_CHARS = 1 8 3:4:5:6:7:8

@MARTIN:here NBU should display ROTWOO as barcode.But is not.Because?

mph999's picture

If you look at my picture, you will see that the media id is R0TW00, so the media id is correct.

The rule

MEDIA_ID_BARCODE_CHARS = 1 8 3:4:5:6:7:8

does NOT affect the barcode, it ONLY affects the media id length.

It is NOT possible to change the barcode length in NBU.

So in summary.

The length of the barcode can NOT be changed in NBU.

The media_id_barcode_chars rule only control which characters from the barcode are used to make the media id.

Look at the name, MEDIA_ID_barcode_chars - this tells you what it does, 'which characters from the barcode are going to make up the media id'.

Martin

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
SOLUTION
NIKHIL2346565959's picture

Thanks to all.

I got the final answer today,

It is NOT possible to change the barcode length in NBU

mph999's picture

I did actually mention this on the 4th ..

"NBU cannot control the barcode.  This is controlled by the library."

However, no matter, you understand now which is the main thing.

M

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
NIKHIL2346565959's picture

Martin rocks.I wish i could meet you and Marianne  one day,yes