Forum Discussion

Calzor_Suzay's avatar
12 years ago

media ID not unique in database (34)

Following on from upgrading our two libraries (different sites) from LTO3 drives to LTO5 I've had a request to perform a restore using the old LTO3 tape originally from the other site.

I performed bpmedia -movedb to swop the tape between media servers like we normally do but when I inventory the robot to start using the tape it gives me the "media ID not unique in database (34)", it obviously is as nothings changed. The tape was removed from library several months ago using netbackup.

vmquery -m returns

================================================================================
media ID:              CRO954
media type:            1/2" cartridge tape (6)
barcode:               CRO954L3
media description:     ----
volume pool:           Backup (4)
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:               Thu Feb 23 14:24:53 2012
assigned:              Fri Mar 02 20:15:16 2012
last mounted:          Thu Mar 08 20:15:53 2012
first mount:           Sat Mar 03 05:22:15 2012
expiration date:       ---
number of mounts:      5
max mounts allowed:    ---
status:                0x0
================================================================================

The bar code rules for existing media are set to Default for both options.

Any ideas?

 

  • Command to update barcode:

     

     vmchange -barcode <barcode> -m <media_id>
     
    No idea what your OS or scripting abilities are, but easiest will be to save a list of media id's that need to be changed and then script vmchange to loop through the list.
     
     
     

11 Replies