- Review of Stellar Phoenix Mailbox Exchange Recovery - Wed, Jul 22 2015
- Configure Exchange 2013 Internet mail flow during migration - Fri, Dec 27 2013
- Exchange 2013 DAG recovery in a stretched AD site – Part 2 - Wed, Dec 25 2013
Below is the lab setup of the Blue.com domain with two Exchange 2013 Database Availability Group (DAG) nodes. DAG01 is the stretched AD site “Default-first-site-Name” between two data centers.
Restoring DAG in a primary data center
When primary nodes are up, Datacenter Activation Coordination (DAC) mode comes into play. DAC mode uses the Data Center Activation Coordination Protocol (DACP) to prevent the DAG from having “split-brain syndrome.”
What is the split-brain syndrome?
For instance, in a DR scenario where we fail over to the secondary site while the servers from the primary site come up, the primary site might have the majority of the nodes and will mount the database. Thus, you might end up with two active systems. To avoid this situation, we can configure the DAG in DAC mode.
Once all the primary nodes are up and the network between the primary and the secondary data center is restored, execute the following command:
Start-DatabaseAvailabilityGroup -Identity DAG01 -ActiveDirectorySite Default-First-Site-Name
This command will join the failed node BlueExch01 back to the cluster and will allow its database copies to start seeding from the active database copy. Depending on the downtime and the size of the database, it will take some time to get the database copies updated into a healthy state. If, for any reason, the automatic seeding does not happen, then force the replication by using the cmdlet Update-MailboxDatabaseCopy. Sometimes, the content Index may not seed and may fail. Fix the issue by using the parameter catalog with the cmdlet Update-MailboxDatabaseCopy or by restarting the MS Exchange search service.
We have recovered the DAG in the primary data center and have now to activate the file share witness because DAG is still using the alternative file share witness. The Set-DatabaseAvailabilityGroup cmdlet is used to activate the file share witness. This can be verified at the Failover Cluster Manager.
Set-DatabaseAvailabilityGroup -Identity DAG01
Once the file share witness server is activated, move the database back to the primary data center using the following cmdlet or by executing the RedistributeActiveDatabases.ps1 script, which is available in the default scripts folder:
Get-MailboxDatabase | Move-ActiveMailboxdatabase –ActivateonServer BlueExch01 –MountDialOverride:None
By doing this, we have restored the DAG on the primary data center and have mounted the active database on it. This process is much easier in Exchange 2010 and Exchange 2013 when compared to the previous versions of Exchange. Please notice that sometimes, it is worth it to wait for the primary data center to come up and allow the DAG to recover itself or to recover it manually using the commands in the secondary data center.
I hope this article gives you a clear picture of understanding and recovering the DAG in the stretched AD site scenario.