cancel
Showing results for 
Search instead for 
Did you mean: 

unable to expire old catalog tapes -- NB 6.0 MP3

Kristopher_Marc
Level 3
I've discovered some catalog tapes that we do not need to keep around anymore using the available_media script.


L00443 HCART2 TLD 5 393 - - - DBBACKUP
L00458 HCART2 TLD 2 33 - - - DBBACKUP
L00650 HCART2 TLD 2 429 - - - DBBACKUP
L00660 HCART2 TLD 2 352 - - - DBBACKUP
L00662 HCART2 TLD 2 471 - - - DBBACKUP
L00693 HCART2 TLD 2 231 - - - DBBACKUP
< end partial_list>

I'm now attempting to expire and deassign these so we can make use of them for regular backups.

# vmquery -m L00434
================================================================================
media ID: L00434
media type: 1/2" cartridge tape 2 (14)
barcode: L00434
media description: ---
volume pool: NetBackup (1)
robot type: TLD - Tape Library DLT (8)
robot number: 2
robot slot: 434
robot control host: hostname.domain.com
volume group: 01_002_TLD
vault name: ---
vault sent date: ---
vault return date: ---
vault slot: ---
vault session id: ---
vault container id: -
created: Thu Aug 05 09:21:18 2004
assigned: Fri Oct 22 15:01:21 2004
last mounted: Fri Dec 17 20:36:28 2004
first mount: Fri Oct 22 14:54:25 2004
expiration date: ---
number of mounts: 12
max mounts allowed: ---
status: 0x0
================================================================================

# vmquery -deassignbyid L00434 1 0
De-assign media by ID is not allowed for NetBackup media.
invalid media ID (8)


# bpexpdate -m L00434 -d 0
Are you SURE you want to delete L00434 y/n (n)? y
requested media id was not found in the EMM database

Any suggestions?
11 REPLIES 11

Kristopher_Marc
Level 3
Anyone know what this is saying exactly?

# vmquery -deassignbyid L00434 1 0
De-assign media by ID is not allowed for NetBackup media.
invalid media ID (8)

Dennis_Strom
Level 6
Using the vmquery -deassignbyid can be a bit dangerous. If you deassgn the meida before expireing the media the images are still in the image database but no long assigned to the media. Ooops.

I use bpexpidate -m mediaid -d 0 then after the next catalog backup the images are expired off of the media. After running the bpexpidate command you can run the vmquery command. You can for bpexpdate with the -f switch
bpexpdate -ev MEDIA_ID -d 0 -force -host HOST

so in a nut shell
To remove media from the Netbackup database

* Verify that there are no images on the tape
bpimmedia -mediaid 000687 -L
* Expire the tape
bpexpdate -ev 000687 -d 0 -host scorpius -force
* Get the status and pool number of the tape
vmquery -m 000687
* Deassign the tape
vmquery -deassignbyid
vmquery -deassignbyid 000687 4 0x0
* Delete the tape
vmdelete -m 000687

Stumpr2
Level 6
vmquery -deassignbyid is NO longer functional in 6.0

Here is the link that Dennis provided (thanks for backing me up!) :)

The vmquery command will no longer deassign Veritas NetBackup (tm) media in version 6.0.
http://support.veritas.com/docs/278322

so......since you already ran bpexpdate,
I again say.
Try just running bplabel on the tapes...Message was edited by:
Bob Stump

Dennis_Strom
Level 6
here are some tech notes

How to reuse or recycle unnecessary NetBackup database catalog tapes for normal backups with NetBackup 4.5 or later
http://support.veritas.com/docs/273044
How to reuse or recycle unnecessary VERITAS NetBackup database catalog tapes for normal backups
http://support.veritas.com/docs/237779
STATUS CODE: 97 "Requested media id is in use, cannot process request" occurs when configuring the Catalog backup.
http://support.veritas.com/docs/247804
Using NetBackup 4.5 or later, how to re-use a NetBackup tape for Catalog backups (status code 97 is generated when configuring a catalog backup)
http://support.veritas.com/docs/273040

Dennis_Strom
Level 6
technote
GENERAL ERROR: When attempting to expire a media in Veritas NetBackup (tm) 6.0 with the bpexpdate command, the message "requested media id was not found in the EMM database" is received.

http://support.veritas.com/docs/280202

The vmquery command will no longer deassign Veritas NetBackup (tm) media in version 6.0.
http://support.veritas.com/docs/278322

Unable to use media for backups in a robotic library after a successful upgrade to NetBackup 6.0, due to media not expiring properly. The bpexpdate command fails with "Requested media id was not found in the EMM database".
http://support.veritas.com/docs/280181Message was edited by:
Dennis Strom

Kristopher_Marc
Level 3
Thanks for all the responses. I'm still having a problem expiring and labeling these images with DBBACKUP status.

When verifying the contents of this media I get:

# bpimmedia -L -mediaid L00434
no entity was found

I can label this tape but it doesn't remove the DBBACKUP status.

Stumpr2
Level 6
hmmm...

try assigning it

The following command assigns volume A23456, which is in pool 1 (NetBackup), and sets the status to 0 and the assign time to 12/31/98 15:50:22: vmquery -assignbyid A23456 8mm 1 0 915141022

then try
The following command checks for all media in host cat's media catalog that are still assigned but no longer contain valid backups. If any such media are found, the command removes them from the media catalog and deassigns them in the Media Manager catalog. bpexpdate -deassignempty -host cat

then try bplabel
/usr/openv/netbackup/bin/admincmd/bplabel -m media_id -d density ]

please let me know the results.

Kristopher_Marc
Level 3
Here is what I'm getting for this particular volume:

vmquery -assignbyid L00434 hcart2 1 0 915141022
Assign media by ID is not allowed for NetBackup media.
invalid media ID (8)

I'll try some others and let you know if I can move to the next steps.

TempoVisitor
Level 4
Inconsistency between old assigned media to catalog backups and version 6 EMM DB can be checked with this :
nbemmcmd -listmedia -mergetable
try th ebpexpdate after this.

If it dos not work better, try to assign it. This is now done by :
bptm -makedbentry -m -den -poolnum

then again a try on bpexpdate.

Vmquery does not wotk nor for assigning or deassigning media.
Bplabel just writes on the tape but does not add anything in the database.

Stumpr2
Level 6
Thank you for another informative post!
I'm still learning the differences with 6.0Message was edited by:
Bob Stump

Kristopher_Marc
Level 3
A fellow engineer pointed me to the bptm -makedbentry command. That worked for me.

Thanks again to everyone for responding.

P.S. I love all these new undocumented features in NB 6.0! :)