In the fourth part of the expansion of the small Exchange organization, it's DAG's turn. The domain controller and Sophos UTM are already running redundantly and the second Exchange server has also been prepared. An Exchange DAG (Database Availability Group) is now required so that the failure of an Exchange server or the failure of the Hyper-V / ESX server can also be intercepted.
Foreword
For the DAG with two Exchange servers, an additional Windows server is required as a witness server. The witness server must not run on one of the two hypervisors that also host the Exchange servers. In the environment I have described, a third physical server (Server 3) is therefore required:
The witness server is required to determine which Exchange server has failed and which is the remaining Exchange server. The witness server does not have to fulfill any special hardware requirements, only a few small files will be stored here later.
Background witness server
Die DAG basiert auf dem Windows Failover Cluster Feature und der Windows Failover Cluster arbeitet nach dem „Stimmenprinzip“. Vereinfacht gesagt: Jedes Cluster Mitglied erhält eine Stimme, innerhalb des Clusters muss immer die Stimmenmehrheit gewährleistet sein, sonst wird der Betrieb eingestellt. Im Falle von zwei Exchange Servern, hat also jeder Exchange Server 1 Stimme, fällt nun einer der Exchange Server aus, fällt somit auch eine Stimme weg. Der Cluster würde seinen Betrieb einstellen, da die Mehrheit nicht mehr gegeben ist. Die eine verbleibende Stimme ist eben nicht die Mehrheit, wir bräuchten also mehr als 50% der Stimmen.
This is where the witness server comes into play. The witness server gets 0.5 votes. With two Exchange servers and one witness server, the entire cluster therefore has 2.5 votes. If one Exchange server fails, 1.5 votes remain. This means that the majority is maintained and everything is fine. The reason for the majority is simple: a failover can only be carried out if it is clear which of the two servers has failed.
The horror scenario: Somewhere a switch or uplink fails, Exchange1 can no longer communicate with Exchange2, Exchange1 thinks it has to bring the passive database online, Exchange2 also thinks it has to bring the passive database online. Without a witness server, we would have active databases on both Exchange servers and inevitably corrupt data. To avoid this, the witness server is asked and the majority is determined.
Configuration of the witness server
Hardly anything needs to be prepared on the witness server. It is sufficient to install Server 2012 R2 and add it to the Active Directory. I have installed the server fs.frankysweb.org with the IP 172.16.100.17.
When configuring the network, make sure that both DNS servers are specified:
Damit das Zeugenverzeichnis durch Exchange konfiguriert werden kann, muss noch die Gruppe „Exchange Trusted Subsystem“ zur Gruppe der lokalen Administratoren hinzugefügt werden:
That's all, let's continue with the configuration of the DAG.
Exchange DAG configuration
The DAG can now be configured on one of the two Exchange servers
Once the DAG has been created, the two Exchange servers can be added:
After a short time, the servers have been added and the dialog can be closed.
It should now look like this in the EAC:
Eine DAG mit dem Namen „FWDAG1“. Die Server mit dem Namen „Exchange“ und „Exchange2“ sind Mitglieder, Zeugenserver ist „FS“.
Configuration of database copies
A copy of each of the two databases must now be added to the other Exchange server:
Für die Datenbank „MailboxDB“ wird also eine Kopie auf „Exchange2“ konfiguriert:
Für die zweite Datenbank wird ebenfalls eine Kopie auf dem Server „Exchange“ hinzugefügt:
After the copies have been added, it should look something like this:
After the copies have been added, the status can be checked.
Review
Before a failure can be tested, it should be checked whether the mailbox copies and the index are in order:
Get-MailboxDatabaseCopyStatus -Server exchange Get-MailboxDatabaseCopyStatus -Server exchange2
- One of my indexes was damaged. I have recreated the index:
Using the following command, the index can then be transferred to the second server (if the index is defective on both servers)
Update-MailboxDatabaseCopy MailboxDB\EXCHANGE2 -CatalogOnly
The failure
The most important test is, of course, the failure of an entire server. In this case, a domain controller, an Exchange server and a Sophos UTM are no longer available at the same time. I test the failure of Server1:
Auf Server1 befindet sich die aktive Sophos UTM, ein Domain Controller und der Exchange Server mit der aktiven Datenbank „MailboxDB“ in der das Administrator Postfach gespeichert ist. In meinem Fall passiert also ein Failover des UTM Clusters und ein Failover der Postfachdatenbank „MailboxDB“. Zur Erinnerung, ein Loadbalancer für Exchange wird nicht eingesetzt. Das Ergebnis könnt ihr euch im Video anschauen:
Oben rechts läuft ein Ping gegen den Domain Controller „DC“, in der Mitte ein Ping zum Exchange Server. Oben links läuft ein Ping zu meinem Blog und unten links der Ping zur UTM. Beim Ausfall von Server1 übernimmt die passive UTM nach kurzer Zeit, hier geht nur ein Ping verloren. Exchange Server und Domain Controller bleiben offline, Outlook bekommt von all dem nichts mit. Das Failover auf Exchange2 war erfolgreich:
Conclusion
There is no short conclusion at this point. There is a more detailed article on the pros and cons and the unresolved problems.