在NBU中无法自动expire的tape

前几天在NBU里发现有一些tape,上面的数据已经过期(last written为空),但是time assigned没有clear,所以这些tape都还停留在原先的volume pool中,不能被循环使用。

后来发现这是由于这些tape之前被一个media server写过的,后来master server upgrade, 那些media servers就不用了。所以问题应该是在这些tape的某些在master server上的信息丢掉了,所以无法自动deassign

在Veritas support的帮助下,最终解决了这个问题。

[@more@]

以tape 000087为例,先看我所有失败的尝试:

vmdelete:

root@sdbsbak3 # vmdelete -m 000087

cannot delete assigned volume (92)


bpexpdate:

root@sdbsbak3 # bpexpdate -m 000087 -d 0

Media 000087 is due to expire at 01/01/1970 08:00:00

Are you sure that the data on this media is not critical to

your business, and you are sure you want to delete 000087 y/n (n)? y

server name not found in the NetBackup configuration


尝试指定host(之前的media server),结果报同样的错:

root@sdbsbak3 # bpexpdate -m 000087 -d 0 -host ddm1prd1

Media 000087 is due to expire at 01/01/1970 08:00:00

Are you sure that the data on this media is not critical to

your business, and you are sure you want to delete 000087 y/n (n)? y

server name not found in the NetBackup configuration


继续尝试bpexpdate -deassignempty :

root@sdbsbak3 # bpexpdate -deassignempty -m 000087

Search for empty media that meet the following criteria:

Media id: 000087

Continue? y/n (n)y

No media matching criteria were found to be deassigned.

no entity was found


给Veritas开了个case, support engineer建议尝试command “vmquery -deassignbyid”,结果还是不行:

root@sdbsbak3 # vmquery -m 000087

===============================================================================

media ID: 000087

media type: 1/2" cartridge tape (6)

barcode: 000087

media description: For 2006 200 LTO2 tapes

volume pool: ddms (14)

robot type: TLD - Tape Library DLT (8)

robot number: 0

robot slot: 138

robot control host: sdbsbak1

volume group: 00_000_TLD

vault name: ---

vault sent date: ---

vault return date: ---

vault slot: ---

vault session id: ---

vault container id: -

created: Thu Dec 28 13:38:52 2006

assigned: Sat Feb 10 02:15:27 2007

last mounted: Thu Apr 12 04:04:11 2007

first mount: Wed Jan 03 19:02:34 2007

expiration date: ---

number of mounts: 40

max mounts allowed: ---

status: 0x0

===============================================================================

root@sdbsbak3 # vmquery -deassignbyid 000087 14 0x0

De-assign media by ID is not allowed for NetBackup media.

invalid media ID (8)

Note: 14 is volume pool number, 0x0 is tape status.


然后又试了“bpmedia -movedb”来更改NBU catalog,还是不行:

root@sdbsbak3 # bpmedia -movedb -m 000087 -oldserver ddm1prd1 -newserver sdbsbak1

requested media id is not assigned to this host in the EMM database


最后,Veritas support找到了一个类似case的解决方法,最终按照这个文档里的步骤把tape成功deassign了。

文档地址:

http://www.symantec.com/business/support/index?page=content&id=TECH58277&actp=search&viewlocale=en_US&searchid=1300345005825


详细步骤:

1. Use nbemmcmd to list the media server record for the media ID. If the Last Write Host hostname appears as NONE or is blank, yet there is a value for Time Assigned, this indicates an incomplete EMM media record. In the output below, "000087" is assigned, but has no associated media server.

root@sdbsbak3 # nbemmcmd -listmedia -mediaid 000087

NBEMMCMD, Version:6.5.5

====================================================================

Media GUID: 1b90ba30-4f25-11df-8000-fe34639d2772

Media ID: 000087

Partner: -

Media Type: HCART

Volume Group: 00_000_TLD

Application: Netbackup

Media Flags: 1

Description: For 2006 200 LTO2 tapes

Barcode: 000087

Partner Barcode: --------

Last Write Host: NONE

Created: 12/28/2006 13:38

Time Assigned: 02/10/2007 02:15

First Mount: 01/03/2007 19:02

Last Mount: 04/12/2007 04:04

Volume Expiration: -

Data Expiration: -

Last Written: -

Last Read: -

Robot Type: TLD

Robot Control Host: sdbsbak1

Robot Number: 0

Slot: 138

Side/Face: -

Cleanings Remaining: -

Number of Mounts: 40

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: sdbsbak1

Master Host:

Server Group:

Upgrade Conflicts Flag:

Pool Number: 14

Volume Pool: ddms

Previous Pool Name: scratch

Vault Flags: -

Vault Container: -

Vault Name: -

Vault Slot: -

Session ID: -

Date Vaulted: -

Return Date: -

====================================================================

Command completed successfully.


2. Determine if the media ID exists in the merge table. If the media ID appears in this listing, then a different issue exists - do not proceed further. Contact Symantec Technical Services for assistance with getting this media ID out of the merge table. The following example shows no media IDs in the merge table:

root@sdbsbak3 # nbemmcmd -listmedia -mergetable > mergetable.lst

root@sdbsbak3 # grep 000087 mergetable.lst

3. From the same path, type bpimmedia -mediaid to determine if there are any images on this piece of media. If there are no images, then no output will be displayed. If there are images, an IMAGE line and FRAG line will appear for each valid image on the media ID.

root@sdbsbak3 # bpimmedia -mediaid 000087

no entity was found


4. As long as the media ID does not appear in the merge table, the bptm command can be used to build a complete media record for each affected media ID. Then the volume can then be unassigned and expired. This will require the media ID of the affected media, as well as the density and the volume pool number.

root@sdbsbak3 # bptm -makedbentry -m 000087 -den hcart -poolnum 14


5. Once this command completes, rerun the nbemmcmd -listmedia -mediaid 000087 command from step 1. There should now be a valid Last Write Host hostname.

root@sdbsbak3 # nbemmcmd -listmedia -mediaid 000087

NBEMMCMD, Version:6.5.5

====================================================================

Media GUID: 1b90ba30-4f25-11df-8000-fe34639d2772

Media ID: 000087

Partner: -

Media Type: HCART

Volume Group: 00_000_TLD

Application: Netbackup

Media Flags: 1

Description: For 2006 200 LTO2 tapes

Barcode: 000087

Partner Barcode: --------

Last Write Host: sdbsbak1

Created: 12/28/2006 13:38

Time Assigned: 03/18/2011 08:43

First Mount: 01/03/2007 19:02

Last Mount: 04/12/2007 04:04

Volume Expiration: -

Data Expiration: INFINITY

Last Written: -

Last Read: -

Robot Type: TLD

Robot Control Host: sdbsbak1

Robot Number: 0

Slot: 138

Side/Face: -

Cleanings Remaining: -

Number of Mounts: 40

Maximum Mounts Allowed: 0

Media Status: FROZEN

Kilobytes: 0

Images: 999

Valid Images: 0

Retention Period: 0

Number of Restores: 0

Optical Header Size Bytes: 1024

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: sdbsbak1

Master Host: sdbsbak1

Server Group: NO_SHARING_GROUP

Upgrade Conflicts Flag:

Pool Number: 14

Volume Pool: ddms

Previous Pool Name: scratch

Vault Flags: -

Vault Container: -

Vault Name: -

Vault Slot: -

Session ID: -

Date Vaulted: -

Return Date: -

====================================================================

Command completed successfully.


6. The tape can now be expired with the bpexpdate command.

If there are no valid images for the media, the command syntax example and output:
bpexpdate -m 000087 -justmedia -d 0

If there are valid images for the media, the command syntax example and output:
bpexpdate -m 000087 -d 0

root@sdbsbak3 # bpexpdate -m 000087 -justmedia -d 0

Media 000087 is due to expire at INFINITY

Are you sure that the data on this media is not critical to

your business, and you are sure you want to delete 000087 y/n (n)? y


查看发现000087已经被成功expire,并自动移至scratch pool中。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7919512/viewspace-1048072/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7919512/viewspace-1048072/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值