Here what Veritas support sent me.
1. Do not run vmquery -deassignbyid!
- This just removes the pointer in the voldb saying it is assigned. It
does not clear up the media or image databases. When you do this the
media will be frozen the next time it gets selected for a backup and
will continue to do so until the other database entries are cleared.
2. Do run bpexpdate -m <media id> -d 0
- This will probably error out on you saying that the selected media
id
was not found in the mm or volume database. In that case use the
undocumented switches for clearing it out of one database and not the
other. For instance bpexpdate -m <media id> -justimage -d 0 and
bpexpdate -m <media id> -justmedia -d 0. One of those will work. Then
the tape will become deassigned by itself.
3. You will need to clean up the databases of the media you deassigned
earlier by unfreezing the tapes on the media server that froze them by
running bpmedia -unfreeze against them and then using bpexpdate to
clear
the databases.
Symptom:
How to make an assigned tape available for re-use by VERITAS NetBackup
Solution:
Caution! Before performing any operations on a tape which has been used for regular client backups, verify if there are any active/valid images on the tape in question by using the following command:
<install_path>\NetBackup\bin\admincmd\bpimmedia -L -mediaid <media_id> (Windows)
/usr/openv/netbackup/bin/admincmd/bpimmedia -L -mediaid <media_id> (UNIX)
If there are no images listed, then the tape is already available and nothing further needs to be done. However, if valid images exist, a decision must be made on whether or not these images may be expired so that the tape can be re-used.
To make the media available for re-use, it is necessary to expire the images on the tape as follows (using media id TSN001 as an example):
<install_path>\NetBackup\bin\admincmd\bpexpdate -ev TSN001 -d 0 (Windows)
/usr/openv/netbackup/bin/admincmd/bpexpdate -ev TSN001 -d 0 (UNIX)
The execution of the bpexpdate command should remove any entries associated with TSN001 from the NetBackup Catalog (databases) - successfully if the databases are in sync as they should be. Errors may occur if there are inconsistencies with the NetBackup databases and Technical Services should be contacted for further investigation, as this is beyond the scope of this TechNote.
To verify that this tape is now released from the NetBackup databases and available for re-use, perform the following steps:
1. <install_path>\NetBackup\bin\admincmd\bpimmedia -L -mediaid TSN001 (Windows)
/usr/openv/netbackup/bin/admincmd/bpimmedia -L -mediaid TSN001 (UNIX)
The result should show no images associated with TSN001.
2. <install_path>\NetBackup\bin\admincmd\bpmedialist -U (Windows)
/usr/openv/netbackup/bin/admincmd/bpmedialist -U (UNIX)
The result should show that TSN001 is not in the list.
3. <install_path>\volmgr\bin\vmquery -m TSN001 (Windows)
/usr/openv/volmgr/bin/vmquery -m TSN001 (UNIX)
The result should show that TSN001 is no longer assigned, verified by the 'assigned' field having no time stamp (see below for output of TSN001 from a NetBackup 4.5 system. A 3.4 system would show similar outputs, but without the vault related fields ):
media ID: TSN001
media type: DLT cartridge tape 2 (16)
barcode: TSN001
media description: Added by Media Manager
volume pool: Client_Backups (2)
robot type: TLD - Tape Library DLT (8)
volume group: 00_000_TLD
vault name: ---
vault sent date: ---
vault return date: ---
vault slot: ---
vault session id: ---
created: Mon Nov 18 14:35:41 2002
assigned: --
last mounted: Wed Nov 20 11:44:47 2002
first mount: Mon Nov 18 14:58:33 2002
expiration date: ---
number of mounts: 2
max mounts allowed: ---
If all three steps above are verified true for the tape on which the bpexpdate command was executed, the tape should now be available for re-use. The available_media report should also show that this is the case. This report can be generated by the command:
<install_path>\NetBackup\bin\goodies\available_media (Windows)
/usr/openv/netbackup/bin/goodies/available_media (UNIX)