Video Screencast Help
Symantec Appoints Michael A. Brown CEO. Learn more.

bplabel command failing with VTL

Created: 01 Oct 2013 • Updated: 02 Oct 2013 | 11 comments
pmj's picture
This issue has been solved. See solution.

Hi,

I've have read numerous articles here on the bplabel command and from DD support and keep running into errors. Here's the situation. We have Netbackup 7.0.1 backing up a SAN via NDMP to a VTL to a DataDomain 890. For whatever reason, the VTL does not move tapes to the scratch pool. All the tapes, regardless of time assigned, last mount, etc are all in the active pool. DD support says we need to run the bplabel command to reclaim the space.

Using the DD command to view the tapes on the DD system, I see a ton of tapes beyond our retention period which would free up a lot of space. So here's what I've done so far.

I've expired a couple of tapes,,as a test, and left them in the active pool. I attempt to run the label command from the gui. I receive the following error:

Oct 1, 2013 4:30:24 PM - begin Label
Oct 1, 2013 4:30:24 PM - started process bplabel (pid=3738)
Oct 1, 2013 4:30:24 PM - end Label; elapsed time 0:00:00
Oct 1, 2013 4:30:24 PM - requesting resource EOC_DD:A10012
Oct 1, 2013 4:30:24 PM - Error nbjm (pid=2666) NBU status: 830, EMM status: No drives are available
error requesting media (tpreq)  (98)

So I moved a tape to the scratch pool, thinking that'd help. When I attempt to run the bplabel command from their, I receive the following message:

Oct 1, 2013 4:40:17 PM - begin Label
Oct 1, 2013 4:40:17 PM - started process bplabel (pid=4229)
Oct 1, 2013 4:40:17 PM - end Label; elapsed time 0:00:00
Oct 1, 2013 4:40:17 PM - requesting resource Scratch:A13188
Oct 1, 2013 4:40:17 PM - Error nbjm (pid=2666) NBU status: 2015, EMM status: Media is expired
error requesting media (tpreq)  (98)

I'm sure I'm missing a simple point in this whole process, so some direction would be a big help. The main objective here is to reclaim space that is beyond our retention time period. I did check the master servers properties and the retention period is correct in NB.

Thanks!!!

Phil

 

Operating Systems:

Comments 11 CommentsJump to latest comment

Will Restore's picture

http://www.symantec.com/business/support/index?pag...

The recommended NetBackup hook is the ‘media_deassign_notify’ script, which must be promoted from the “goodies” directory (i.e. copy from netbackup/bin/goodies to netbackup/bin).

 

 

Will Restore -- where there is a Will there is a way

Yasuhisa Ishikawa's picture

please tell us what you exactly fired in command line, and post output of "vmquery -m media_id".

Authorized Symantec Consultant(ASC) Data Protection in Tokyo, Japan

Yasuhisa Ishikawa's picture

Adding to above, post "nbemmcmd -listmedia -mediaid media_id" and "tpconfig -d".

Authorized Symantec Consultant(ASC) Data Protection in Tokyo, Japan

Jim-90's picture

I do this all the time on VTLs (not DD VTL).  The scripted method I use is

If in SCRATCH then relabel in the background but sleep 2 secs between each relabel

bplabel -m $media_ID -host $med_server -d hcart -pool $media_pool  -o -erase &

sleep prevents swap being used up (see Linux : swappiness), in the background means it will use all the available tape drives.  

If not in SCRATCH create a list carts that that have a last written date-time after what you want to erase.   All the carts in that list are then expired.  The virtual carts are actually small  (50 & 100GB)  

bpexpdate -m $media_ID  -d 0 -host $med_server -force        then

the script has a kip for about 5 mins allow the database to do some catchup.  At this point the carts should be in SCRATCH.  After having its 5 min rest the script then relabels the same carts with

bplabel -m $media_ID -host $med_server -d hcart -pool $media_pool  -o -erase &

with 2 secs between each relabel (as described before). 

The only time I encountered problems were when the VTL becomes full and it has automatically flipped into readonly mode.  This downs the tape drives but the tape drives remain active to relabel the carts.  Does the DDR 890 VTL do this?   The otehr problem was swappiness and swap - that's another story.

 

 

 

 

 

 

 

 

 

Marianne's picture

NBU status: 830, EMM status: No drives are available

This means that all VTL drives are in use or there is no drive configured with matching density.

 NBU status: 2015, EMM status: Media is expired

This means that someone has added hardware expiration on the media. This is different from image expiration. Righ-click, change this media id and remove the expiration date (never).

One more thing:

For media to return to Scratch, it must have come from the Scratch pool originally. If not, you will have to move them manually to the Scratch pool as soon as images have expired (Assign Time is blank). You will have to do this once for each of the VTL tapes. From there on it will automatically return to Scratch when images have expired.

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

pmj's picture

Thank you for all the replies, that helps!! I'll go through them and then I'll report back.

 

pmj's picture

Here's the output from the nbemmcmd -listmedia -mediaid media_id command.

This tape is one designated by DD as having data that should be expired:

NBEMMCMD, Version:7.0.1
====================================================================
Media GUID:                     f8926336-29ae-11e3-8000-f1d8ddae3aa9
Media ID:                       A13066
Partner:                        -
Media Type:                     HCART3
Volume Group:                   000_00001_TLD
Application:                    Netbackup
Media Flags:                    1
Description:                    Added by Media Manager
Barcode:                        A13066
Partner Barcode:                --------
Last Write Host:                NONE
Created:                        09/30/2013 12:53
Time Assigned:                  -
First Mount:                    -
Last Mount:                     -
Volume Expiration:              -
Data Expiration:                -
Last Written:                   -
Last Read:                      -
Robot Type:                     TLD
Robot Control Host:             XXXXXXXXXX
Robot Number:                   1
Slot:                           932
Side/Face:                      -
Cleanings Remaining:            -
Number of Mounts:               0
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:                    NONE
Master Host:
Server Group:
Upgrade Conflicts Flag:
Pool Number:                    1
Volume Pool:                    NetBackup
Previous Pool Name:             -
Vault Flags:                    -
Vault Container:                -
Vault Name:                     -
Vault Slot:                     -
Session ID:                     -
Date Vaulted:                   -
Return Date:                    -

Rsm Guid:                       00000000-0000-0000-0000-000000000000
Origin Host:                    NONE
Master Host:                    eocnetbkup2
Server Group:
Upgrade Conflicts Flag:
Pool Number:                    26
Volume Pool:                    EOC_DD
Previous Pool Name:             -
Vault Flags:                    -
Vault Container:                -
Vault Name:                     -
Vault Slot:                     -
Session ID:                     -
Date Vaulted:                   -
Return Date:                    -

 

 

pmj's picture

I use this command frequently as well: bpexpdate -deassignempty.  I thought this would release the tapes into the scratch pool. Based on the above post, I'll need to manually move them there to start that cycle.

 

 

 

 

pmj's picture

Here's my latest output running the bplabel script against a tape in the scratch pool. I'm not sure why it's failing.

 

XXXXXXX:/> vmquery -m a13188
================================================================================
media ID:              A13188
media type:            1/2" cartridge tape 3 (24)
barcode:               A13188
media description:     Added by Media Manager
volume pool:           Scratch (4)
robot type:            TLD - Tape Library DLT (8)
robot number:          1
robot slot:            1028
robot control host:    XXXXXXX
volume group:          000_00001_TLD
vault name:            ---
vault sent date:       ---
vault return date:     ---
vault slot:            ---
vault session id:      ---
vault container id:    -
created:               Wed Apr 25 09:58:57 2012
assigned:              ---
last mounted:          Sat Feb 02 09:45:53 2013
first mount:           Sat Feb 02 09:45:53 2013
expiration date:       Fri Sep 27 13:18:28 2013
number of mounts:      1
max mounts allowed:    ---
================================================================================
XXXXXXXX:/> bplabel -m A13188 -d hcart3 scratch -o -erase
Error reported by media operation: resource request failed
 

Andy Welburn's picture

XXXXXXXX:/> bplabel -m A13188 -d hcart3 scratch -o -erase
Error reported by media operation: resource request failed
 

Try:

XXXXXXXX:/> bplabel -m A13188 -d hcart3 -p Scratch -o -erase

 

pmj's picture

I contacted support whom ran most of the commands shared here. He got it to work via the GUI by selecting tapes that had no time assigned, right clicking, selecting label. He had the same error here as I did...

What made it work, was selecting the mediaserver that hosts the VTL instead of the master server. Once we made that change during the prompts, the bplabel ran fine.

Thank you for all the replies, I appreciate it and learned quite a bit.

 

 

SOLUTION