Forum Discussion

smckelvey's avatar
smckelvey
Level 5
14 years ago

Tapes with no images or expiration, but can't be used

Netbackup Enterprise Server 7.0. Windows Server 2003 SP2. StorageTek 40 tape library, 299 tapes.

I have a handful of tapes that don't appear to have any images, no expiration date (images or on the volume itself), and Netbackup doesn't appear to write to them if they are in the Library. Normally, once the images expire, tapes automatically go to "Scratch" and are made available again.

 

I'm wondering, what if anything I should check or do to reclaim these tapes? Is my only option to expire the media, then reintroduce it to Netbackup?

As an example, here's some info for one of the tapes (000096): vmquery, nbemmcmd -listmedia, and bpexpdate -deassignempty.

 

C:\Program Files\VERITAS\Volmgr\bin>vmquery -m 000096

================================================================================

 

media ID:              000096

media type:            1/2" cartridge tape (6)

barcode:               000096

media description:     Added by Media Manager

volume pool:           FULL (5)

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:               9/1/2005 4:33:01 PM

assigned:              3/3/2006 6:28:15 PM

last mounted:          3/12/2006 5:36:09 PM

first mount:           9/1/2005 5:16:39 PM

expiration date:       ---

number of mounts:      52

max mounts allowed:    ---

status:                0x0

================================================================================

 

 

 

C:\Program Files\VERITAS\NetBackup\bin\admincmd>nbemmcmd -listmedia -mediaid 000096

NBEMMCMD, Version:7.0

====================================================================

Media GUID:                     416403ae-ebe4-447b-8496-a21fb4074e13

Media ID:                       000096

Partner:                        -

Media Type:                     HCART

Volume Group:                   ---

Application:                    Netbackup

Media Flags:                    1

Description:                    Added by Media Manager

Barcode:                        000096

Partner Barcode:                --------

Last Write Host:                NONE

Created:                        09/01/2005 16:33

Time Assigned:                  03/03/2006 18:28

First Mount:                    09/01/2005 17:16

Last Mount:                     03/12/2006 17:36

Volume Expiration:              -

Data Expiration:                -

Last Written:                   -

Last Read:                      -

Robot Type:                     NONE

Robot Control Host:             -

Robot Number:                   -

Slot:                           -

Side/Face:                      -

Cleanings Remaining:            -

Number of Mounts:               52

Maximum Mounts Allowed:         0

Media Status:                   ACTIVE

Kilobytes:                      0

Images:                         0

Valid Images:                   0

Retention Period:               -

Number of Restores:             0

Optical Header Size Bytes:      0

Optical Sector Size Bytes:      0

Optical Partition Size Bytes:   0

Last Header Offset:             0

Adamm Guid:                     00000000-0000-0000-0000-000000000000

Rsm Guid:                       00000000-0000-0000-0000-000000000000

Origin Host:                    balt-srvr-nbu

Master Host:

Server Group:

Upgrade Conflicts Flag:

Pool Number:                    5

Volume Pool:                    FULL

Previous Pool Name:             SCRATCH

Vault Flags:                    -

Vault Container:                -

Vault Name:                     -

Vault Slot:                     -

Session ID:                     -

Date Vaulted:                   -

Return Date:                    -

====================================================================

Command completed successfully.

 

 

 

C:\Program Files\VERITAS\NetBackup\bin\admincmd>bpexpdate -deassignempty

Search for empty media that meet the following criteria:

        Media id: All

 

Continue? y/n (n)y

No media matching criteria were found to be deassigned.

no entity was found

 

  • Any chance that a media server was improperly deassigned or lost it's mediaDB in pre-6.x days?

    If that happened, images were expired but media could not be deassigned due to missing mediaDB entries...

    Try the process in this TN:

    http://www.symantec.com/docs/TECH58277

    2. Determine if the media ID exists in the merge table.  If the media ID appears in this listing, then a different issue exists - do not proceed further.  Contact Symantec Technical Services for assistance with getting this media ID out of the merge table.  The following example shows no media IDs in the merge table:

    Command syntax example and output:
     
    nbemmcmd -listmedia -mergetable
     
     
    The following number of records were found:0
     
    Command completed successfully.

    3. From the same path, type bpimmedia -mediaid 000538 to determine if there are any images on this piece of media.  If there are no images, then no output will be displayed.  If there are images, an IMAGE line and FRAG line will appear for each valid image on the media ID.

    4. As long as the media ID does not appear in the merge table, the bptm command can be used to build a complete media record for each affected media ID.  Then the volume can then be unassigned and expired.  This will require the media ID of the affected media, as well as the density and the volume pool number.

    Command syntax example from a UNIX server with a media ID of 000538, a density of HCART, that resides in Volume Pool 1 (NetBackup):
     
    bptm -makedbentry -m 000538 -den hcart -poolnum 1
     

    5.  Once this command completes, rerun the nbemmcmd -listmedia -mediaid 000538 command from step 1.  There should now be a valid Last Write Host hostname.  

    6. The tape can now be expired with the bpexpdate command:

     
    bpexpdate
     
    Unix: /usr/openv/netbackup/bin/admincmd
     
    Windows: <Install_dir>\NetBackup\bin\admincmd
     

     
    If there are no valid images for the media, the command syntax example and output:
     
    bpexpdate -m 000538 -justmedia -d 0  
     
    Are you SURE you want to delete 000538 y/n (n)? y
     
     
    If there are  valid images for the media, the command syntax example and output:
     
    bpexpdate -m 000538 -d 0 
     
    Are you SURE you want to delete 000538 y/n (n)? y
     
    Now that the media is expired, it can be used for backups again and will be overwritten.  
     

12 Replies