Using old tapes
I have the need to restore old information from my backup. However when my inventory tape library have return "media ID not unique in database (34)."
I need to collect inventory information tape 000343, put my tape comprises as a new tape (0343L3) and not the tape already used in the past.
log:
-----
7/27/2016 5:59:42 PM> Inventory & Update for TLD (1) on cansbkp06
-----
Generating list of recommended changes ...
Proposed Change (s) to Update the Volume Configuration
================================================== ===
Logically add new media 000343 (barcode 000343L3) to robot slot 2.
Logically add new media 000341 (barcode 000341L3) to robot slot 5.
Update volume configuration?
y
Updating volume configuration ...
Processing new media added to the robotic library by logically
adding the media with new media IDs as follows ...
ID Media Slot
==== ========
Update failed: could not add new media ID '000343' into slot 2
Insert the media failed:
Media ID not unique in database (34)
Tape with barcode 000343L3 is trying to be added with media ID 000343.
It therefore appears that the robot is presenting all 8 characters from the barcode to NBU, and the media ID genereation rule is default (1st 6 characters)
However, there is already a media ID 000343 in the NBU 'volume DB'.
This can happen for multiple reasons. I suspect in this case if you run :
vmquery -m 000343
You will see that the media ID 000343 is showing a different barcode - probably 000343 as a guess.
Most libraries can 'mask' some of the barcode characters, so the barcode that appears in NBU is not necessarily all the charaters shown on the tape sticky label.
Clearly, barcode 000343, 343L3 and 000343L3 are the same tape, but NBU treats them as different, if the barcode is not exactly the same.
What I think is happeneing, is that in the past media 000343 was added with a barcode different to 000343L3, 000343 - this would give a media ID the same (000343)
Now, the barcode is presented as all 8 characters (library firmware update can cause this, config change or physical replacement) so NBU thinks it is a new tape, however the media genereation rule of the 1st 6 characters would give the same media ID, so we have
Barcode Media ID
000343L3 000343
000343 000343 < What I think is in the DBNBU trys to add barcode 000343L3, but because this gives the same mediaID, it errors, because there is already a tape with the same media ID in the DB.
The only way I can think to 'fix' this is a workaround (we can't change how the robot presents that barcodes wlse it will work for this tape, but not the others) is to change the barcode in NBU
vmchange -m 000343 -b 000343L3
However, before runningn this it would be good to see:
vmquery -m 000343
vmquery -m <some tape that works>It was possible to make as follows:
C:\Program Files\Veritas\Volmgr\bin>vmchange -barcode 000341L3 -m 000341
vmchange -m 000341 -b 000341L3 I returned error, however the thought is correct. I use netbackup 7.6.1, I can not tell if the error is associated my version.
After setting the barcode had to change the HCART3 to HCART2. My tape library has L5 drives, it depends on which drive you use (HCART (L4), HCART2 (L5) or HCART3 (L3))
C:\Program Files\Veritas\Volmgr\bin>vmchange -h cansbkp06 -new_mt hcart2 -m 000341
Restore successfully!!
Thank mph999 and Marianne. He could not without your help.