Forum Discussion

NIKHIL234656595's avatar
12 years ago

media id mismatch issue

we have 2 tapese got  in our environment which have got mismatch between media id and barcode.for eg 

 

barcode: AA00123L3

media id: 220012

Barcode rule is correct.What could be the issue and what options i have to correct this?

  • It is the MedaID Generation rule that is needed to get this right but it is odd that you have a 9 digit barcode and will have to decide which digit to drop (guessing the first A)

    This can be Admin Console specific so it needs to be set for all users on all admin consoles.

    Based on your barcodes then you need a rule for each tape library that says it has 9 digits and the rule is :

    2:3:4:5:6:7

    To deal with the two tapes that you have that are wrong you need to wait until they expire (have no time assigned date) and then delete them from NetBackup after which you can put them into the library, inventory with the media ID generation rule in place which will add it into NetBackup with a media id of A00123.

    You then need to label it with the verify option to overwrite the tape header

    Using 9 digit barcodes is fraught with danger

    I can only assume this tape used to have a different barcode and has been imported in for it to have such a mis-match (it would need a media id generation rul of 6:6:2:3:4:5 to get the media id it has from its barcode!)

    Hope this helps

7 Replies

  • Anonymous's avatar
    Anonymous

    Run

    vmquery -m 220012 -X

    and post output.

  • It is the MedaID Generation rule that is needed to get this right but it is odd that you have a 9 digit barcode and will have to decide which digit to drop (guessing the first A)

    This can be Admin Console specific so it needs to be set for all users on all admin consoles.

    Based on your barcodes then you need a rule for each tape library that says it has 9 digits and the rule is :

    2:3:4:5:6:7

    To deal with the two tapes that you have that are wrong you need to wait until they expire (have no time assigned date) and then delete them from NetBackup after which you can put them into the library, inventory with the media ID generation rule in place which will add it into NetBackup with a media id of A00123.

    You then need to label it with the verify option to overwrite the tape header

    Using 9 digit barcodes is fraught with danger

    I can only assume this tape used to have a different barcode and has been imported in for it to have such a mis-match (it would need a media id generation rul of 6:6:2:3:4:5 to get the media id it has from its barcode!)

    Hope this helps

  • Anonymous's avatar
    Anonymous

    To see if you have any more of these in your environment run the command:

    vmquery -a -W

    columns 1 and 4 show MediaID and Barcode respectively.

    So proceed with caution and apply the same fix to those also if you see some mismatches.

    Both columns should match.

    They do in my environment. And I dont get these messages.

    Good luck.

  • OK.So i can only delete them and then reinventory.Barcode rule is correct.Its working fine for rest of tapes.

     

    Any other option?

  • It is not the barcode rule - it is the mediaid generation rule - the next tab in the inventory advanced options

    why these two were so wrong is hard to say

  • Both are correct.

     

    I wanna know what other options i have except deletion and then add to correct this issue?

  • No other option, apart from a physical inventory, which I do not recommend, as you end up with non standard enteries.

    You need to explain the history, is this an empty tape, or does it contain data ?

    NBU, as you know, makes the media id from the barcode.

    AA0123L4, for example, the media id gen rule might be 1:2:3:4:5:6 to give a media id of AA0123

    When it goes to label the tape, it could find that the media id written on the tape is say 0124L4

    This could happen if the tape came from another environment that had a different media id gen rule, and so the media id for this tape was slightly different.

    ... which is what Mark explained above.

    If the tape contains data, you could run a physical inventory on the slot containing the tape.  This way, NBU would read the header on the tape, and give it what ever media id is on there. 

    Martin