cancel
Showing results for 
Search instead for 
Did you mean: 

Return tapes to the scratch pool

Seburau
Level 3

Hi

I have Netbackup 7.7 with tape library MSL6480. There is a pool for SLP policy. Its name is 1month. There ara a few tapes in this pool with 1 or 2 valid images. So these tapes can not move to the scratch pool. But when I look at "tape contents" one of these tape I see that all images on this tape have expiration date in last year.

How I can see what exactly images are considered valid? And how can I return tape to the scratch pool?

Thank for the help and sorry for my English.

1 ACCEPTED SOLUTION

Accepted Solutions

Solution is:

1. Find out all expired tapes not in the scratch pool. (report Tape Summary in GUI)

2. Find out backup id of images giving the problem (nbstlutil list -mediaid <media-id>).

3. Remove images from SLP (bpexpdate -backupid <backup-id> -d 0 -force_not_complete).

Thank Veritas Support for this solution.

Thank Marianne and other peoples for help.

Sorry for my English.

View solution in original post

14 REPLIES 14

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Please show us output of this command for one of these tapes:

nbemmcmd -listmedia -mediaid <media-id>
(command is in /usr/openv/netbackup/bin/admincmd)

Output of above command will tell us why tapes cannot be recycled.

 

Thank you Marianne for quick answer.

Here is output for one of these tapes:

NBEMMCMD, Version: 7.7
====================================================================
Media GUID: a14a996e-9811-11e3-8000-895426eccc40
Media ID: 6741L6
Partner: -
Media Type: HCART3
Volume Group: 000_00000_TLD
Application: Netbackup
Media Flags: 1
Description: Added by Media Manager
Barcode: 6741L6
Partner Barcode: --------
Last Write Host: nbu-s1
Created: 02/17/2014 14:25
Time Assigned: 11/07/2015 09:08
First Mount: 08/09/2014 00:08
Last Mount: 09/26/2016 13:04
Volume Expiration: -
Data Expiration: 12/08/2015 22:14
Last Written: 11/08/2015 01:22
Last Read: 09/26/2016 13:04
Robot Type: TLD
Robot Control Host: nbu-s1
Robot Number: 0
Slot: 10
Side/Face: -
Cleanings Remaining: -
Number of Mounts: 12
Maximum Mounts Allowed: 0
Media Status: FULL
Kilobytes: 3321985660
Images: 35
Valid Images: 2
Retention Period: 3
Number of Restores: 0
Optical Header Size Bytes: 1024
Optical Sector Size Bytes: 0
Optical Partition Size Bytes: 0
Last Header Offset: 6333562
Adamm Guid: 00000000-0000-0000-0000-000000000000
Rsm Guid: 00000000-0000-0000-0000-000000000000
Origin Host: NONE
Master Host: nbu-s1
Server Group: NO_SHARING_GROUP
Upgrade Conflicts Flag:
Pool Number: 5
Volume Pool: 1month
Previous Pool Name: Scratch
Vault Flags: -
Vault Container: -
Vault Name: -
Vault Slot: -
Session ID: -
Date Vaulted: -
Return Date: -
Media on Hold: 0
====================================================================
Command completed successfully.

I see that this tape has 2 valid images, but in GUI I see that all images on this tape are expired.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

List the image id's with Images on Tape report (or use 'bpimmedia -mediaid <media-id> -U' ).

When you have the image-id's, list the details with:

bpimagelist -backupid <image-id> -L

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Okay - forget about those commands.

We see that the last image has already expired on 12/08/2015.

Are there more tapes with this issue?
Are Image Cleanup jobs running regularly?
What happens if you run 
bpexpdate -deassignempty 
or 
bpexpdate -deassignempty -force ? 

We have seen similar posts here over the last couple of months but the users have simply disappeared without giving feedback to suggestions or log requests. For example Martin's suggestion to check verbose bptm log :
https://vox.veritas.com/t5/NetBackup/Media-Expire/m-p/764249#M213655 

 

There are more tapes with this issue.

Image Cleanup job running every 3 hours

nbu-s1:/usr/openv/netbackup/bin/admincmd # ./bpexpdate -deassignempty -m 6741L6
Search for empty media that meet the following criteria:
Media id: 6741L6

Continue? y/n (n)y
No media matching criteria were found to be deassigned.
no entity was found
nbu-s1:/usr/openv/netbackup/bin/admincmd # ./bpexpdate -deassignempty -m 6741L6 -force
No media matching criteria were found to be deassigned.
no entity was found

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Please run bpexpdate -deassignempty without -m option.

Please have a look at the other post where Martin explains what to look for in bptm log. 
Ensure the folder exists on media servers and increase logging level to 5 for an hour or so.
Not need to stop/start anything to change logging level for bptm.

Possibly a good idea to log a Support call as there are no known issues with NBU 7.7 and media expiration.

 

I am thinking...

since the bpexpdate -deassign... command does not work, this probably won't work as well but can you try?

vmquery -m 6741L6

If it gives you same error about media not found, that means media is not in catalog anymore, but still in the NBU database. If you confirm you no longer want this media, you can try to delete it by:

nbemmcmd -deletemedia -mediaid 6741L6

(note it will remove the tape from your media list, to get it back to scratch just do another inventory)

See if that helps.. 

nbu-s1:/usr/openv/netbackup/logs/bpdbm # /usr/openv/volmgr/bin/vmquery -m 6741L6
================================================================================
media ID:              6741L6
media type:            1/2" cartridge tape 3 (24)
barcode:               6741L6
media description:     Added by Media Manager
volume pool:           1month (5)
robot type:            TLD - Tape Library DLT (8)
robot number:          0
robot slot:            10
robot control host:    nbu-s1.irro.ru
volume group:          000_00000_TLD
vault name:            ---
vault sent date:       ---
vault return date:     ---
vault slot:            ---
vault session id:      ---
vault container id:    -
created:               Mon Feb 17 14:25:23 2014
assigned:              Sat Nov  7 09:08:06 2015
last mounted:          Mon Sep 26 13:04:51 2016
first mount:           Sat Aug  9 00:08:11 2014
expiration date:       ---
number of mounts:      12
max mounts allowed:    ---
status:                0x0
================================================================================

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Please check if there is a NoExpire file in /usr/openv/netbackup/bin.

I see you have been looking at bpdbm logs.
Can you see image expiration happening?

Have you checked bptm log yet? 

If there is not a NoExpire touchfile, probably time to log a Support call.
Maybe something in SLP is still holding on to the 2 images...
Please be prepared to upload lots of high level logs and possibly an export of EMM database as well. 

There is not NoExpire file in /usr/openv/netbackup/bin.

I have found in bpdbm log few lines like this:

00:40:16.294 [40720] <16> delete_copy: Image not eligible to expire because not all the dependents copies are expired.ImageKey = ( 251141 ), expiration count = (2)

I am going to look at bptm log today later.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Seems this has something to do with SLPs that have gone wrong...

I found this in NetBackup Status Codes Reference Guide  :

NetBackup status code: 1585
Message: Backup image cannot be expired because not all dependent copies are expired
Explanation: Other images in the NetBackup catalog are dependent upon the
image that is currently being requested for expiration. The selected image cannot
be expired at this time. Regular catalog cleanup and expiration operations handle
this properly. The dependent images are expired first. But if they are still in SLP
processing, they cannot be expired, and therefore the selected image cannot be expired.
Recommended Action: Wait for the dependent images to be eligible for expiration
when their SLP state transitions into IMAGE_COMPLETE state. Also, you can
cancel the SLP operations on the dependent images.

Solution is:

1. Find out all expired tapes not in the scratch pool. (report Tape Summary in GUI)

2. Find out backup id of images giving the problem (nbstlutil list -mediaid <media-id>).

3. Remove images from SLP (bpexpdate -backupid <backup-id> -d 0 -force_not_complete).

Thank Veritas Support for this solution.

Thank Marianne and other peoples for help.

Sorry for my English.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Thanks for the feedback! 
I had a suspicion that it was related to SLPs...

If this happens on a regular basis, you need find what is wrong with SLPs.

Thx for the update, you helped me :)