cancel
Showing results for 
Search instead for 
Did you mean: 

what is the use of Media id in NETBACKUP

NIKHIL234656595
Level 6

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

1 ACCEPTED SOLUTION

Accepted Solutions

mph999
Level 6
Employee Accredited

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
 

View solution in original post

21 REPLIES 21

sunnyc_up
Level 4

sunnyc_up
Level 4

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)

NIKHIL234656595
Level 6

 

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
Level 6
Partner    VIP    Accredited Certified

"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."

NIKHIL234656595
Level 6

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?

NIKHIL234656595
Level 6

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
Level 6
Employee Accredited

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

NIKHIL234656595
Level 6

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

mph999
Level 6
Employee Accredited

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

NIKHIL234656595
Level 6

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

mph999
Level 6
Employee Accredited

Yes, correct.

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

martin

NIKHIL234656595
Level 6

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
Level 6
Employee Accredited

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

NIKHIL234656595
Level 6

I am confused!!!!!sad

mph999
Level 6
Employee Accredited

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

Amarnath_Sathis
Level 5

 

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

mph999
Level 6
Employee Accredited

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
 

mph999
Level 6
Employee Accredited

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

J_H_Is_gone
Level 6

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.