cancel
Showing results for 
Search instead for 
Did you mean: 

How to unassign media with NBU6.0MP5?

Michel_Steiner
Level 4
Hello. I have some medias which should be back to the scratch pool because backups on them are expired, but for some unknown reasons they stay assign to te last pool they used. With NBU 5.1, such cases could be resolved with commands like "vmchange" or "vmquery -deassignbyid", but apparently this does not work anymore with NBU6.0.
 
Any idea how to force a move move back of these tapes to the scratch pool?
 
Thanks, Michel

 
 
d:\Veritas\NetBackup\bin\admincmd>nbemmcmd -listmedia -mediaid NG0282
NBEMMCMD, Version:6.0MP5(20070704)
====================================================================
Media GUID:                     0b07f109-bf68-41ba-aa99-965fd6185c5c
Media ID:                       NG0282
Partner:                        -
Media Type:                     DLT3
Volume Group:                   00_006_TLD
Application:                    Netbackup
Media Flags:                    1
Description:                    Added by Media Manager
Barcode:                        NG02822
Partner Barcode:                --------
Media Server:                   NONE
Created:                        08/03/2005 22:31
Time Assigned:                  11/18/2005 19:36
First Mount:                    08/09/2005 09:27
Last Mount:                     11/18/2005 21:03
Volume Expiration:              -
Data Expiration:                -
Last Written:                   -
Last Read:                      -
Robot Type:                     TLD
Robot Control Host:             swigva01-bck-01
Robot Number:                   6
Slot:                           340
Side/Face:                      -
Cleanings Remaining:            -
Number of Mounts:               7
Maximum Mounts Allowed:         0
Media Status:                   ACTIVE
Kilobytes:                      0
Images:                         0
Valid Images:                   0
Retention Period:               -
Number of Restores:             0
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:                    swigva01-bck-01
Upgrade Conflicts Flag:
Pool Number:                    16
Volume Pool:                    VP-Weekly-M
Previous Pool Name:             VP-Scratch
Vault Flags:                    -
Vault Container:                -
Vault Name:                     -
Vault Slot:                     -
Session ID:                     -
Date Vaulted:                   -
Return Date:                    -
====================================================================
Command completed successfully.
 
 
D:\VERITAS\Volmgr\bin>vmchange -p 7 -m NG0282
Could not change media ID NG0282: cannot change volume pool for assigned volume
(91)
 
D:\VERITAS\Volmgr\bin>vmquery -m NG0282
================================================================================
 
media ID:              NG0282
media type:            DLT cartridge tape 3 (26)
barcode:               NG02822
media description:     Added by Media Manager
volume pool:           VP-Weekly-M (16)
robot type:            TLD - Tape Library DLT (8)
robot number:          6
robot slot:            340
robot control host:    swigva01-bck-01
volume group:          00_006_TLD
vault name:            ---
vault sent date:       ---
vault return date:     ---
vault slot:            ---
vault session id:      ---
vault container id:    -
created:               03.08.2005 22:31:36
assigned:              18.11.2005 19:36:21
last mounted:          18.11.2005 21:03:37
first mount:           09.08.2005 09:27:57
expiration date:       ---
number of mounts:      7
max mounts allowed:    ---
status:                0x0
================================================================================
 

D:\VERITAS\Volmgr\bin>vmquery -deassignbyid NG0282 7 0
De-assign media by ID is not allowed for NetBackup media.
invalid media ID (8)
4 REPLIES 4

seemayur
Level 3
you could run bpexpdate command to expire the tape, thus automatically unassign it.
 
bpexpdate -d 0 -m <media id> [-h <media server>]
 
 

Stumpr2
Level 6
DOCUMENTATION: The vmquery command will no longer deassign Veritas NetBackup (tm) media in version 6.0.
 
Exact Error Message
requested media id was not found in the EMM database

Details:
Manual:
VERITAS NetBackup (tm) 6.0 Media Manager System Administrator's Guide for UNIX
VERITAS NetBackup (tm) 6.0 Media Manager System Administrator's Guide for Windows

Page:  N/A

Modification Type: supplement

Modification:
In Veritas NetBackup (tm) 5.x and earlier, the vmquery -deassignbyid command was used to deassign volumes.  NetBackup 6.0 does not allow this.  Instead of deassigning media directly, use the bpexpdate command instead.  This will expire and deassign the media so that it can be overwritten by new backups.

bpexpdate
UNIX: /usr/openv/netbackup/bin/

Windows: <Install_dir>\NetBackup\bin

Command syntax example and output:
bpexpdate -m A00001 -d 0  

Are you SURE you want to delete A00001 y/n (n)? y

If bpexpdate produces an error and can not deassign the media, there may be database inconsistencies that prevent the media from expiring.  A procedure may be followed to ensure that the media is no longer assigned.  Please refer to the Related Documents section, below, for further information on the  bpexpdate command.
Note: Do not use the vmquery -deassignbyid command in earlier versions of NetBackup, unless directed by Symantec Enterprise Technical Support.

Michel_Steiner
Level 4
Thanks to both of you.
 
When I tried the bpexpdate, I got the error "Requested media id was not found in the EMM database", but solution to this problem is explained there http://seer.entsupport.symantec.com/docs/280202.htm
Once the entry for the media is corrected in the EMM DB, it can be deassigned without issue.
 
D:\VERITAS\NetBackup\bin>bptm -makedbentry -m NG0282 -poolnum 16 -den DLT3
D:\VERITAS\NetBackup\bin\admincmd>bpexpdate -force -d 0 -m NG0282
 
Thanks again,
Michel

Stumpr2
Level 6
your welcome Smiley Happy