DFS-R:暂存文件夹清理运行状况

Microsoft.Windows.FileServer.DFSR.StagingCleanupFailureMonitor (UnitMonitor)

此对象可监视 DFS 复制是否成功为已复制文件夹清理暂存文件夹(获取额外空间)。如果清理失败,此监视器将会创建“警告”警报。

Knowledge Base article:

摘要

此对象可监视 DFS 复制是否成功为已复制文件夹清理暂存文件夹(获取额外空间)。如果清理失败,此监视器将会创建“警告”警报。通过查找是否存在 DFS 复制事件 4206 来实现。

原因

此监视器的不正常状态表示 DFS 复制无法清理暂存文件夹。这可能是由以下原因引起的:

解决方案

等待暂存文件夹清理完成

不需要任何操作。

当暂存文件夹的大小达到暂存文件夹配额限制时,DFS 复制会通过删除旧文件来自动尝试清理暂存文件夹。清理操作完成后,将继续复制操作。

注意:如果此监视器经常进入不正常状态,或者为了优化性能,请增加暂存文件夹的配额。

调整配额

如果配额(NTFS 磁盘配额或文件服务器资源管理器配额)限制受影响的文件夹或卷,可以考虑增加配额大小。要调整使用文件服务器资源管理器创建的文件夹,请参阅 配额管理 (http://go.microsoft.com/fwlink/?LinkId=187098)。要调整 NTFS 磁盘配额,请使用 Fsutil quota 命令,如 FSutil 配额 (http://go.microsoft.com/fwlink/?LinkId=187104) 中所述。

增加可用磁盘空间

如果托管暂存文件夹或调试日志文件的卷磁盘空间不足,请增加卷的可用磁盘空间、增加卷的容量大小或将暂存文件夹的路径更改为具有更多可用磁盘空间的卷。

若要手动检查可用磁盘空间量,请打开命令提示符窗口并键入以下命令,其中 [servername] 是托管受影响文件夹的服务器的名称,而 [domain\user] 是您的用户名:

WMIC /node: "[servername]" /user: [domain\user] volume list status

释放空间后,请重新启动 DFS Replication 服务。

验证

此监视器将在解决问题后自动重置为正常状态。

其他

Element properties:

TargetMicrosoft.Windows.FileServer.DFSR.ReplicatedFolder
Parent MonitorMicrosoft.Windows.FileServer.DFSR.StagingAggregateMonitor
CategoryStateCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.2SingleEventLog2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
DFS-R:暂存文件夹清理失败
DFS 复制无法清理暂存文件夹。因此,大型文件可能无法复制且已复制文件夹可能会停止同步。此服务将定期重试暂存空间清理。如果服务检测到暂存文件未锁定并且已准备好清理,它可能会比指示更快地启动清理。
其他信息:下次清理尝试时间间隔(分钟):{0} 已复制文件夹:{1} 暂存文件夹:{2} 已配置大小 (MB):{3} 已使用的空间:{4} 高水位线:{5}\% 低水位线:{6}\% 已复制文件夹名称:{7} 已复制文件夹 ID:{8} 复制组名:{9}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.Windows.FileServer.DFSR.StagingCleanupFailureMonitor" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.FileServer.DFSR.ReplicatedFolder" ParentMonitorID="Microsoft.Windows.FileServer.DFSR.StagingAggregateMonitor" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.2SingleEventLog2StateMonitorType" ConfirmDelivery="true">
<Category>StateCollection</Category>
<AlertSettings AlertMessage="Microsoft.Windows.FileServer.DFSR.StagingCleanupFailureMonitor_AlertMessageResourceID">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Params/Param[2]$</AlertParameter1>
<AlertParameter2>$Data/Context/Params/Param[1]$</AlertParameter2>
<AlertParameter3>$Data/Context/Params/Param[3]$</AlertParameter3>
<AlertParameter4>$Data/Context/Params/Param[3]$</AlertParameter4>
<AlertParameter5>$Data/Context/Params/Param[4]$</AlertParameter5>
<AlertParameter6>$Data/Context/Params/Param[5]$</AlertParameter6>
<AlertParameter7>$Data/Context/Params/Param[6]$</AlertParameter7>
<AlertParameter8>$Data/Context/Params/Param[7]$</AlertParameter8>
<AlertParameter9>$Data/Context/Params/Param[8]$</AlertParameter9>
<AlertParameter10>$Data/Context/Params/Param[9]$</AlertParameter10>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="FirstEventRaised" MonitorTypeStateID="FirstEventRaised" HealthState="Warning"/>
<OperationalState ID="SecondEventRaised" MonitorTypeStateID="SecondEventRaised" HealthState="Success"/>
</OperationalStates>
<Configuration>
<FirstComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</FirstComputerName>
<FirstLogName>DFS Replication</FirstLogName>
<FirstExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4206</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">DFSR</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[1]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/Property[Type="Microsoft.Windows.FileServer.DFSR.ReplicatedFolder"]/ReplicatedFolderGUID$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</FirstExpression>
<SecondComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</SecondComputerName>
<SecondLogName>DFS Replication</SecondLogName>
<SecondExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">DFSR</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1004</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1104</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[1]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/Property[Type="Microsoft.Windows.FileServer.DFSR.ReplicatedFolder"]/ReplicatedFolderGUID$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4202</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4002</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4008</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4010</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4114</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4210</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
</And>
</Expression>
<Expression>
<And>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">9008</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">9111</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[3]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/Property[Type="Microsoft.Windows.FileServer.DFSR.ReplicatedFolder"]/ReplicatedFolderGUID$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Or>
</Expression>
</And>
</SecondExpression>
</Configuration>
</UnitMonitor>