cancel
Showing results for 
Search instead for 
Did you mean: 

Using old tapes

SilvioMarques
Level 3

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)

2 ACCEPTED SOLUTIONS

Accepted Solutions

mph999
Level 6
Employee Accredited

 

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 DB

NBU 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>

View solution in original post

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.

View solution in original post

5 REPLIES 5

Marianne
Level 6
Partner    VIP    Accredited Certified

I am battling to fully understand what the issue is. 

You say the following: 

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.

But the Inventory log shows that NBU is trying to add the tape as 000343.

I don't understand what this means:

... my tape comprises as a new tape (0343L3) and not the tape already used in the past.

Are you saying that at some point the tape was added as  0343L3?

If so - what is the status of this media id?
Can you show us output of :
nbemmcmd -listmedia -mediaid 0343L3

Please run the same command for 000343.

If media id 0343L3 is unassigned and you need it to be added as 000343, you can delete media id 0343L3 and run the Inventory again.

...Or maybe my understanding of the problem is completely wrong and I need to be explained again.... 

mph999
Level 6
Employee Accredited

 

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 DB

NBU 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>

Sorry about the lack of details, however have little experience with this application, I try to spend more details ...

The two strands are the same (000343 and 0343L3), need to do a restore of this information, however my tape understands that the tape 000343 is now a new tape named as 0343L3. As he understood as a new tape he does not associate the old image to this tape, returning as a tape "NetBackup" instead of "Annual".

Thanks for returns.
Following the return of vmquery:

C:\Program Files\Veritas\Volmgr\bin>vmquery -m 000343
=====================================================

media ID: 000343
media type: 1/2" cartridge tape 3 (24)
barcode: 000343
media description: -
volume pool: Anual (18)
robot type: NONE - Not Robotic (0)
volume group: ---
vault name: ---
vault sent date: ---
vault return date: ---
vault slot: ---
vault session id: ---
vault container id: -
created: 12/9/2011 1:22:14 PM
assigned: 1/28/2012 2:00:13 PM
last mounted: 8/9/2012 9:36:27 AM
first mount: 12/15/2011 3:26:53 PM
expiration date: ---
number of mounts: 9
max mounts allowed: ---
status: 0x0
=====================================================


C:\Program Files\Veritas\Volmgr\bin>vmquery -m 0343L3
=====================================================

media ID: 0343L3
media type: 1/2" cartridge tape 2 (14)
barcode: 000343L3
media description: Added by Media Manager
volume pool: NetBackup (1)
robot type: TLD - Tape Library DLT (8)
robot number: 1
robot slot: 2
robot control host: cansbkp06
volume group: 002_00001_TLD
vault name: ---
vault sent date: ---
vault return date: ---
vault slot: ---
vault session id: ---
vault container id: -
created: 7/28/2016 8:24:54 AM
assigned: ---
last mounted: ---
first mount: ---
expiration date: ---
number of mounts: 0
max mounts allowed: ---
=====================================================

Marianne
Level 6
Partner    VIP    Accredited Certified

Martin's understanding of the problem is correct.

This robot sends all 8 characters to NBU, where the previous robot only sent the 1st 6 characters.

Barcode label 000343L3 was therefore added earlier today as media id  0343L3 (using last 6 chars).

Please delete media id  0343L3, and then update the barcode for media id 000343 as per Martin's post.

vmchange -m 000343 -b 000343L3

Now retry the Inventory.

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.