首先我發現一個Media已經過期很久,但是并不會覆蓋重用
使用bpexpdate手動過期,失敗,讓他deassigned也不行
使用bpimmedia查看上面的image也沒有
我嘗試手動去過期,返回in use的信息。嘗試前面一篇帖子http://www.cnblogs.com/guilingyang/p/5585179.html的做法,也不能成功。最後找到了nbrbutil工具來解決
[[email protected] 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
[[email protected] 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
[[email protected] admincmd]# bpimmedia -mediaid DD1083 查看image,沒有
no entity was found
最後使用nbrbutil工具來先把media從EMM裡面移除,再手動deassign就能成功了。具體如下:
[[email protected] 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
[[email protected] admincmd]# nbrbutil -releaseMDS 204833 通過這句命令來從EMM裡面釋放出media
這時候再執行nbrbutil –dump 該media不會出現在裡面EMM裡面了
接下來執行deassign作業
我首先根據下面的鏈接參考vmdelete來刪除media,但是提示該media是被assigned,無法delete
[[email protected] bin]# vmdelete -m DD1083
cannot delete assigned volume (92)
[[email protected] bin]# cd -
/usr/openv/netbackup/bin/admincmd
我去執行deassigned作業,這里就能成功了。之前始終提示in use ,不能作業
[[email protected] 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時間已經變為空了
[[email protected] 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下面有一些命令可以操作。