cancel
Showing results for 
Search instead for 
Did you mean: 

Netbackup - update volume configuration error

LFCNZ
Level 4

We had a tape library that we deleted from Netbackup and then readded it back in.

Unfortuantely we forgot to move the tape media from the library out of it before we did this.

So now when we try to inventory the tape media in the library it will not allow us to update the volume confiuration as it thinks the media is already in it.

Any ideas how to get around this?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

mph999
Level 6
Employee Accredited

There is probably a barcode mis-match.

NBU identifies tapes at a physical level by barcode, it then assigns a media ID and for the most part uses the media ID to reference the tape.

I suspect the barcode displayed by the library has changed.

The thing to understand, is that NBU does not ever inventory a library by looking to see where the tapes are in the library.  Instead it 'asks' the library where the tapes are - the result is the same, but how it gets there is very different.

Consider this :

Media generation ID rule = First six characters of barcode

Library display 8 charactors of barcode

 

Barcose / Media ID

AA1234L5  /  AA1234

Then the library changes and now only displays the first six characters

AA1234 / AA1234

The result is the media ID would be the same, but the barcode is different.  As the barcode is different NBU recognises this as a new tape, but when it trys to add it into NBU it find the media ID already there, but for a different barcode, hence 'media ID not unique'.

What to do.

Find a tape in the media section of the GUI, write down the slot number, maedia ID and barcode.

Run robtest from the robot control host, and then run the robtest command

s s

Find the tape you wrote down, and see what the barcode is, does it match what you wrote down.

(Exit robtest)

I suspect it will be different.

To correct.

Either - change the robot config (on the robot) to display the barcode the same way as before (so the barcode you see in robtest is the same as the barcode for the tapes as seen in NBU).

Remember, NBU has no effect on the barcodes displayed by robtest, these are sent from the library and are controlled by the library settings (despite whatever anyone else may tell you ...).

Move media to stand alone, and re-inventory

Or

For each media, change the barcode to match what robtest displays

bpmedia -m <media id> -barcode <barcode as seen in robtest>

 

 

 

 

 

 

 

View solution in original post

13 REPLIES 13

watsons
Level 6

It is not a requirement to move the tape out of the library if you re-add a tape library into configuration.

Inventory just reflect what the current location those tapes are in. If you wish to have a totally empty library after the configuration, just remove all those tapes out of the library and do another inventory. Those tapes will be changed to "standalone", which is OK - it won't affect the tape content.

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

What probably happened is that the robot number changed (TLD0 > TLD1). At this stage NetBackup believes the media are located in TLD0. So when you try do an inventory it finds new media in TLD1. It then sees that the media IDs are the same so it gives an error because you can't have 2 tapes with the same ID.

Select all your media, right click and select move, choose standalone from the drop down list. Then reinventory.

mph999
Level 6
Employee Accredited

If the robot number changed this will mess up all your storage units - you'll have to create new and change each policy, or delete the robot and manually addit back in as the same robot number as before.

Also, if you use Vault, this will be affected by a robot number change.

GulzarShaikhAUS
Level 6
Partner Accredited Certified

Do you get any specific error while performing the inventory? 

LFCNZ
Level 4

Hi

I have tried the suggestions above, no luck, it inventorys all robot fine, but then when you try to update the volume configuration for some of the tapes it advises:

Inventory failed:  media ID not unique in database(34)

So is there any why to remove this entry from the database?/

Thanks

Marianne
Level 6
Partner    VIP    Accredited Certified
We need to understand where the conflict is coming from. Please show us output of: vmcheckxxx -rt (robot-type) -rn (robot-number) -rh (robot control host) For example if robot type is tld, number is 1 and robot control host is media1: vmcheckxxx -rt tld -rn 1 -rh media1

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

Did you move the media to standalone?

Marianne
Level 6
Partner    VIP    Accredited Certified
I am wondering about the reason for deleting and adding the robot back. Was any hardware replacement and/or firmware update done? This could result in the robot now reporting a different number of characters and barcode/media id mismatch. vmcheckxxx will hopefully tell us.

mph999
Level 6
Employee Accredited

There is probably a barcode mis-match.

NBU identifies tapes at a physical level by barcode, it then assigns a media ID and for the most part uses the media ID to reference the tape.

I suspect the barcode displayed by the library has changed.

The thing to understand, is that NBU does not ever inventory a library by looking to see where the tapes are in the library.  Instead it 'asks' the library where the tapes are - the result is the same, but how it gets there is very different.

Consider this :

Media generation ID rule = First six characters of barcode

Library display 8 charactors of barcode

 

Barcose / Media ID

AA1234L5  /  AA1234

Then the library changes and now only displays the first six characters

AA1234 / AA1234

The result is the media ID would be the same, but the barcode is different.  As the barcode is different NBU recognises this as a new tape, but when it trys to add it into NBU it find the media ID already there, but for a different barcode, hence 'media ID not unique'.

What to do.

Find a tape in the media section of the GUI, write down the slot number, maedia ID and barcode.

Run robtest from the robot control host, and then run the robtest command

s s

Find the tape you wrote down, and see what the barcode is, does it match what you wrote down.

(Exit robtest)

I suspect it will be different.

To correct.

Either - change the robot config (on the robot) to display the barcode the same way as before (so the barcode you see in robtest is the same as the barcode for the tapes as seen in NBU).

Remember, NBU has no effect on the barcodes displayed by robtest, these are sent from the library and are controlled by the library settings (despite whatever anyone else may tell you ...).

Move media to stand alone, and re-inventory

Or

For each media, change the barcode to match what robtest displays

bpmedia -m <media id> -barcode <barcode as seen in robtest>

 

 

 

 

 

 

 

GulzarShaikhAUS
Level 6
Partner Accredited Certified

As medias have not changed it less likely to have thier barcodes changed??? Though you can try Martin's suggestions. 

I have had come across simillar issue where the issues was that the robot number had changed. As indicated by Riaan you need to check if the robot number has changed for this tape library.

Considering you have one tape library, you can go to Media and Device Management->Devices->Robot. Check how many are listed. If you see two with different TLD numbers then thats the culprit.

I will advise you to delete all devices by running command nbemmcmd -deletealldevices - allrecords

Redo the device configuration and check how many robots its listing now and the robot number. Rerun the inventory.

mph999
Level 6
Employee Accredited

I agree, but I can't see how a robot number change would cause a "media ID not unique in database" error, and at least as far as I remember, a robot number change inventory issue is resolved by moving the tapes to standalone first.

Maybe I'm wrong, but it's quick and easy to check, just to rule out.

Marianne
Level 6
Partner    VIP    Accredited Certified

We often see that a robot main board replacement or firmware update will result in different robot setting - either now reading all 8 chars whereas before only 6 or the other way round.

vmcheckxxx (cmd version of Inventory 'check and compare') will tell us what the robot sees and what the current config looks like.

 

LFCNZ
Level 4

Hi

 

I found what the issue was.

On our library someone had changed the way the barcodes were being read, so the same tapes were being read differently.

 

Changed back to how the tapes were read previously and then would allow me up update volume configuration.

 

Thanks for all help :)