DFS-R:偵錯記錄

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

此物件會監視 DFS 複寫偵錯記錄檔,並在偵測到 DFS 複寫無法寫入記錄檔時建立「警告」警示。

Knowledge Base article:

摘要

此物件會監視 DFS 複寫偵錯記錄檔,並在偵測到 DFS 複寫無法寫入記錄檔時建立「警告」警示。它會透過尋找 DFS 複寫事件 1302 是否存在來執行此操作。

原因

此監視的狀況不良狀態指出,偵錯記錄因 DFS 複寫無法寫入偵錯記錄檔而停用。這通常是在 DFS 複寫無法存取偵錯記錄檔資料夾時發生。這可能因為以下原因而發生:

解決方式

尋找偵錯記錄檔

若要尋找為偵錯記錄檔設定的路徑,請在受影響的電腦上輸入以下命令:

wmic /namespace:\\root\microsoftdfs path DfsrMachineConfig get DebugLogFilePath

確認該路徑存在且對受影響的電腦來說為本機路徑。該路徑不可為 UNC 位址或網路路徑。

若該路徑不存在,您可建立該路徑或變更預設的偵錯記錄檔位置。若要變更偵錯記錄檔位置,請輸入以下命令,其中 [new_target_path] 是偵錯記錄檔的新路徑:

wmic /namespace:\\root\microsoftdfs path DfsrMachineConfig set DebugLogFilePath="[new_target_path]''

增加可用磁碟空間

如果主控複寫用快取資料夾或偵錯記錄檔的磁碟區的磁碟空間不足,請增加磁碟區的可用磁碟空間、增加磁碟區的大小,或將複寫用快取資料夾的路徑變更至擁有更多可用磁碟空間的磁碟區。

若要手動檢查可用磁碟空間量,請開啟命令提示字元視窗,然後輸入以下命令,其中 [servername] 是主控受影響資料夾的伺服器的名稱,而 [domain\user] 是您的使用者名稱:

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

釋出空間之後,請重新啟動 DFS 複寫服務。

調整配額

如果配額 (NTFS 磁碟配額或檔案伺服器資源管理員配額) 讓受影響的資料夾或磁碟區受到限制,請考慮增加配額大小。

修正偵錯記錄檔資料夾權限

如果 DFS 複寫服務對偵錯記錄檔資料夾沒有完全控制權限,記錄將會失敗。若要解決此問題,請將偵錯記錄檔資料夾的完全控制權限授與本機系統帳戶。

驗證

此監視會在問題獲得解決後自動重設為狀況良好狀態。

其他

DFS 複寫事件 1302 (http://go.microsoft.com/fwlink/?LinkId=187119)

Element properties:

TargetMicrosoft.Windows.FileServer.DFSR.Service
Parent MonitorMicrosoft.Windows.FileServer.DFSR.LoggingAggregateMonitor
CategoryStateCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.2SingleEventLog2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
DFS-R:無法寫入偵錯記錄檔
{0}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.Windows.FileServer.DFSR.DebugLoggingFailureMonitor" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.FileServer.DFSR.Service" ParentMonitorID="Microsoft.Windows.FileServer.DFSR.LoggingAggregateMonitor" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.2SingleEventLog2StateMonitorType" ConfirmDelivery="true">
<Category>StateCollection</Category>
<AlertSettings AlertMessage="Microsoft.Windows.FileServer.DFSR.DebugLoggingFailureMonitor_AlertMessageResourceID">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/EventDescription$</AlertParameter1>
</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">1302</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>
</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">1304</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1004</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
</And>
</SecondExpression>
</Configuration>
</UnitMonitor>