DFS-R:可用磁盘空间

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

此对象可监视在包含已复制文件夹或暂存文件夹的卷上可用的磁盘空间。

Knowledge Base article:

摘要

此对象可监视包含已复制文件夹或暂存文件夹的卷上的可用磁盘空间,如果用于复制的磁盘空间严重不足,将会生成“警告”警报。它通过检查 DFS 复制事件日志中是否存在 DFS 复制事件 4502 实现此操作。

原因

此监视器的不正常状态表示可用磁盘空间不足,无法执行 DFS 复制。

解决方案

增加可用磁盘空间

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

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

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

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

调整配额

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

调整 DFS 复制配额

您可以编辑暂存文件夹以及冲突和已删除文件夹的配额大小,以减少 DFS 复制的磁盘空间需求。要执行此操作,请参阅 编辑暂存文件夹以及冲突和已删除文件夹的配额大小 (http://go.microsoft.com/fwlink/?LinkId=186944)。

重要事项:如果配置的暂存文件夹配额太小,DFS 复制可能会占用其他 CPU 和磁盘资源来重新生成暂存文件。复制速度也可能会减慢,因为暂存空间不足会有效地限制与伙伴的并发传输数。增加暂存文件夹以及冲突和已删除文件夹的大小可提高复制性能,并增加可恢复的冲突和已删除文件的数量。

验证

此监视器将在可用磁盘空间足够时重置为正常状态,并且 DFS 复制将记录 DFS 复制事件 4504。

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

其他

Element properties:

TargetMicrosoft.Windows.FileServer.DFSR.ReplicatedFolder
Parent MonitorSystem.Health.AvailabilityState
CategoryStateCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.2SingleEventLog2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
DFS-R:磁盘空间不足
DFS Replication 服务在复制一个或多个文件时遇到错误,因为卷 {0} 上没有足够的可用空间。此卷包含已复制文件夹、暂存文件夹或同时包含二者。请确保此卷上有足够的可用空间,以便复制可以继续进行。该服务会定期重试复制。
其他信息:暂存文件夹:{1} 已复制文件夹根路径:{2} 已复制文件夹名称:{3} 已复制文件夹 ID:{4} 复制组名:{5} 复制组 ID:{6} 成员 ID:{7} 卷: {8}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.Windows.FileServer.DFSR.FreeSpaceMonitor" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.FileServer.DFSR.ReplicatedFolder" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.2SingleEventLog2StateMonitorType" ConfirmDelivery="true">
<Category>StateCollection</Category>
<AlertSettings AlertMessage="Microsoft.Windows.FileServer.DFSR.FreeSpaceMonitor_AlertMessageResourceID">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Params/Param[8]$</AlertParameter1>
<AlertParameter2>$Data/Context/Params/Param[9]$</AlertParameter2>
<AlertParameter3>$Data/Context/Params/Param[2]$</AlertParameter3>
<AlertParameter4>$Data/Context/Params/Param[3]$</AlertParameter4>
<AlertParameter5>$Data/Context/Params/Param[1]$</AlertParameter5>
<AlertParameter6>$Data/Context/Params/Param[4]$</AlertParameter6>
<AlertParameter7>$Data/Context/Params/Param[5]$</AlertParameter7>
<AlertParameter8>$Data/Context/Params/Param[6]$</AlertParameter8>
<AlertParameter9>$Data/Context/Params/Param[7]$</AlertParameter9>
</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">4502</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">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">4504</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>