Video Screencast Help

Expiring "infinite" tapes that are assigned to another server.

Created: 18 Dec 2012 • Updated: 20 Jan 2013 | 4 comments
This issue has been solved. See solution.

For reasons that are too long to get into, there are a number of old (like, 2009, 2010) tapes that were previously given "infinite" expiry times that we'd like to re-use, and I can't find the right combination of magic spells to get all the problems fixed.

There is, for the record, NOTHING on these tapes that we want to keep.  We want to find a way to have Netbackup treat these old, previously used tapes as if they were fresh new blank tapes.

First, from the GUI:  We can't change the pool of an assigned media.  We can't change the expiry date because that's not an option in the GUI.

So, I start with Media ID Z203L3, and try this:

./bpexpdate -m Z203L3 -d 0

I get:

Are you SURE you want to delete Z203L3 y/n (n)? y
requested media id is not assigned to this host in the EMM database
 

./bpmedialist -m Z203L3
requested media id is not assigned to this host in the EMM database
 

As per the KB entry here:

http://www.symantec.com/business/support/index?pag...

I try:

./nbemmcmd -listmedia -mediaid Z203L3
NBEMMCMD, Version:6.5
====================================================================
Media GUID:                     b9ad7712-51ba-11de-8000-ae462b3c6e37
Media ID:                       Z203L3
Data Expiration:                INFINITY
Origin Host:                    NONE

 

(I've clipped some of the output)

./nbemmcmd -listmedia -mergetable
NBEMMCMD, Version:6.5
The following number of records were found:0
Command completed successfully.

 

Okay, so I need to make the DB entry manually, right?  It's in pool 7, so I run:

 ../bptm -makedbentry -m Z203L3 -den DLT3 -poolnum 7
Error - database system error

.... and that's the end of that KB article's helpfulness.

Anyone got an idea for my next step?  Again, I do *not* care about anything on this tape.  If I can wipe it blank and make Netbackup think it's a new tape, GREAT.  Help me do that?

Comments 4 CommentsJump to latest comment

John Rowat's picture

Hi,

 

While that's for 6.5 instead of 6.0, the commands are the same, as are the results of running the commands.

From that article, "  If the Last Write Host hostname appears as NONE or is blank, yet there is a value for Time Assigned, this indicates an incomplete EMM media record."

Step 1:

./nbemmcmd -listmedia -mediaid Z203L3
NBEMMCMD, Version:6.5
====================================================================
Media GUID:                     b9ad7712-51ba-11de-8000-ae462b3c6e37
Media ID:                       Z203L3
Media Type:                     DLT3
Last Write Host:
Time Assigned:                  12/06/2009 16:31

 

So, I've got an incomplete EMM media record, okay.

Step 2:

Determine if the media is in the merge table.

 ./nbemmcmd -listmedia -mergetable
NBEMMCMD, Version:6.5
The following number of records were found:0
Command completed successfully.

So, not in Merge Table.  Great, on to

Step 3:

Determine if there are images on the media.  There are - but it doesn't say to do anything about that.  So.

Step 4: 

Build a complete media record using bptm

../bptm -makedbentry -m Z203L3 -den DLT3 -poolnum 7
Error - database system error

And there's the problem.  Same commands as the other article, same results.

Will Restore's picture

According to an old thread

"Opened a CASE to Symantec related to this ...

This condition is a result of a known issue with NetBackup 6.5 and 6.5.1. The EMM database referential integrity is compromised if a host that has media assigned to it is deleted ...

Scripts were prepared and delivered to fix the database referential integrity."

 

https://www-secure.symantec.com/connect/forums/lto4-tapes-dont-get-expired-they-are-not-moved-scratch-volume-pool

Will Restore -- where there is a Will there is a way

SOLUTION
mph999's picture

Simply ...

If this command does not 'expire' the tapes ...

bpexpdate -d 0 -m <media id>

Log a call ...

There is not much I can think of that will stop that command working that is fixable without support.

(sometimes you need the -h <host> option if the bpexpdate command is not run on the same server that last wrote to the media, but, as teher is no host listed in the EMM record for this tape then I can't see this helping much).

Unless anyone comes up with some bright ideas, support will just create an SQL script to splat these tapes from the DB, will take a bit of time as SQL scripts have to go via backline > engineering.

Interestingly, when I run bptm -makedbentry on a tape with a correct EMM entry I get a message saying the  entry already exists, you don't, you just get an error so this is another good pointer that the DB entry is damaged.

Martin

 

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805