Clustering with EXPRESSCLUSTER - fukunagt/Exchange-Server-2013 GitHub Wiki

Index

Disclaimer

The information in this site is "AS IS" with no warranties, and confers no rights. Anyway, enjoy this page!

About This Page

This page describes how to create a Exchange Server 2013 cluster with EXPRESSCLUSTER X. The official documentation is available on http://www.nec.com/en/global/prod/expresscluster/en/support/Setup.html.

Evaluation Environment

I have created a 2-nodes cluster with single Active Directory as below. I have evaluated Act/Std and Act/Act cluster. I hope you can create a 3-nodes or more-nodes cluster with following steps. If you can create that kind of many-nodes cluster, please let me know.

+--------------------------+
| Active Directory         |
| - Windows Server 2012 R2 |
+--------------------------+
 |
 |  +--------------------------+
 +--| Cluster Node #1          |
 |  | - Windows Server 2012 R2 |
 |  | - Exchange Server 2013   |
 |  |   Mailbox                |
 |  |   Client Access          |
 |  | - EXPRESSCLUSTER X 3.2   |
 |  +--------------------------+
 |
 |  +--------------------------+
 +--| Cluster Node #2          |
 |  | - Windows Server 2012 R2 |
 |  | - Exchange Server 2013   |
 |  |   Mailbox                |
 |  |   Client Access          |
 |  | - EXPRESSCLUSTER X 3.2   |
 |  +--------------------------+
 |
 |  +--------------------------+
 +--| Client Machine           |
    | - Windows Server 2012 R2 |
    | - Office 2013            |
    +--------------------------+

Active Directory

  • Windows Server 2012 R2 Datacenter

Cluster Nodes

  • Windows Server 2012 R2 Datacenter
  • Exchange Server 2013 Enterprise CU6
  • EXPRESSCLUSTER X 3.2

Client Machine

  • Windows Server 2012 R2 Datacenter
  • Office Professional Plus 2013

Prerequisites for Exchange Server 2013

Please visit the TechNet.

Anyway, you need a lot of memory. In my lab, I need at least 6 GB to run Exchange Server services smoothly. He (or She) is so greedy... At last, I prepared 8 GB for him (or her).

Prerequisites for EXPRESSCLUSTER X

  1. Partitions for data mirroring
  2. Cluster partition: This partition is needed to control data mirroring. You need at least 17 MB for this partition.
  3. Data partition: A mailbox database file and log must be saved on this partition.

For more information, please visit NEC website and refer to Getting Started Guide and Installation and Configuration Guide.

Install Exchange Server

  1. Install Mailbox and Client Access Server roles on a primary cluster node.
  2. Install Mailbox and Client Access Server roles on a secondary cluster node.
  3. Stop and disable Microsoft Exchange Search Host Controller (HostControllerService) on both nodes using Service Control Manager (services.msc).

Check and Change Execution Policy for PowerShell

  1. Log on all cluster nodes.
  2. Launch PowerShell prompt.
  3. Check the current execution policy using Get-ExecutionPolicy.
  4. Set Unrestricted or RemoteSigned using Set-ExecutionPolicy.
PS > Get-ExecutionPolicy
Unrestricted
PS > Set-ExecutionPolicy RemoteSigned

Copy RemoteExchange.ps1 and Modify It

  1. Move to Exchange install folder (ex. C:\Program Files\Microsoft\Exchange Server\V15\Bin) .
  2. Copy RemoteExchange.ps1 and rename it to RemoteExchange-ECX.ps1.
  3. Add .\ControlMailboxDatabase.ps1 to RemoteExchange-ECX.ps1. And I recommend you to comment out get-exbanner and get-tip.
  4. Please do the same steps on the other cluster node.
## now actually call the functions 

#get-exbanner 
#get-tip 

#
# TIP: You can create your own customizations and put them in My Documents\WindowsPowerShell\profile.ps1
# Anything in profile.ps1 will then be run every time you start the shell. 
#
$ErrorControlMailboxDatabase = 90

ControlMailboxDatabase.ps1
if ($LASTEXITCODE)
{
        exit $ErrorControlMailboxDatabase
}
else
{
        exit 0
}

Install EXPRESSCLUSTER

  1. Install EXPRESSCLUSTER on both the primary and secondary node following Installation and Configuration Guide.
  2. Register the licenses.
  3. Restart both nodes.

Create a Base Cluster

  1. Launch any web browser (I like Chrome and Opera, anyway) and access http://primary-node-address:29003.
  2. Start to create a cluster.
  3. Add a secondary node.
  4. Setup a failover group.
  5. Add following group resources.
    1. Floating IP (fip)
    2. Mirror Disk (md)
    3. Virtual Computer Name (vcom)
      • Floating IP and virtual computer name resource are optional for this clustering method. If you want to use OWA, these are useful for the user to access to a mailbox. But, if you want to use just only Outlook, these resource are not needed.
  6. Add any monitor resource if you want to setup.
  7. Apply the cluster configuration that you have created.
  8. Start a cluster.
  9. Wait for the initial full copy of the mirror disk to be completed.

Create a Mailbox Database

  1. Log on a node on which a mirror disk resource is running.
  2. Create a directory on a mirror disk partition (ex. X:\Mailbox\DB01).
  3. Launch Exchange Management Shell.
  4. Use New-MailboxDatabase cmdlet to create a mailbox database on a mirror disk partition.
  5. Use Set-MailboxDatabase cmdlet to change MountAtStartup type from True to False.
  6. If the mailbox database is mounted, please dismount it.
PS > New-MailboxDatabase -Name DB01 -Server node1 -EdbFilePath X:\Mailbox\DB01\DB01.edb -LogFolderPath X:\Mailbox\DB01
PS > Set-MailboxDatabase -Identity DB01 -MountAtStartup $False
PS > Dismount-Database -Identity DB01

Setup Mailbox Users

  1. Launch any web browser and access to Exchange Control Panel (ECP, https://primary-node-address/ecp).
  2. Log on ECP with Administrator account.
  3. On left pane, click recipients.
  4. On right pane, click mailboxes
  5. Click Plus icon [+] and select User mailbox.
  6. Fill some parameters and click More options in the bottom of the window.
  7. Click Browse and select the mailbox database that you created.

Setup Scripts to Control a Mailbox Database

  1. Copy following scripts from the repository to your PC.
    • CheckExchangeServices01.bat
    • CheckExchangeServices02.bat
    • CheckExchangeServices.ps1
    • ControlActiveDirectory01.bat
    • ControlActiveDirectory02.bat
    • ControlActiveDirectory.ps1
    • ControlMailboxDatabase01.bat
    • ControlMailboxDatabase02.bat
    • ControlMailboxDatabase.ps1
    • SetEnvironment.bat
  2. Check and change parameters to match your cluster environment in SetEnvironment.bat.
  3. Copy the all scripts to EXPRESSCLUSTER bin path (ex. C:\Program Files\EXPRESSCLUSTER\bin) on all cluster nodes.
  4. Stop the failover group on WebManager.
  5. Change to Config Mode.
  6. Add 1st application resource (ex. appli-check-service-DB01).
    1. Right click the failover group and click Add Resource.
    2. Select application resource for Type and set a resource name for Name. Then, click Next.
    3. Uncheck the box of Follow the default dependency and click Next.
    4. Check Retry Count or Failover Threshold and click Next.
    5. Check Non-Resident and set following parameter for Start Path. Then, click Finish.
      • Start Path: CheckExchangeServices01.bat
      • Stop Path: (NULL)
    6. Click Tuning and set 3600 or longer for Timeout for Start. By default, the application resource waits 1800 (= RetryCount x RetryInterval) seconds for all Exchange services to be running. If any services are not running, the application resource starts them and waits 1800 seconds for them to be running. Services can take up to 3600 seconds to start. It is recommended to set the Timeout value to 3600 or longer (= RetryCount x RetryInterval + some buffer).
    7. Set 0 for Normal Return Value.
  7. Change dependency of the floating IP resource (ex. fip-DB01).
    1. Right click the floating IP resoruce and click Property.
    2. Click Dependency tab.
    3. Uncheck the box of Follow the default dependency. Then, select the 1st application resource (ex. appli-check-service-DB01) and click Add.
    4. Click OK.
  8. Add 2nd application resource (ex. appli-control-AD-DB01).
    1. Right click a failover group and click Add Resouce.
    2. Select application resource for Type and set a resource name for Name. Then, click Next.
    3. Uncheck the box of Follow the default dependency. Then, select the virtual computer name resource (ex. vcom) and click Add. After that, click Next.
    4. Check Retry Count or Failover Threshold and click Next.
    5. Check Non-Resident and set following parameter for Start Path. Then, click Finish.
      • Start Path: ControlActiveDirectory01.bat DB01
      • Stop Path: (NULL)
    6. Click Tuning and set 0 for Normal Return Value on the Parameter tab.
    7. Click the Start tab and set the following parameters.
      • Domain: your domain name
      • Account: a user belonging to the Schema Admins group
      • Password: password for the above user
  9. Change dependency of the mirror disk resource (ex. md-DB01).
    1. Right click the mirror disk resource and click Property.
    2. Click Dependency tab.
    3. Select the 2nd application resource (ex. appli-control-AD-DB01) and click Add.
    4. Click OK.
  10. Add 3rd application resource (ex. appli-control-DB-DB01).
    1. Right click a failover group and click Add Resouce.
    2. Select application resource for Type and set a resource name for Name. Then, click Next.
    3. Uncheck the box of Follow the default dependency. Then, select the mirror disk resource (ex. md-DB01) and click Add. After that, click Next.
    4. Check Retry Count or Failover Threshold and click Next.
    5. Check Non-Resident and set following parameter for Start Path. Then, click Finish.
      • Start Path: ControlMailboxDatabase01.bat DB01 Mount
      • Stop Path: ControlMailboxDatabase01.bat DB01 Dismount
    6. Click Tuning and set 0 for Normal Return Value on the Parameter tab.
    7. Click the Start tab and set the following parameters.
      • Domain: your domain name
      • Account: a user belonging to the Organization Management group
      • Password: password for the above user
    8. Click the Stop tab and set the following parameters.
      • Domain: your domain name
      • Account: a user belonging to the Organization Management group
      • Password: password for the above user
  11. Click Entire Dependency and check it (see below). Then, apply the configuration file.
  12. Change to Operation Mode and start up the failover group.
Depth Resource Name
0 1st application resource appli-check-service-DB01
1 Floating IP resource fip-DB01 (optional)
2 Virtual computer name resource vcom-DB01 (optional)
3 2nd application resource appli-control-AD-DB1
4 Mirror disk resource md-DB01
5 3rd application resource appli-control-DB-DB01

Send and Receive Email Test

Please use Outlook or OWA (Outlook Web App) for send/receive test. And please check you can send/receive emails after failover/failback.

Outlook 2013

  1. Log on your PC with administrators account.
  2. Install Outlook 2013.
  3. Log on your PC with some user account has a mailbox.
  4. Startup Outlook 2013 and set up an account. I recommend Auto Account Setup.

OWA (Outlook Web App)

  1. Startup a web browser.
  2. Access to https://(floating IP address or virtual computer name)/owa.

Appendix

How to Create Active-Active Cluster

If you want to create an Active-Active cluster, you need one more failover group to control the other mailbox databaase. If you use a mirror disk resource, the resources of second failover group will be as follow.

Depth Resource Name
0 1st application resource appli-check-service-DB02
1 Floating IP resource fip-DB02 (optional)
2 Virtual computer name resource vcom-DB02 (optional)
3 2nd application resource appli-control-AD-DB02
4 Mirror disk resource md-DB02
5 3rd application resource appli-control-DB-DB02
  • appli-control-AD-DB02

  • Start Path should be below;

    • Start Path: ControlActiveDirectory01.bat DB02
  • appli-control-DB-DB02

  • Start Path and Stop Path should be as below;

    • Start Path: ControlMailboxDatabase01.bat DB02 Mount
    • Stop Path: ControlMailboxDatabase01.bat DB02 Dismount

How to Debug the Scripts

The standard output of the scripts will be saved EXPRESSCLUSTER log file (ex. C:\Program Files\EXPRESSCLUSTER\log\scrpl*.log).

The Purpose of the Scripts

CheckExchangeServices01.bat

It is to execute CheckExchangeServices02.bat.

CheckExchangeServices02.bat

It is to execute CheckExchangeServices.ps1.

CheckExchangeServices.ps1

It is to check if all Exchange services are running. If any services are not running, this script will start the services and wait for them to be running.

ControlActiveDirectory01.bat

It is to execute ControlActiveDirectory02.bat.

ControlActiveDirectory02.bat

It is to execute ControlActiveDirectory.ps1.

ControlActiveDirectory.ps1

It is to change the following parameters in an Active Directory.

*: This attribute will be primary/secondary server name.

     <Your Domain>
      |
      +-- Configuration
           |
           +-- Services
                |
                +-- Microsoft Exchange
                     |
                     +-- <Your Organization>
                          |
                          +-- Administrative Groups
                               |
                               +-- <Your Administrative Group>
                                    |
                                    +-- Databases
                                         |
                                         +-- <Your Mailbox Database>
                                              | * msExchMasterServerOrAvailabilityGroup
                                              | * msExchOwningServer
                                              | * legacyExchangeDN
                                              |
                                              +-- msExchMDBCopy (in right pane)
                                                   * cn
                                                   * distinguishedName
                                                   * msExchHostServerLink
                                                   * name

ControlMailboxDatabase01.bat

It is to execute ControlMailboxDatabase02.bat.

ControlMailboxDatabase02.bat

It is to execute ControlMailboxDatabase.ps1

ControlMailboxDatabase.ps1

It is to mount/dismount a mailbox database.

SetEnvironment.bat

It is to set some system environments to execute the scripts.