MSExchangeGuru.com

Learn Exchange the Guru way !!!

 

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.

  1. Login to one of the HT/CAS server
  2. Create a folder like C:FSW_DAG1
  3. 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

  1. DAG Name(This will be the name of the cluster): something like

DAG01

  1. Witness Server: This is the server where we have created the FSW. Type the FQDN here of the server. Like

    servername.domainname.com

  2. Witness Directory: This is the FSW directory path which will be something like

    “C:Foldername”

  3. Click next, new and Finish on the completion page
  4. We have created our DAG.
  5. 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

  1. Go to the properties of the DAG and select IP address tab
  2. 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

  1. In EMC right click our DAG and select manage database availability group

  1. On the manage database availability group page click the Add button

  1. In the select mailbox server window select the both mailbox servers
  2. 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

  1. Click finish on the completion page

  1. We can now see that both servers are added to the DAG. Something like below screen

  1. 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.
  2. 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

  1. Go to the Exchange management console àOrganization configurationàMailboxàDAG Tab. Below you will see networks.
  2. Select the Production network à go to properties and uncheck the checkbox “Enable Replication”.

  3. Click ok.
  4. 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:

  1. Launch the Exchange Management Shell
  2. To dismount the database, run the following command:

    Dismount-Database “Mailbox Database <GUID>”

  3. To change the mailbox database name run the following command:

    Set-MailboxDatabase “<Old DB Name>” –Name “<New DB Name>”

  4. 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>”

  5. To mount the database, run the following command:

    Mount-Database “<New DB Name>”

  6. Repeat the steps for all databases.
  7. 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

  1. Launch the Exchange Management Shell
  2. 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.

  1. This will create a new database on the second server. Follow the same steps on all databases.
  2. To check the log copy status run the following cmdlet:

    Get-Mailboxdatabasecopystatus –identity <Databasename>


Prabhat Nigam (Wizkid)
Team@ MSExchangeGuru

14 Responses to “Exchange 2010 DAG implementation & Configuration”

  1. Mada Says:

    Excellent

  2. Wizkid Says:

    Thank you Mada

  3. Create your social networking links fast! Says:

    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.

  4. Nithin Says:

    Well written Prabhat.

  5. Used EMC Clariion Says:

    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?

  6. Prabhat Says:

    Thank you guyz. Please feel free to write me at prabhat.nigam@gmail.com

  7. Ashok Says:

    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.

  8. Prabhat Says:

    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

  9. ZAHOOR Says:

    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.

  10. Prabhat Says:

    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.
    —————-

  11. Akash Says:

    Very useful artical…

  12. Anil Bhardwaj Says:

    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.

  13. Prabhat Nigam Says:

    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

  14. Anil Bhardwaj Says:

    Hi Prabhat, I have sent you the email at Prabhat.nigam@goldenfive.net.

Leave a Reply

Categories

Archives

MSExchangeGuru.com