Veritas-bu

[Veritas-bu] Bpexpdate -deassignempty problem

2007-02-23 18:18:10
Subject: [Veritas-bu] Bpexpdate -deassignempty problem
From: dpreston at LANDAM.com (Preston, Douglas L)
Date: Fri, 23 Feb 2007 18:18:10 -0500
Well I am down to 75 tapes now.  And this is what seems to be the
problem.  They show active  even though they are not in the emm
database.  I have shut down services, rebooted all servers, and this is
the last thing I see as an issue for these 75 tapes.  The following two
command outputs are for one of the tapes as an example.

Does anyone know how to change the status of a tape from active to not
active?

Nbrbutil doesn't show anything that will help.

G:\Program Files\VERITAS\NetBackup\bin\Admincmd>nbemmcmd -listmedia
-mediaid 000008
NBEMMCMD, Version:6.0MP4(20061102)
====================================================================
Media GUID:                     0f58e85d-a882-43c2-9a53-4f9f9eb00931
Media ID:                       000008                              
Partner:                        -                                   
Media Type:                     HCART2                              
Volume Group:                   expire                              
Application:                    Netbackup                           
Media Flags:                    1                                   
Description:                    Problem_Deassigning_Media           
Barcode:                        000008                              
Partner Barcode:                --------                            
Media Server:                   NONE                                
Created:                        03/16/2004 07:23                    
Time Assigned:                  02/16/2006 00:08                    
First Mount:                    03/17/2004 08:41                    
Last Mount:                     01/27/2006 07:46                    
Volume Expiration:              02/23/2007 08:08                    
Data Expiration:                -                                   
Last Written:                   -                                   
Last Read:                      -                                   
Robot Type:                     NONE                                
Robot Control Host:             -                                   
Robot Number:                   -                                   
Slot:                           -                                   
Side/Face:                      -                                   
Cleanings Remaining:            -                                   
Mounts:                         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:                    svcacibu1                           
Upgrade Conflicts Flag:                                             
Pool Number:                    1                                   
Volume Pool:                    NetBackup                           
Previous Pool Name:             scratch                             
Vault Flags:                    -                                   
Vault Container:                -                                   
Vault Name:                     -                                   
Vault Slot:                     -                                   
Session ID:                     -                                   
Date Vaulted:                   -                                   
Return Date:                    -                                   
====================================================================
Command completed successfully.


G:\Program Files\VERITAS\Volmgr\bin>vmquery -m 000008
===================================================

media ID:              000008
media type:            1/2" cartridge tape 2 (14)
barcode:               000008
media description:     Problem_Deassigning_Media
volume pool:           NetBackup (1)
robot type:            NONE - Not Robotic (0)
volume group:          expire
vault name:            ---
vault sent date:       ---
vault return date:     ---
vault slot:            ---
vault session id:      ---
vault container id:    -
created:               3/16/2004 7:23:31 AM
assigned:              2/16/2006 12:08:40 AM
last mounted:          1/27/2006 7:46:46 AM
first mount:           3/17/2004 8:41:39 AM
expiration date:       2/23/2007 8:08:08 AM
number of mounts:      103
max mounts allowed:    ---
status:                0x0
===================================================


Doug Preston
Systems Engineer
Land America Tax and Flood Services
Phone 626-339-5221 Ext 104
Email  dlpreston at landam.com


------------------------------------------------------------------------
------------
NOTICE: This electronic mail transmission may constitute a communication
that is legally privileged. It is not intended for transmission to, or
receipt by, any unauthorized persons. If you have received this
electronic mail transmission in error, please delete it from your system
without copying it, and notify the sender by reply e-mail, so that our
address record can be corrected.
------------------------------------------------------------------------
------------


-----Original Message-----
From: Bob Stump [mailto:StumpB at michigan.gov] 
Sent: Thursday, February 22, 2007 7:25 AM
To: Preston, Douglas L; veritas-bu at mailman.eng.auburn.edu
Subject: Re: [Veritas-bu] Bpexpdate -deassignempty problem

How to manually remove a tape completely from NetBackup/Media Manager.
http://support.veritas.com/docs/208420
 
Details:
First, if there are images on the tape, they need to be expired.  This
can be done by: 
     bpexpdate -ev <mediaid> -d 0

This will not completely free up the tape if the tape is frozen or
suspended, so the command(s):
    bpmedia -unfreeze -ev <mediaid>
or
    bpmedia -unsuspend -ev <mediaid>
may be needed.

At this point there will be no image database entries for that tape and
the media database should show the tape as not assigned therefore
allowing the tape to be reused. However sometimes the image database and
the media manager database can be out of sync, and the tape may show as
still assigned, or if the tape has a NetBackup database backup on it,
there would be no image entry to begin with.  When a tape shows an
assigned date, but no images are related to that tape, it will show up
in the available_media report as dbbackup.  To tell if a tape actually
has a dbbackup on it, the command:
     vmquery -m mediaid
will show a status, where 0x0 means normal backups, 0x1 means NetBackup
database backup and 0x2 means Storage Migrator.
If it is 0x1, be certain this is not a database backup which will ever
be needed.
If it is 0x2, it is in use by Storage Migrator and understanding of the
use of the tape by Storage Migrator (not covered here) is required.

To free up the tape, when it has an assigned date but no images in the
database, the command:
    vmquery -deassignbyid <mediaid> <poolnumber> <status> must be run,
but the status will be displayed as 0x0, 0x1 or 0x2 and needs to be just
0, 1 or 2 in the vmquery -deassignbyid.

At this point the tape is available to be used for backups.

If the tape was bad or destroyed and that is why it is being removed,
the command:
    vmdelete -m <mediaid>
will remove the last remnants of information about it from media
manager.

There are other options which may be specified for the above commands.
Some are to specify server names, volume database host names, etc.  If
the NetBackup/Media Manager setup is complex, those options may be
needed.  The full paths to the commands mentioned are:

/usr/openv/netbackup/bin/admincmd/bpexpdate
/usr/openv/netbackup/bin/admincmd/bpmedia
/usr/openv/netbackup/bin/goodies/available_media
/usr/openv/volmgr/bin/vmquery
usr/openv/volmgr/bin/vmdelete
All but available_media have man pages.




>>> "Preston, Douglas L" <dpreston at landam.com> 2/22/2007 10:10 AM >>>


When running bpexpdate -deassignempty I get the following error message.
Does anyone have a possible fix for this error?  I have over 300 tapes
that have 0 valid images that were assigned between 2005 and 2006 that I
would like to get put back in my scratch pool.


G:\Program Files\VERITAS\NetBackup\bin\Admincmd>bpexpdate -deassignempty
-force -m svcacibu1 Could not build host list: client hostname could not
be found client hostname could not be found


Doug Preston
Systems Engineer
Land America Tax and Flood Services
Phone 626-339-5221 Ext 104
Email  dlpreston at landam.com


------------------------------------------------------------------------
------------
NOTICE: This electronic mail transmission may constitute a communication
that is legally privileged. It is not intended for transmission to, or
receipt by, any unauthorized persons. If you have received this
electronic mail transmission in error, please delete it from your system
without copying it, and notify the sender by reply e-mail, so that our
address record can be corrected.
------------------------------------------------------------------------
------------

_______________________________________________
Veritas-bu maillist  -  Veritas-bu at mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu



<Prev in Thread] Current Thread [Next in Thread>