Article ID: 2846759 - View products that this article applies to.
The purpose of this KB is to describe a new behavior in the DFSR service and the new DFSR Event ID 2213. It covers the actions an administrator should take and how to reduce the number of 2213 events logged on a DFSR server. It also covers best practices regarding Auto Recovery from dirty shutdown in light of the latest DFSR patch.
Microsoft introduced a new behavior to the DFS Replication service for Windows Server 2008 R2 via the hotfix published in KB 2663685
(http://support.microsoft.com/kb/2663685/EN-US). After installing KB 2663685 or later versions of DFSRS.EXE on Windows Server 2008 R2, the DFSR Service will no longer perform automatic recovery of the Extensible Storage Engine (ESE)) database when the database suffers dirty shutdown. When the new behavior is triggered, Event ID 2213 is log in the DFSR Event Log. A DFSR administrator must manually resume replication when a dirty shutdown is detected by DFSR.
Windows Server 2012 uses this behavior by default.
The DFSR service maintains one ESE database per volume on volumes that host a replicated folder. DFSR uses this database to store metadata about each file and folder in the replicated folder. The integrity of the database must be maintained to ensure proper service function.
When DFSR is notified that the service must shutdown it will begin to commit all outstanding changes to the ESE database. Dirty Shutdown in DFSR occurs when the DFSR service cannot commit all pending changes to the DSFR ESE Database before the DFSR service is terminated. Upon startup the DFSR service will check the integrity of the database.
Dirty shutdown recovery can possibly cause high backlogs which may cause replication conflicts. In some cases, prior to the fix published in KB 2780453
(http://support.microsoft.com/kb/2780453), the winning file may not be the version that the end user wants. The change to stop replication on dirty shut down was intended as a safe guard which allowed administrators the opportunity to back up the data to capture deltas since the last backup was taken before resuming replication.
As of KB 2780453 it is no longer necessary to pause replication on dirty shutdown. Windows Server 2012 has the fix from KB 2780453
(http://support.microsoft.com/kb/2780453)included in the default media.
Best practicesBest practices for auto-recovery based on server role, OS and patch level
Collapse this tableExpand this table
How to disable the Stop Replication on Auto Recovery behavior
To have DFSR perform auto-recovery when a dirty database shut is detected edit the following registry value after KB 2780453
(http://support.microsoft.com/kb/2780453)is installed on Windows Server 2008 R2. You can deploy this change to all on all versions of Windows Server 2012. If the value does not exist it will need to be created.
How to Resume Replication after Event 2213 is logged
To resume replication after is has been paused will require an administrator to run a WMIC command. The command as it needs to be run will be provide in the text of Event ID 2213
Step 1: Event ID 2213 is logged on your DFSR server.
Event Type: Warning
Step 2: Copy the WMIC command from step 2 in Event ID 2213 and paste it into an elevated command prompt. The results of a successful run of the command will look like this:
wmic /namespace:\\root\microsoftdfs pathdfsrVolumeConfig where volumeGuid="F1CF316E-6A40-11E2-A826-00155D41C919" call ResumeReplication
Note for PowerShell users: You will need to add single quotations to the WMIC commnand to run it from PowerShell:
wmic /namespace:\\root\microsoftdfs pathdfsrVolumeConfig where ‘volumeGuid="F1CF316E-6A40-11E2-A826-00155D41C919"’ call ResumeReplication
Step 3: Check that Event ID 2212 and 2214 have been logged on the server that you ran the resume replication comand on.
Event Type: Warning
Event Type: Warning
Steps to reduce the chances of having a dirty shutdown
In the Windows operating system a service has 30 seconds to shut down once it receives a shutdown notification. After the 30 seconds expire, the Service Control Manager will force the service to shut down. In the case of the DFSR service, a busy hub server may need more than 30 seconds to commit outstanding changes to the database. If the DFSR service does not commit all changes in the 30 seconds allotted by the Service Control Manager it will be forcibly closed forcing a dirty shown down recovery.
Power outages or any other hard reboot of a DFSR server can cause a dirty shutdown recovery to occur. To reduce the chances of this occurring make sure your DFSR servers are connected to a UPS to allow them to gracefully shutdown.
Extending Service Shutdown Times
On DFSR servers that need more than 30 seconds to shut down you can use the WaitToKillServiceTimeout value to extend the amount of time allowed for all services to shut down.
Typical symptoms that a DSFR server needs more time to shut down are that the server will log 2212 and 2214 events on most reboots or restarts of the service. Or in the case when Auto Recovery from dirty shut down is enabled event 2213 is logged on every reboot or restart of the DFSR service.
Note: This value is in milliseconds. The example provides 5 minutes of shutdown time. The value can be increased or decreased as needed.
This value affects all services not just DFSR. It is recommended to set this value to the lowest setting that still allows DFSR enough time to shutdown cleanly. You can determine how long your DFSR service needs to shut down using the following process
(http://go.microsoft.com/fwlink/?LinkId=151500)for other considerations.
Article ID: 2846759 - Last Review: August 28, 2013 - Revision: 5.0
Contact us for more help
Connect with Answer Desk for expert help.