cancel
Showing results for 
Search instead for 
Did you mean: 

Re Using Tapes

LeeClayton
Level 5
I've read all the posts but still not resolved my problem, I've got two tapes (not catalog), that have a blank expiration date which i want to re-use but although their expiration date has passed they still show in a working volume pool instead of moving to the SCRATCH pool, I've even changed the expiration date to a few days ago hoping when it passed it will move to SCRATCH but no luck, I've tried deleting from the pool but i just get an error about no server. Is there any heavy method to get the tape to SCRATCH so I can re-use it?
28 REPLIES 28

Deepak_W
Level 6
Partner Accredited
if there are no images on the media try running the bpexpdate command

you can run this command from install_path\NetBackup\bin\admincmd\ 

this will expire the media manually...

after that run the available_media script to confirm whether media is marked as availble...

hope this resolves your problem... 

Andy_Welburn
Level 6
Lee, what do you mean by this statement?

I have a feeling you are referring to the physical expiration date of the media e.g the expiration date when you run vmquery -m <media_id>. This is effectively it's sell-by date i.e. a date set manually when you no longer wish to use the tapes for backups as you no longer trust their quality. Once this date has passed NetBackup will no longer write to them, altho' they can still be read if they have valid images.

If what I believe is correct, then, in the GUI, right-click on the media in question & select change. Click on the "Never" radio button under Expiration & then OK. This should remove any physical expiration you have set on the media.

Anonymous
Not applicable
Thats a good and easy point to miss from Andy, while on top of that you could have a maximum number of mounts allowed for the piece of media.
You can get a lot of info about tapes from the vmquery command or the one shown below....

You can query the EMM server database about volume pools media and their attributes. You might find something in there which might lead you to your problem/solution.

Here's some example commands:

nbemmcmd -listmedia -poolname <vol_poolname_string>
nbemmcmd -listmedia -mediaid <mediaID>

nbemmcmd -listmedia -conflicts


Also maybe try forcing the deassignment.
bpexpdate -deassignempty
Searches the catalog for the removable media that no longer contain valid backups. It removes the media from the media catalog and removes the media IDs in the Media Manager catalog. The media is then available to use again. You can use the NetBackup Images on Media report to determine if the assigned media no longer contains valid backups.

Example

The following command checks for all media in the host cat's media catalog that are still assigned, but which 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


Andy_Welburn
Level 6
.... are these the same two tapes that you were having issues with last week?

Netbackup will not use 2 of my SCRATCH Tapes - why?


which I thought we'd got to the bottom of with the vmchange command (i.e. physical expiry of tapes) ??

LeeClayton
Level 5
seems a conincident but no, these are two different tapes.

Andy_Welburn
Level 6
as Stuart recommends, as it gives the same if not more info than the vmquery -m and bpmedialist -m commands combined.

Andy_Welburn
Level 6
nbemmcmd -listmedia -mediaid media_id ?

***Edit***
& possibly post this "no server" error message?

LeeClayton
Level 5

Media GUID: 29c8225f-c72b-4493-aeae-686de08b7b26
Media ID: NH1007
Partner: -
Media Type: HCART3
Volume Group: 000_00001_TLD
Application: Netbackup
Media Flags: 1
Description: LTO3
Barcode: NH1007L3
Partner Barcode: --------
Last Write Host: NONE
Created: 07/18/2007 16:57
Time Assigned: 07/18/2007 17:04
First Mount: 07/18/2007 17:05
Last Mount: 07/19/2007 11:44
Volume Expiration: -
Data Expiration: -
Last Written: -
Last Read: 07/19/2007 11:44
Robot Type: TLD
Robot Control Host: nh-backup.pinnacle.co.uk
Robot Number: 1
Slot: 17
Side/Face: -
Cleanings Remaining: -
Number of Mounts: 4
Maximum Mounts Allowed: 0
Media Status: ACTIVE
Kilobytes: 0
Images: 0
Valid Images: 0
Retention Period: -
Number of Restores: 1
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: NONE
Master Host:
Server Group:
Upgrade Conflicts Flag:
Pool Number: 2
Volume Pool: DataStore
Previous Pool Name: SCRATCH
Vault Flags: -
Vault Container: -
Vault Name: -
Vault Slot: -
Session ID: -
Date Vaulted: -
Return Date:

rj_nbu
Level 6
Employee Accredited Certified
The media has a time assigned value thus you cannot move the media to another volume pool

run bpexpdate -deassignempty -m <mediaid>

After this , the media should go in the scratch pool



Andy_Welburn
Level 6
it's assigned (which would intimate valid images) but there is no data expiration (which intimates no images :-s )so presumably bpexpdate wouldn't work?

Also, in the DataStore Volume Pool? Not even sure what that default pool is used for! :o

Have you tried the the deassignempty as Stuart suggested (***Edit*** and Rajeev!!)?

LeeClayton
Level 5
Whe I run bpexpdate -deassignempty -m nh1007 on my master server I get the error below

No media matching criteria were found to be deassigned.
no entity was found

Andy_Welburn
Level 6
bpexpdate -d 0 -m nh1007 ?

Anonymous
Not applicable
From the output 2 things are strange:

1. No valid images on media, but still a value for Time Assigned
2. But equally the main one is no value against Master Host

This must be where your 'no server' message is reporting back on.

Assume your master server is the same as the robot control host.

This is strange.

Try Re-labelling the tape.. from the console and see what happens if these fields are affected.

Or use the command line bplabel with the -o option

Anonymous
Not applicable
vmquery -deassignbyid media_id pool_number stat

Unassigns the volume by media ID, pool, and status. This option can only deassign non-NetBackup media. Non-NetBackup media includes the
media that the following use: Veritas Storage Migrator, Veritas Data Lifecycle Manager, or by users that work outside of the NetBackup
policy framework (for example, those using tpreq directly). To deassign NetBackup tapes, use the bpexpdate command.

-deassignbyid is documented not to be used since NB 6.0, only bpexpdate to be used.

bpdbm -consistency [ 0 | 1 | 2 ]

Runs the consistency checks on the catalog. The following are the three consistency levels:

0 - A quick check of the NetBackup image database (the default).

1 - Performs more checks than the default check.

2 - The most in-depth consistency check. In addition to the checks of levels 0 and 1, this level also checks that the media that is menâ
tioned in the image exists. (In other words, it also cross references the media servers databases.) On a large NetBackup installation,
the process takes much longer to complete than the other checks.

Also check this technote that has undocumented bptm command to make entries in databases:
http://seer.entsupport.symantec.com/docs/280181.htm

LeeClayton
Level 5
yes, exactly the same error

LeeClayton
Level 5
tried a relabel and erase and fails

rj_nbu
Level 6
Employee Accredited Certified
 bptm -makedbentry -m <media id> -den hcart3 -poolnum 2

then try the deassignempty command I gave earlier


Andy_Welburn
Level 6
& have looked all over. Sure I've seen it in some post somewhere, but...

Keep thinking along the lines of vmquery/vmchange with an assign/deassignbyid option, but I think that'll only work pre-6?

Can't remember, Lee, what version of NB are you running?

***Edit**
Just seen Rajeev's post & that rings a bell. It's also in the TN that Stuart quoted...

LeeClayton
Level 5
tried your idea and re-ran the deassign command but still fails, think I might just send the tape off-site and forget about it :(