Symptom: DFS Replication dirty shutdown recovery process. Related system event log entries, e.g. Event ID 2212, refer to the same event as “unexpected shutdown”.

Sometimes, it is possible that the database and the file system get out of sync. Abrupt power loss on the server or if the DFSR service was stopped abnormally for any reason. Another example is if the volume hosting a replicated folder loses its power, gets disconnected or is forced to dismount. These exception conditions result in unexpected shutdown of DFSR database, as any of these can cause inconsistencies between the database and the file system. DFSR is designed to automatically recover from these situations starting with Windows Server 2008, and this behavior continued through Windows Server 2008 R2.

Technet blog: http://blogs.technet.com/b/filecab/archive/2012/07/23/understanding-dfsr-dirty-unexpected-shutdown-recovery.aspx

KB article: http://support.microsoft.com/kb/2846759

Hotfix for windows 2008 r2 servers:  http://support.microsoft.com/kb/2663685/en-us  (this does not concerns W2k12 and greater)

So in reality, to be short:

if dirty shutdown detected => pause replication => manual recovery is privileged

before w2k12 DFS recovery was enabled by default. Since w2k12, the DFS recovery is “manual recovery” by default.

In term of registry key it means:

HKLM\System\CurrentControlSet\Services\DFSR\Parameters\StopReplicationOnAutoRecovery

REG_DWORD = “1 or 0”  ; “manual recovery” if value = “1”, “automatic recovery” if value = ”0”

==> follow the procedure described http://support.microsoft.com/kb/2846759

 

#Tip:

To get the Guid of SYSVOL (domain system volume) replication group:

wmic /namespace:\\root\microsoftdfs path dfsrvolumeconfig  and get the volumeGuid attribute