Datacenter Activation Coordination (DAC) Mode is a property of a DAG which can be turned on or off. DAC mode is disabled by default and should only be enabled for DAGs with three or more DAG members that have been deployed in a multi-datacenter configuration. DAC mode shouldn’t be enabled for
- 2 member DAGs where each member is in a different AD site
- 2-16 member DAGs where all members are in the same AD site
In case you try to turn on DAC where it is not supported, an error will be returned.
Note: In the expected Exchange 2010 SP1, DAC mode will be extended to support two-member DAGs that have each member in a separate datacenter. In addition, DAC mode will be extended to support DAGs that have all members deployed in a single Active Directory site, including AD sites that have been extended to multiple locations. So in SP1, you can now use DAC mode for all DAGs with two or more members.
DAC mode is configured to avoid a “split brain syndrome”. I will explain with an example. Let’s say we have a four member DAG, with two servers in each datacenter. The primary datacenter hosts the witness server and hence will always be in quorum. Now, let’s say that a power outage occurs in the primary datacenter and the exchange admin activates the secondary datacenter with an alternate file share witness.
When the power is restored in the primary site, servers come online quicker than the WAN links. Hence, when the two DAG members and witness server comes online, it has a quorum (majority) and will try to activate the databases. This will cause a “split brain syndrome” where both datacenters think that they are hosting the active databases.
DAC mode was introduced to avoid this situation. When DAC mode is enabled and the DAG members come back online, they will leverage a protocol called Datacenter Activation Coordination Protocol (DACP) before trying to mount the databases. The DACP is used to determine the current state of the DAG and whether Active Manager should try to mount the databases or not.
Now for the technical bit as to how DAC works!
Active Manager stores a bit in memory (either a 0 or 1) that tells the DAG whether it’s allowed to mount local databases that are assigned as active on the server. When a DAG is running in DAC mode, each time Active Manager starts up, the bit is set to 0, which means that it isn’t allowed to mount databases. When in DAC mode, the server must try to communicate with all other members of the DAG that it knows to get another DAG member to give it an answer as to whether it can mount local databases that are assigned as active to it. The answer comes in the form of the bit setting for other Active Managers in the DAG. If another server responds that it’s bit is set to 1, it means that servers are allowed to mount databases. Hence, the server starting up sets its bit to 1 and mounts its databases.
Let’s find how DAC helps in “split brain” scenario in our example. When power is restored to the primary datacenter, the servers come online before WAN links and all of the DAG members in the primary datacenter will have a DACP bit value of 0. Hence, none of the servers in the primary datacenter will mount databases as they cannot communicate with a DAG member that has a DACP bit value of 1.
DAC mode can be turned on by running the shell command below.
Set-DatabaseAvailabilityGroup –identity “dagname” –DatacenterActivationMode DagOnly
Nice article – but how does the DAC bit get to 1 on one of those Servers?
That is all the magic of DAC mode Franz-Georg ;-)
Hi Rajith,
I have seen lot of articles in our website and it is very useful for us ..thank you rajith.
What is Split Brain and how it is working in DAC , because i can not understand these things .let me know if you have any idea…..
Hi Ranjith,
Could you please explain in which scenario FSW is used and in which scenario DAC is used ?
Hi Rajith,
These could be a silly question but need to know for my beter understanding, So Please help me for below my doubts:
1. ”it has a quorum (majority) and will try to activate the databas”, does this mean, Even though database/s in secondry site active, it will also attempt to make the databases in primary site online after power restored??. And that is where ”Split brain syndrome” situation arise.
2. When you say restore DAG with an alternate witness server, deosnt it mean we restore DAG in Secondary site and configure new FSW?? Or FSW will already be there and we will just restore DAG. Please clarify.
Hi Rajith,
These could be a silly question but need to know for my beter understanding, So Please help me for below my doubts:
1. ”it has a quorum (majority) and will try to activate the databas”, does this mean, Event to database/s in secondry site active, it will alos attempt to make them online in primary site??. And that is where ”Split brain syndrome” situation arise.
2. When you say restore DAG with an alternate witness server, deosnt it mean we restore DAG in Secondary site and configure new FSW?? Or FSW will already be there and we will just restore DAG. Please clarify.
Hello,
Need help in DR Switchover {DAG across two data centers}
Setup: Two AD sites [Production and DR] DR site is passive, no user connectivity. It is only use in disaster scenario when Primary site is down.
ProductionSite
1 HT & CAS servers [FSW on Hub 1] 1 HT & CAS server
DAG: 1 mailbox servers 1 MBX (Part of DAG)
AD Servers AD Server
Requirement: 1. Production site should be up and running even if the WAN link is down between production and DR.
2. When Production site is down, DR manual switchover should not take more time and when the production site is up, it should easily switch back to primary site.
Any pointer to this would be appreciated.
DAC Mode Off
Alternate FSW is not configured
Exchange 2010 SP1
Hi Devendra,
You need DAC mode to ON.
If SR site fails, everything continues to work as witness and MBX1 is online.
If prod fails, you need to restore DAG with an alternate witness server. You can pre-configure the alternate witness server or not. Not a problem.
If you have active users in both sites, it is better to have two DAGs.
Does this work on a per database basis? Meaning can I have 1 database active in site A and a 2nd completely different database active in site B during a VPN failure?
Thanks Dinko.
I wrote a procedure of how to activate secondary data center. The system consists two Exchange SP1 DAG members in a single AD site separated across two data centers. This setup currently works in a production and has been tested.
http://www.itsolutionbraindumps.com/2011/02/exchange-2010-sp1-dac-in-single-ad-site.html
Dinko
I can't seem to get this to work, I recieve the error requires 2 sites. It's a 4 member dag with all except 1 in the same site (nltest confirms different sites). Only 1 database which is healthy on all nodes. Any ideas?