This issue has been solved.

what is the use of Media id in NETBACKUP

Created: 18 Mar 2012 • Updated: 22 Mar 2012
Login to vote
0 1 Vote

what is the use of Media id in NETBACKUP  when we have barcode?

Quick Look Solution

Think of it this

Think of it this way.

Createing the media id is related to the barcode - hence why the 'Media id generation rules" is set in the robot inventory screen (advanced options).

Here is a tape from my library (this is from the vmquery command)

 

media ID:              000172
media type:            1/2" cartridge tape 2 (14)
barcode:               000172
media description:     Added by Media Manager
volume pool:           Filer (6)
robot type:            TLD - Tape Library DLT (8)
robot number:          2
robot slot:            4
robot control host:    rdgv21-22
volume group:          000_00002_TLD
vault name:            ---
vault sent date:       ---
vault return date:     ---
vault slot:            ---
vault session id:      ---
vault container id:    -
created:               Wed Sep 28 10:39:24 2011
assigned:              ---
last mounted:          ---
first mount:           ---
expiration date:       ---
number of mounts:      0
max mounts allowed:    ---
 
 
We see it has a barcode, and in this case, the media id is the same.
 
So, it has a media id, and a barcode.  It is in the volume database because I ran an inventory on the tape.
 
But ...
 
The tape has no label, simply because, I haven't used it.
When I use it, the label will be written to the tape.  If I don't use it, it will stay in this state for ever.
 
Martin
 

Filed Under

Comments

18
Mar
2012

Media ID & Bar Code

Regard

Sunny Chauhan

18
Mar
2012

Follow this

hi,

You can get the information from here.

 

https://www-secure.symantec.com/connect/forums/media-id-and-label

 

(Note: if you get the satisfy answer then mark this as solution)

Regard

Sunny Chauhan

18
Mar
2012

  The reason they are shown

 

The reason they are shown in the gui.......

 

if the barcode comes off or gets switched.  When a tape is loaded netbackup compares the barcode that the library says it put in the drive to the label written on the tape( if it is first use netbackup writes it).

 

if the barcode and the written label do not match... netbackup will freeze the tape and not use it.

 

reason is that netbackup wants to make sure that it does not overwirte a good tape my mistake.

 

WHAT THIS MEANS?

Marianne
Trusted Advisor
Accredited
Certified
18
Mar
2012

"WHAT THIS MEANS?" Seems you

"WHAT THIS MEANS?"

Seems you have answered your own question:

"reason is that netbackup wants to make sure that it does not overwirte a good tape my mistake."

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

18
Mar
2012

ok. So a volume gets a media

ok.

So a volume gets a media ID once it is written?

Fresh new media id wont have a media id until something has written on it?

mph999
Symantec Employee
Accredited
22
Mar
2012

No, a volume gets a media id

No, a volume gets a media id written on the beginning of the tape when it is labelled - it does not have to contain data at this time.

Martin

 

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
22
Mar
2012

You are close

a new tape does not have anything written to it.

When NB calls the tape for the first time the barcode is read and that same number is written to the tape as the Media id.  The NB will try writing the backups to the tape.

now the backup could fail so no data on tape

or you could just bplabel the tape putting the media id on it without doing a backup

either way it gets an ID (on standalone tape drives you have to label the tape as it was not read by a barcode reader - other wise it gets a generic media id like A00000)

now if a label falls off and a different one gets put on

or a tape was labeled in standalone then gets a barcode

you now have a tape where the barcode is one number and the media id written on the tape is different.

when the tape is next loaded either for a backup or a restore - the two are compared - if they do not match NB will freeze the tape.

This is because NB does not know if you put a new barcode on the tape on purpose or by mistake so it does not want to overwrite what could be a valid backup tape.

this is also why we have the bplabel - if we do change the barcode on a tape we can force a label on it - where it will but the new media id on the tape giving it the same id as the barcode - then you can write to it.

I don't have to know how to spell....I work on Unix.
NetBackup 7.0.1 - AIX & Windows

19
Mar
2012

ok. So when we inventory

ok.

So when we inventory media ,media id generates on it based on the barcode.

Media label can be done by invenory or manually.

correct?

mph999
Symantec Employee
Accredited
20
Mar
2012

Yes, the media id is

Yes, the media id is generated based on the 'media id generation rule' if set (otherwise it takes the first 6 characters of the barcode (default)).

The inventory doesn't label the tapes, this is done either manually as you suggest, or when NBU uses the tape for a backup, if it finds the tape 'blank; (no header' it will label it).

Martin

 

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
20
Mar
2012

so what if i insert a brand

so what if i insert a brand new tape.Then?what afte inventory?

mph999
Symantec Employee
Accredited
20
Mar
2012

I answered this question in

I answered this question in the post you marked as the solution (thank you).

An inventory does nothing with labels, all it does is gets the library to tell NBU where the tapes are (that is, in what slots the tapes are in).  NBU enters this information into the 'volume databse'.  

The tape remains 100% blank - nothing is on it at all.  If the tape is not used, it will never be labelled (unless you do it manually).

The NBU volume label is only written to this tape when :

1.  The tape is written to in a backup, or used for a duplication

or.

2, If you maually label it

That is it, it is no more complex than that.

You do not really need to worry about this, just leave it to NBU, it will do it all.  If theer are issues, then ask for help.

Regards,

Martin

 

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
20
Mar
2012

ok so if a brand new tape has

ok so if a brand new tape has not gone into a tape drive for writing do it will remain unlabelled?

mph999
Symantec Employee
Accredited
21
Mar
2012

Yes, correct. You might

Yes, correct.

You might manually label it, but of not, it will remain unlabelled until it is used.

martin

 

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
21
Mar
2012

so that new tape after

so that new tape after inventory will go into netbackup pool and in the media tab,we will only see the barcode mentioned and media id blank.

correct?

mph999
Symantec Employee
Accredited
22
Mar
2012

I think you will still see

I think you will still see the media ID, just that it has not been written to the beginning of the tape until it is used.

Martin

 

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
22
Mar
2012

I am confused!!!!!

I am confused!!!!!sad

mph999
Symantec Employee
Accredited
22
Mar
2012

When you inventory a tape,

When you inventory a tape, the tape will appear in the netbackup GUI with the media id  and the barcode.

All an inventory does is put the details of the tapes in the library in to the volume database.  Is does not do any labelling.

At this time, the tape is NOT labelled.

The tape is ony labelled (the media id is written to the beginning of the tape) when it is used for the backup/ duplication,  or, if you do it manually.

Martin

 

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
22
Mar
2012

Media ID Generation.

 

Hi Nikhil,
 
Inventory: It won't change/assign any Media ID's.
 
When you run inventory, tapes which are all present in the mail slots will be loaded into the library.
Volume database will get updated with the media information which is loaded in library.
 
Media ID: Media ID is limited to 6 Character's. Its a Logical ID for a Volume in Netbackup.
 
Media ID can be assigned to a Media in 2 ways,
 
1. Media ID Generation rule. - If the rule is not configured by default it takes 1st 6 letters of Barcode as Media id. You can view this in GUI. But this media id won't be written in the header file of the media.
 
2. Manually setting using bplabel Command / Whenever a backup uses the fresh media and finds there is no header file on the media is assign's a media id and a header file is created for the same.
 
Barcode: Its a Physical ID for a Volume in Netbackup.
 
It will be physically present on the Media. Barcode can be longer than Media ID.
 
Links:
 
 
If this response answers your query, please mark it as a solution

Amarnath Sathishkumar

If this comment is helpfull, Don't forget to give a "Thumbs Up" or mark as "Solution"

mph999
Symantec Employee
Accredited
22
Mar
2012
SOLUTION

Think of it this

Think of it this way.

Createing the media id is related to the barcode - hence why the 'Media id generation rules" is set in the robot inventory screen (advanced options).

Here is a tape from my library (this is from the vmquery command)

 

media ID:              000172
media type:            1/2" cartridge tape 2 (14)
barcode:               000172
media description:     Added by Media Manager
volume pool:           Filer (6)
robot type:            TLD - Tape Library DLT (8)
robot number:          2
robot slot:            4
robot control host:    rdgv21-22
volume group:          000_00002_TLD
vault name:            ---
vault sent date:       ---
vault return date:     ---
vault slot:            ---
vault session id:      ---
vault container id:    -
created:               Wed Sep 28 10:39:24 2011
assigned:              ---
last mounted:          ---
first mount:           ---
expiration date:       ---
number of mounts:      0
max mounts allowed:    ---
 
 
We see it has a barcode, and in this case, the media id is the same.
 
So, it has a media id, and a barcode.  It is in the volume database because I ran an inventory on the tape.
 
But ...
 
The tape has no label, simply because, I haven't used it.
When I use it, the label will be written to the tape.  If I don't use it, it will stay in this state for ever.
 
Martin
 

 

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
22
Mar
2012

so initially on a media we

so initially on a media we have only barcode.

correct?

and label is generated when something is written on it?

we can see barcode from our naked eye but not media id?

mph999
Symantec Employee
Accredited
23
Mar
2012

Yes, that is correct.The

Yes, that is correct.

The media id along with the barcode will be seen in NBU gui, but on the tape, the media id is only written to it once it is used.

Martin

 

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