mercredi 14 août 2013

[Windows Server 2012] Issues with Active Directory in a Lab environment - Part 2


Active Directory is a great feature in Windows Server. However, imagine you lose or crash your DC's during tests...
In that series, I will share my own experience and show how to solve that troubles.

1. The DNS is waiting for Active Directory - KB 2001093
2. DFSR JET database is not shut down cleanly
3. This server has been disconnected from other partners for 60 days
4. The DFS Replication service failed to register the WMI providers


2. DFSR JET database is not shut down cleanly


Symptoms

You note that replications between your DCs don't work: For example, when you create an account on one DC, the account doesn't appear on the other DCs. All DCs are online and can be joined normally.

In Event logs,you find the Event ID 2213 with the following description:
The DFS Replication service stopped replication on volume C:. This occurs when a DFSR JET database is not shut down cleanly and Auto Recovery is disabled. To resolve this issue, back up the files in the affected replicated folders, and then use the ResumeReplication WMI method to resume replication.
Recovery Steps
1. Back up the files in all replicated folders on the volume. Failure to do so may result in data loss due to unexpected conflict resolution during the recovery of the replicated folders.
2. To resume the replication for this volume, use the WMI method ResumeReplication of the DfsrVolumeConfig class. For example, from an elevated command prompt, type the following command:
wmic /namespace:\\root\microsoftdfs path dfsrVolumeConfig where volumeGuid="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" call ResumeReplication




Cause and Resolution

By design on Windows Server 2012, after an unexpected shutdown, the DFS Replication service no longer automatically recovers databases. This behavior enables you to back up the replicated files before you start the recovery process.

To start replication again, execute the command line provided in the Event description:
wmic /namespace:\\root\microsoftdfs path dfsrVolumeConfig where volumeGuid="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" call ResumeReplication



To prevent that behavior in a lab environment, you may want to automatically recover databases. You can set the HKLM\System\CurrentControlSet\Services\DFSR\Parameters\StopReplicationOnAutoRecovery registry value to 0.



To get more information, read the KB 2663685 Changes that are not replicated to a downstream server are lost on the upstream server after an automatic recovery process occurs in a DFS Replication environment in Windows Server 2008 R2.



See you soon
Julien

Aucun commentaire:

Enregistrer un commentaire