Exchange 2010 DAG implementation & Configuration
This document outlines the installation and configuration of the Database Availability Group on the mailbox server role. All this will take the installation and configuration to a total of minimum 2 servers in the overall DAG cluster. DAG is a new concept to the exchange application clustering on the database level. The new concept of the Database Availability Group (DAG) is exciting Exchange 2010 technology to bring low cost high availability without costly hardware SAN infrastructure. DAG takes less than 30 seconds in a failover. DAG can be expanded to multiple datacenters and up to 16 database copies.
Assumptions
This document assumes that:
Windows Server 2008 Enterprise x64 Edition is installed per baseline regulations which include the latest approved service pack and hotfixes.
Exchange 2010 Mailbox role servers are already installed on the same AD site.
2 Nic’s are configured per server one for replication of logs and other for production mapi connectivity. The networks will be called Replication and Mapi in the document.
File Share Witness creation
File share witness guides the Hub Transport server which server has active database and ready to receive the emails. We need to create a folder on any one of the CAS/HT server.
- Login to one of the HT/CAS server
- Create a folder like C:FSW_DAG1
- Add “Exchange Trusted Subsystem group” in the local Administrators group.
Database Availability Group Creation
We can create DAG from Exchange management console and shell. We will do some part by the console rest by shell.
1. Open EMC -> Expand Organization components and select the database availability group tab
2. Right click and select New Database Availability Group
3. We are now ask to fill in 3 pieces of information for our DAG
- DAG Name(This will be the name of the cluster): something like
DAG01
-
Witness Server: This is the server where we have created the FSW. Type the FQDN here of the server. Like
servername.domainname.com
-
Witness Directory: This is the FSW directory path which will be something like
“C:Foldername”
- Click next, new and Finish on the completion page
- We have created our DAG.
- we can verify in EMC that our DAG was created as well
by itself the DAG does not do anything for us and there are no properties to manage in EMC, however if we use the shell we can see a few additional properties like:
NetworkCompression : InterSubnetOnly
NetworkEncryption : InterSubnetOnly
The cmdlet will Get-DatabaseAvailabilityGroup | fl
- Go to the properties of the DAG and select IP address tab
- Give 1 IP address if both the nodes in the same subnet else give 2 IP addresses. Click ok and ok. IP has to be of the mapi network.
Manage Database Availability Group Membership
- In EMC right click our DAG and select manage database availability group
- On the manage database availability group page click the Add button
- In the select mailbox server window select the both mailbox servers
- Click ok then manage. In the screen there is only one server but we have to add 2 servers.
Selecting manage installs Windows clustering so it will take long time to finish
- Click finish on the completion page
- We can now see that both servers are added to the DAG. Something like below screen
- Open active directory users and computersà go to computer OU. You will find computer object has created with the DAG name we supplied. This object will be used by windows clustering. Also check if the dns host record has created. It should be created automatically.
- Open cluster admin then we will see the Windows clustering is installed.
Let open Windows Failover Clustering and see that the IP is assigned to the cluster.
Another item you will notice that is different from previous versions of Exchange is there are not clustered resources, no disks, not CMS/EVS.
The DAG only users Windows Clustering for heartbeat and quorum the new Active Manager is used to manage the DAG failover.
Configuring the networks
- Go to the Exchange management console àOrganization configurationàMailboxàDAG Tab. Below you will see networks.
-
Select the Production network à go to properties and uncheck the checkbox “Enable Replication”.
- Click ok.
- Open Exchange management shell and run the below command:
“Set-DatabaseAvailabilityGroupNetwork -Subnets ReplicationSubnet -id DAGnameReplicationNetworkname -ReplicationEnabled:$true”
“Set-DatabaseAvailabilityGroupNetwork -Subnets MApiSubnet -id DAGnameMapiNetworkname -ReplicationEnabled:$false”
Changing the name and path of the Database
By default Exchange gives its own name to the database and default path. To change the name and path we will follow the below steps:
- Launch the Exchange Management Shell
-
To dismount the database, run the following command:
Dismount-Database “Mailbox Database <GUID>”
-
To change the mailbox database name run the following command:
Set-MailboxDatabase “<Old DB Name>” –Name “<New DB Name>”
-
To change the location of the database’s transaction logs and the location of the database file, run the following command:
“Move-DatabasePath “<New DB Name>” -LogFolderPath:<New Log Path> -EdbFilePath “<New DB PathFileName.edb>”
-
To mount the database, run the following command:
Mount-Database “<New DB Name>”
- Repeat the steps for all databases.
-
To create a new database run the below command
New-Mailboxdatabase -server servername -name DBname -Edbfilepath “DBpathfilename.edb” -logFolderPath “LogPAth”
Creating the copy of the database for DAG
- Launch the Exchange Management Shell
-
Run the following cmdlet. I want replication should not use the mapi network so I am forcing dedicated replication network and running 3 cmdlets else 1st cmdlet is good enough.
Add-MailboxDatabaseCopy -Identity <DBName> -MailboxServer <destination mailboxservername> -ReplayLagTime 0.00:01:00 –truncationlagtime 0.00:01:00 -ActivationPreference 2
Suspend-MailboxDatabasecopy –identity <DBNamedestinationservername>
Update-MailboxDatabaseCopy -Identity <DBNamedestinationservername> -SourceServer <sourcemailbox server> -DeleteExistingFiles -Network <DAGnameReplicationNetworkname>
Note: In the screen I have already deleted all the files from database, log and chk file folder. So some switches are reduced.
- This will create a new database on the second server. Follow the same steps on all databases.
-
To check the log copy status run the following cmdlet:
Get-Mailboxdatabasecopystatus –identity <Databasename>
–
Prabhat Nigam (Wizkid)
Team@ MSExchangeGuru
February 21st, 2012 at 8:19 am
Excellent
February 21st, 2012 at 2:42 pm
Thank you Mada
March 15th, 2012 at 3:29 am
I’ve read some just right stuff here. Definitely price bookmarking for revisiting. I wonder how a lot attempt you set to make the sort of magnificent informative website.
March 25th, 2012 at 2:30 am
Well written Prabhat.
April 13th, 2012 at 1:01 pm
Remarkable issues here. I am very satisfied to look your article. Thank you a lot and I am looking forward to contact you. Will you please drop me a e-mail?
June 8th, 2012 at 1:54 pm
Thank you guyz. Please feel free to write me at prabhat.nigam@gmail.com
September 12th, 2012 at 5:36 am
Now we plan to deploy exchange 2010 with DAG . By as per our scenario we having only 2 server in which we plan to deploy combine role (HT,AS,MB).
How can i select the witness server , shall i use my file server or is there any procedure.
I heard that as per microsoft recommended we have to put HT server as a witness server.
How can i proceed.
September 13th, 2012 at 2:21 pm
Hi Ashok,
You can use your file server or a domain controller. You will have to add “Exchange Trusted Subsystem” group in the local administrator group of the server.
Prabhat
April 1st, 2013 at 7:56 am
hi, I am not able to add another server to DAG here is the last part of the log file -errors This server is at another physical site.
[2013-04-01T10:09:35] The CNO is currently Online.
[2013-04-01T10:09:35] InternalValidate() done.
[2013-04-01T10:09:35] Updated Progress ‘Adding server ‘SAJDDREX01’ to database availability group ‘SAEXDAG1′.’ 6%.
[2013-04-01T10:09:35] Working
[2013-04-01T10:09:35] Updated Progress ‘Adding server ‘SAJDDREX01′ to the cluster.’ 8%.
[2013-04-01T10:09:35] Working
[2013-04-01T10:35:16] The following log entry comes from a different process that’s running on machine ‘SAJDHQEX01.nbk.com.sa’. BEGIN
[2013-04-01T10:35:16] [2013-04-01T10:09:35] Opening a local AmCluster handle.
[2013-04-01T10:09:35] Updated Progress ‘Adding server ‘sajddrex01’ to database availability group ‘SAEXDAG1′.’ 2%.
[2013-04-01T10:09:35] Working
[2013-04-01T10:09:35] ClusterSetupProgressCallback( eSetupPhase = ClusterSetupPhaseValidateNodeState, ePhaseType = ClusterSetupPhaseStart, ePhaseSeverity = ClusterSetupPhaseInformational, dwPercentComplete = 12, szObjectName = SAJDDREX01, dwStatus = 0x0 )
[2013-04-01T10:35:16] ClusterSetupProgressCallback( eSetupPhase = ClusterSetupPhaseValidateNodeState, ePhaseType = ClusterSetupPhaseContinue, ePhaseSeverity = ClusterSetupPhaseFatal, dwPercentComplete = 12, szObjectName = SAJDDREX01, dwStatus = 0x800713bb )
[2013-04-01T10:35:16] ClusterSetupProgressCallback( eSetupPhase = ClusterSetupPhaseValidateNodeState, ePhaseType = ClusterSetupPhaseEnd, ePhaseSeverity = ClusterSetupPhaseFatal, dwPercentComplete = 12, szObjectName = SAJDDREX01, dwStatus = 0x800713bb )
[2013-04-01T10:35:16] Found a matching exception: Microsoft.Exchange.Cluster.Replay.DagTaskValidateNodeTimedOutException: A database availability group administrative operation failed. Error: Windows Failover Clustering timed out while trying to validate server ‘SAJDDREX01’. If this is in a disjoint DNS namespace, the DNS suffixes for all servers in the database availability group must be present on every server.
[2013-04-01T10:35:16] ClusterSetupProgressCallback( eSetupPhase = ClusterSetupPhaseFailureCleanup, ePhaseType = ClusterSetupPhaseStart, ePhaseSeverity = ClusterSetupPhaseInformational, dwPercentComplete = 12, szObjectName = SAJDDREX01, dwStatus = 0x0 )
[2013-04-01T10:35:16] ClusterSetupProgressCallback( eSetupPhase = ClusterSetupPhaseFailureCleanup, ePhaseType = ClusterSetupPhaseEnd, ePhaseSeverity = ClusterSetupPhaseInformational, dwPercentComplete = 12, szObjectName = , dwStatus = 0x0 )
[2013-04-01T10:35:16] The preceding log entry comes from a different process running on computer ‘SAJDHQEX01.x.x.com’. END
[2013-04-01T10:35:16] The operation wasn’t successful because an error was encountered. You may find more details in log file “C:\ExchangeSetupLogs\DagTasks\dagtask_2013-04-01_10-09-30.737_add-databaseavailabiltygroupserver.log”.
[2013-04-01T10:35:16] WriteError! Exception = Microsoft.Exchange.Cluster.Replay.DagTaskOperationFailedException: A database availability group administrative operation failed. Error: The operation failed. CreateCluster errors may result from incorrectly configured static addresses. Error: Windows Failover Clustering timed out while trying to validate server ‘SAJDDREX01’. If this is in a disjoint DNS namespace, the DNS suffixes for all servers in the database availability group must be present on every server. —> Microsoft.Exchange.Cluster.Replay.DagTaskValidateNodeTimedOutException: A database availability group administrative operation failed. Error: Windows Failover Clustering timed out while trying to validate server ‘SAJDDREX01’. If this is in a disjoint DNS namespace, the DNS suffixes for all servers in the database availability group must be present on every server.
at Microsoft.Exchange.Cluster.ClusApi.AmCluster.AddNodeToCluster(AmServerName nodeName, IClusterSetupProgress setupProgress, IntPtr context, Exception& errorException, Boolean throwExceptionOnFailure)
at Microsoft.Exchange.Cluster.Replay.DagHelper.AddDagClusterNode(AmServerName mailboxServerName, String& verboseLog)
— End of inner exception stack trace (Microsoft.Exchange.Cluster.Replay.DagTaskValidateNodeTimedOutException) —
at Microsoft.Exchange.Cluster.Replay.DagHelper.ThrowDagTaskOperationWrapper(Exception exception)
at Microsoft.Exchange.Cluster.Replay.DagHelper.AddDagClusterNode(AmServerName mailboxServerName, String& verboseLog)
at Microsoft.Exchange.Cluster.ReplayService.ReplayRpcServer.c__DisplayClass34.b__33()
at Microsoft.Exchange.Data.Storage.Cluster.HaRpcExceptionWrapperBase`2.RunRpcServerOperation(String databaseName, RpcServerOperation rpcOperation)
— End of stack trace on server (SAJDHQEX01.x.x.com) —
at Microsoft.Exchange.Data.Storage.Cluster.HaRpcExceptionWrapperBase`2.ClientRethrowIfFailed(String databaseName, String serverName, RpcErrorExceptionInfo errorInfo)
at Microsoft.Exchange.Cluster.Replay.ReplayRpcClientWrapper.RunRpcOperationDbName(AmServerName serverName, String databaseName, Int32 timeoutMs, IHaRpcExceptionWrapper rpcExceptionWrapperInstance, InternalRpcOperation rpcOperation)
at Microsoft.Exchange.Cluster.Replay.ReplayRpcClientWrapper.RunRpcOperation(AmServerName serverName, Nullable`1 dbGuid, Int32 timeoutMs, IHaRpcExceptionWrapper rpcExceptionWrapperInstance, InternalRpcOperation rpcOperation)
at Microsoft.Exchange.Cluster.Replay.ReplayRpcClientWrapper.RunAddNodeToCluster(AmServerName serverName, AmServerName newNode, String& verboseLog)
at Microsoft.Exchange.Management.SystemConfigurationTasks.AddDatabaseAvailabilityGroupServer.JoinNodeToCluster()
[2013-04-01T10:35:16] Updated Progress ‘Done!’ 100%.
[2013-04-01T10:35:16] COMPLETED
add-databaseavailabiltygroupserver explicitly called CloseTempLogFile().
Any help will be appriciated. There are Juniper Firewall in place, but at the moment everyting is opne.
April 1st, 2013 at 3:33 pm
Do you have Dag name and IP host record in DNS?
Do you have a DC/GC in the DR site?
Do you have DHCP client service running?
Disable your firewall and also IPv6.
Check the blogs answer – http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/71960757-66fc-4aea-81ba-3783a48401a0/
Look at the extract from log, it looks like we are missing DNS configuration.
—————–
[2013-04-01T10:35:16] Found a matching exception: Microsoft.Exchange.Cluster.Replay.DagTaskValidateNodeTimedOutException: A database availability group administrative operation failed. Error: Windows Failover Clustering timed out while trying to validate server ‘SAJDDREX01′. If this is in a disjoint DNS namespace, the DNS suffixes for all servers in the database availability group must be present on every server.
—————-
April 26th, 2014 at 7:36 am
Very useful artical…
July 11th, 2016 at 8:46 pm
Hi Prabhat,
I have some doubt regarding to configure the DAG to another datacenter. Like we have two datacenter.
One is in NY for Production and second one is in Nairobi. Kindly advise me How I can configure the DAG resiliency to another datacenter. SO I can do the site failover to exchange from production to DR site.
Please advise.
Regards
Anil Bhardwaj.
July 12th, 2016 at 12:31 am
Do you have exchange 2010 or higher?
Same Infra configuration in both data center will let you do this but it all depends on every infra. We might need to customize some configurations. I would suggest taking our professional advisory services by emailing me at Prabhat.nigam@goldenfive.net
July 12th, 2016 at 12:54 pm
Hi Prabhat, I have sent you the email at Prabhat.nigam@goldenfive.net.