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.
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
Witness Server: This is the server where we have created the FSW. Type the FQDN here of the server. Like
Witness Directory: This is the FSW directory path which will be something like
- 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)