Jaa


DPM 磁带作业花费的时间比预计时间更长,或者失败并显示 ID 24052

嗨,大家好,我是 Mike Jacquet。我想利用一分钟时间,谈一下我们多次看到的产品支持方面的一个问题,即 DPM 磁带作业花费的时间比预计时间更长,或者彻底失败并显示 ID 24052。根据磁带库中是拥有多个磁带驱动器,还是使用独立磁带驱动器,这一问题存在两种可能的症状。

A. 如果拥有一个多磁带驱动器磁带库,则在使用 Data Protection Manager 执行磁带备份时,一段时间之后,您可能注意到完成磁带备份花费的时间比正常时间更长。

B. 如果拥有一个单磁带驱动器库,或者使用独立磁带驱动器,则所有磁带备份作业失败,并显示以下作业详细信息和警报:

Type: Tape backup
Status: Failed
Description: DPM could not reserve the drive resource because one of required drive resources is not online or it needs cleaning or servicing. (ID 24052)
More information
End time: <time>
Start time: <time>
Time elapsed: 00:00:00
Data transferred: 0 MB
Cluster node -
Source details: D:\
Protection group members: 1
Details
Protection group: test
Library: Sun/StorageTek Library
Tape Label (Barcode): -

警报
====

Affected area: -
Occurred since:
Description: The back up to tape job failed for the following reason: (ID 3311)
More information
Detailed Errors View Detailed Errors
Recommended action: Run backup to tape job again...
Resolution: To dismiss the alert, click below
Inactivate alert

详细信息错误显示以下详细信息:

Error Details:
DPM could not reserve the drive resource because one of required drive resources is not online or it needs cleaning or servicing. (ID 24052)
Recommeded action:
1) View and resolve all alerts for the library and its drive(s). Retry the operation after resolving the alerts.
2) Go to the Library tab in the Management pane and click on Rescan. Once the rescan operation has completed successfully, retry the operation.

原因

A. 磁带库中的一个或多个磁带驱动器太脏,需要清洁,或者出现故障。由于 DPM 没有使用一个或多个驱动器,因此,需要花费更长时间才能完成磁带备份作业。DPM 控制台中没有显示哪个磁带驱动器需要清洁的直观指示,但是,没有使用的驱动器需要清洁或维护。

B. 独立磁带驱动器太脏,需要清洁,或者出现故障。DPM 控制台中没有显示磁带驱动器需要清洁或出现故障的直观指示。

解决方法

1) 将下面的内容复制到记事本,将文件另存为 C:\Program Files\Microsoft DPM\DPM\bin\QueryDriveStatus.ps1,然后从 DPM PowerShell 命令窗口运行该文件。

<************* 开始复制以下内容 ******************>

param([string] $verbose)
add-pssnapin sqlservercmdletsnapin100
Add-PSSnapin -Name Microsoft.DataProtectionManager.PowerShell
$ConfirmPreference = 'None'
cls
$instance = '.\msdpm2010' # <---- If DPM Database is on a different location, edit this line accordinly
$query = "
use dpmdb
select lib.UserFriendlyName,
td.SerialNo,
td.driveid,
DRV.AccessPath,
TD.DriveStatus,
case TD.DriveStatus
when 0 then 'None'
when 1 then 'Needs Cleaning'
when 2 then 'Needs servicing'
end as drive_status,
GTD.LastCleaningDate,
drv.DriveType,
case DRV.drivetype
when 0 then 'Library'
when 1 then 'Stand Alone'
end as Library_Type
from dbo.tbl_MM_Library lib
join dbo.tbl_MM_Drive drv on lib.LibraryId = drv.LibraryId
join dbo.tbl_MM_TapeDrive td on drv.DriveId= td.DriveId
inner join dbo.tbl_MM_Global_TapeDrive GTD on GTD.DriveId= drv.GlobalDriveId
where TD.DriveStatus > 0 and lib.IsOffline = 0
order by lib.UserFriendlyName"

$result = @(Invoke-Sqlcmd -ServerInstance $instance -Query $query)
if (!$result)
{
write-host "No tape drive(s) found that need cleaning. Exiting..."
exit
}

$count = 1
write-host " For optimum output, set PoweShell Width for screen buffer size to at least 160" -f yellow
write-host " This script will only return tape drives that need cleaning or servicing. Offline library/drives won't show up" -f yellow; write-host
write-host
write-host " UserFriendlyName Serial Number Access Path Drive Status Last Cleaning Date Library Type"
write-host " ------------------------------------------ ------------------------------- ------------------ --------------- ----------------------- ------------"
foreach ($result1 in $result)
{
if ($color -eq 'white') {$color = 'cyan'} else {$color = 'white'}
write-host ("{0,2}"-f $count) -foreground green -nonewline
write-host ( " - {0,-40} {1,33} {2,18} {3,-15} {4,23} {5,-11}" -f $result1.UserFriendlyName, $result1.SerialNo, $result1.AccessPath, $result1.Drive_Status, $result1.LastCleaningDate, $result1.Library_type, $result1.isoffline) -nonewline -f $color
write-host
$count++
}

write-host
write-host "Which drive(s) you want to set as cleaned? `nIf you want to set more than one drive enter numbers separated by space: " -f green -nonewline
$cleandrive = read-host
$cleandrive = $cleandrive -split " "
$executingjob = 0

if ($cleandrive)
{
foreach ($cleaning in $cleandrive)
{
$fireclean = [int]$cleaning
if ($fireclean -gt 0 -and $firejob -lt $count)
{
$query = "use dpmdb
update tbl_mm_tapedrive
set drivestatus = 0
where driveid = '{0}'" -f $result[$cleaning-1].driveid
Invoke-Sqlcmd -ServerInstance $instance -Query $query
}
}
}
write-host "Done..."

<*************** 结束复制以上内容 ******************>

2.根据 DPM PowerShell 脚本的输出确定需要清洁的驱动器。该输出将提供库友好名称、序列号、访问路径、驱动器状态和上次清洁驱动器的日期/时间,从而可以在 DPM 控制台中进行识别。

样本输出
=========

3.使用下面的 TechNet 文章,利用清洗器磁带清洁磁带驱动器,然后重新扫描磁带库。

清洁磁带驱动器:https://technet.microsoft.com/zh-cn/library/bb795736.aspx

4.清洁驱动器之后,重新运行 PowerShell 脚本,以便了解驱动器现在是否处于正常状态。

5.如果仍然报告驱动器太脏,请运行脚本,并手动将其标记为已清洁。

Michael Jacquet | 高级支持呈报工程师

Facebook Twitter 上获得最新的 System Center 新闻:

 

App-V 团队博客:https://blogs.technet.com/appv/
ConfigMgr 支持团队博客:https://blogs.technet.com/configurationmgr/
DPM 团队博客:https://blogs.technet.com/dpm/
MED-V 团队博客:https://blogs.technet.com/medv/
Orchestrator 支持团队博客:https://blogs.technet.com/b/orchestrator/
Operations Manager 团队博客:https://blogs.technet.com/momteam/
SCVMM 团队博客:https://blogs.technet.com/scvmm
Server App-V 团队博客:https://blogs.technet.com/b/serverappv
Service Manager 团队博客:https://blogs.technet.com/b/servicemanager
System Center Essentials 团队博客:https://blogs.technet.com/b/systemcenteressentials
WSUS 支持团队博客:https://blogs.technet.com/sus/
Forefront Server Protection 博客:https://blogs.technet.com/b/fss/
Forefront Endpoint Security 博客:https://blogs.technet.com/b/clientsecurity/
Forefront Identity Manager 博客:https://blogs.msdn.com/b/ms-identity-support/
Forefront TMG 博客:https://blogs.technet.com/b/isablog/
Forefront UAG 博客:https://blogs.technet.com/b/edgeaccessblog/