使用nbrbutil工具來處理requested media id is in use, cannot process request

首先我發現一個Media已經過期很久,但是并不會覆蓋重用

使用bpexpdate手動過期,失敗,讓他deassigned也不行

使用bpimmedia查看上面的image也沒有

我嘗試手動去過期,返回in use的信息。嘗試前面一篇帖子http://www.cnblogs.com/guilingyang/p/5585179.html的做法,也不能成功。最後找到了nbrbutil工具來解決

[root@nhpabk01 admincmd]# bpexpdate -m DD1083 -d 0  手動過期,失敗!
Media DD1083 is due to expire at 04/17/2016 19:54:14
Are you sure that the data on this media is not critical to
your business, and you are sure you want to delete DD1083 y/n (n)? y
requested media id is in use, cannot process request

[root@nhpabk01 admincmd]# bpexpdate -deassignempty -m DD1083   手動deassign,失敗
Search for empty media that meet the following criteria:
    Media id: DD1083

Continue? y/n (n)y
The following empty media will be deassigned:
    Host:nhpabk01    Media-id:DD1083
Are you SURE you want to continue y/n (n)?y
Could not deassign media-id DD1083, host nhpabk01: requested media id is in use, cannot process request (97)
Deassigned 0 out of 72 media-ids found.
requested media id is in use, cannot process request

[root@nhpabk01 admincmd]# bpimmedia -mediaid DD1083  查看image,沒有
no entity was found

最後使用nbrbutil工具來先把media從EMM裡面移除,再手動deassign就能成功了。具體如下:

[root@nhpabk01 admincmd]# nbrbutil -dump   列出MDS allocations in EMM里的media信息

Allocation Requests
(AllocationRequestSeq )


Allocations
(AllocationSeq
     index=0 (Allocation: id={973D8ADA-1DD1-11B2-8A86-6904E8618665} provider=NamedResourceProvider resourcename=nhpabk01.NBU_CLIENT.MAXJOBS.nhafs01_bk masterserver=nhpabk01 groupid={00000000-0000-0000-0000-000000000000} userSequence=-1 userid="jobid=417042" named resource allocation)
     index=1 (Allocation: id={973D860C-1DD1-11B2-9A0F-76B1DC1D39D9} provider=MPXProvider resourcename=anMPXGroup masterserver=nhpabk01 groupid={973D8454-1DD1-11B2-9522-102B6619403B} userSequence=-1 userid="jobid=417042" (MPXGroupAllocation: groupId={973D8454-1DD1-11B2-9522-102B6619403B}))
     index=2 (Allocation: id={6CD32F58-1DD2-11B2-B2CA-E2CB6F386EE1} provider=NamedResourceProvider resourcename=nhpabk01.NBU_CLIENT.MAXJOBS.nhafs01_bk masterserver=nhpabk01 groupid={00000000-0000-0000-0000-000000000000} userSequence=-1 userid="jobid=416130" named resource allocation)

MDS allocations in EMM:

    MdsAllocation: allocationKey=204833 jobType=1 mediaKey=4000608 mediaId=DD1083 driveKey=2000910 driveName=IBM.ULTRIUM-TD2.003 drivePath=/dev/nst8 stuName=EMCDD2200 masterServerName=nhpabk01 mediaServerName=nhpabk01 ndmpTapeServerName= diskVolumeKey=0 mountKey=0 linkKey=0 fatPipeKey=0 scsiResType=1 serverStateFlags=1
    MdsAllocation: allocationKey=225073 jobType=1 mediaKey=4000384 mediaId=K221L3 driveKey=2000883 driveName=HP.ULTRIUM3-SCSI.002 drivePath=/dev/nst12 stuName=msl6060 masterServerName=nhpabk01 mediaServerName=nhpabk01 ndmpTapeServerName= diskVolumeKey=0 mountKey=0 linkKey=0 fatPipeKey=0 scsiResType=1 serverStateFlags=1
    MdsAllocation: allocationKey=225366 jobType=1 mediaKey=4000222 mediaId=0511L3 driveKey=2000884 driveName=HP.ULTRIUM3-SCSI.003 drivePath=/dev/nst11 stuName=msl6060 masterServerName=nhpabk01 mediaServerName=nhpabk01 ndmpTapeServerName= diskVolumeKey=0 mountKey=0 linkKey=0 fatPipeKey=0 scsiResType=1 serverStateFlags=1

特別注意上面的allocationKey和我們對應的mediaId
[root@nhpabk01 admincmd]# nbrbutil -releaseMDS 204833 通過這句命令來從EMM裡面釋放出media

這時候再執行nbrbutil –dump 該media不會出現在裡面EMM裡面了

接下來執行deassign作業

我首先根據下面的鏈接參考vmdelete來刪除media,但是提示該media是被assigned,無法delete

[root@nhpabk01 bin]# vmdelete -m DD1083
cannot delete assigned volume (92)   
[root@nhpabk01 bin]# cd -
/usr/openv/netbackup/bin/admincmd

我去執行deassigned作業,這里就能成功了。之前始終提示in use ,不能作業
[root@nhpabk01 admincmd]# bpexpdate -deassignempty -m DD1083
Search for empty media that meet the following criteria:
    Media id: DD1083

Continue? y/n (n)y
The following empty media will be deassigned:
    Host:nhpabk01    Media-id:DD1083
Are you SURE you want to continue y/n (n)?y
Deassigned media-id DD1083 on host nhpabk01
Deassigned 1 out of 73 media-ids found.

終於deassign 成功啦。這時候我去檢查該media的狀態,time assigned時間已經變為空了

[root@nhpabk01 admincmd]# nbemmcmd -listmedia -mediaid DD1083
NBEMMCMD, Version:6.5.6
====================================================================
Media GUID:                     a28ad432-f215-11e5-8000-fcf2c0fe6d67
Media ID:                       DD1083                             
Partner:                        -                                  
Media Type:                     HCART2                             
Volume Group:                   000_00002_TLD                      
Application:                    Netbackup                          
Media Flags:                    1                                  
Description:                    Added by Media Manager             
Barcode:                        DD1083                             
Partner Barcode:                --------                           
Last Write Host:                NONE                               
Created:                        03/24/2016 15:10                   
Time Assigned:                  -                                  
First Mount:                    03/25/2016 02:03                   
Last Mount:                     04/10/2016 19:54                   

通過這次對NBU的折騰,熟悉了一些NBU的命令。特別是/usr/openv/netbackup/bin/admincmd下面有很多管理命令

同時也注意到/usr/openv/volmgr/bin下面有一些命令可以操作。

http://cache.baiducontent.com/c?m=9d78d513d98316ec1fbad5385a40c066680bd7356784c7150e8fc55f93150000506692e07b35107594842b7001de5e5c9be7370266507cebc68e9f4aacf9d2757edf6675671cf70145905ef88a00318660ce55b3e95fa5adf1418eb397969a4353bd0c563cc6abd81b5a499430e71446b2fbc655450c41e3aa7278a30e3179cc7219f105eee0442e50c2b18a1d0a947cc76167c8f863eb6d05b565ff490c2432fb0da608277d6cf74f51b8056a13929d0cb476251d65a148c5fb81ebba1fcd9dfd31eeba9cec68c221a0d8&p=882a904382881cfc57ef8c3c5b0d&newp=9e769a4794951fff57e892204b4192694c05d67c6b8bcf5428b9954e94624f171c0ba7ec67634b598fca786704ae4d5ce8fa3d7937052bb291c88d40daafd4456edf653b2740d003448d&user=baidu&fm=sc&query=requested+media+id+is+in+use%2C+cannot+process+request&qid=b950963b000011aa&p1=1

posted @ 2016-06-15 10:17  guilingyang  阅读(625)  评论(0编辑  收藏  举报