Thursday , April 19 2018

Exchange Datacenter Switchover

I had to do a Exchange Datacenter Switchover Procedure on a 3 Node Dag. Two on primary site and one on Secondary site.

Primary datacenter needs maintenance and both primary nodes have to go offline. so we had to do a datacenter switchover prior to the primary datacenter maintenance . The procedure is simple if you plan it properly. lets see the aspects we checked. Before the maintenance of the primary datacenter.

  • Made Outbound Mail flow to go via the secondary site.
  • Made MX Records / Inbound Mail flow to come via the secondary site.
  • Public DNS Records changed to the secondary site.

We made sure DAC mode is Enabled with Value DagOnly.It will avoid the split  brain syndrome across these nodes.

Get-DatabaseAvailabilityGroup -Identity DAGNAME | Fl Name,DatacenterActivationMode

image

To Enable DAC – you can set it with

Set-DatabaseAvailabilityGroup -Identity DAGNAME -DatacenterActivationMode DagOnly

Make sure witness server and Alternate witness server is specified

image

Make sure no activation block is set on any mailbox servers

To Check

Get-MailboxServer | fl name,DatabaseCopy*

image

All Activation block has been removed

Get-MailboxServer | Set-MailboxServer –DatabaseCopyAutoActivationPolicy "Unrestricted"

image

Check where the quorum and move to secondary site

Get-ClusterGroup "Cluster Group"

Its showing my primary site server.

image

So we moved it to the secondary site

Get-ClusterGroup “Cluster Group” | Move-ClusterGroup –Node SECONDARYSERVERNAME –Verbose

image

Moved all the active databases to Secondary Server

Get-Mailboxdatabase | Move-ActiveMailboxDatabase –ActivateOnserver SECONDARYSERVERNAME

image

Now

Stop-DatabaseAvailabilityGroup –Identity DAGNAME  –ActiveDirectorySite "Default-First-Site-Name"

To check your site name

nltest /dsgetsite

To check on Completion

Get-DatabaseAvailabilityGroup –Status

Stopped Dag nodes will be removed from Operational server list.

image

Now go to your secondary site server – Run

Stop-Service clussvc

image

Ran below on Secondary site

Restore-DatabaseAvailabilityGroup DAGNAME –ActiveDirectorySite "SECONDARYSITENAME"

Now Alternate witness become active and it formed a single node cluster without the primary site servers and databases stayed active on secondary site as we moved prior.

image

Opening Failover cluster to verify the same.

image

Now Primary servers can be safely turned off

Once Maintenance is over in the primary datacenter. Run below

Start-DatabaseAvailabilityGroup DAGNAME –ActiveDirectorySite "Default-First-Site-Name"

image

Failover Cluster is Back to Normal

If you see witness is not changing back to normal . you can run

Set-DatabaseAvailabilityGroup DAGNAME

Note :

Odd Nodes – no witness server works on node majority

Even Nodes – works with a witness server to act as a node.

image

Make sure Quorum is moved back to primary site

Get-ClusterGroup "Cluster Group"
Get-ClusterGroup "Cluster Group" | Move-ClusterGroup –Node PRIMARYSERVERNAME –Verbose

Now make sure all copies are healthy or you can update it with

Update-mailboxdatabaseCopy "Databasename\server" –DeleteExistingFiles

image

Make sure Mail flow and Public DNS changes is done via the primary site.

Datacenter Switch-over process has been successfully completed.

About Satheshwaran Manoharan

Satheshwaran Manoharan is an Microsoft Exchange Server MVP , Publisher of CareExchange.in
Supporting/Deploying/Designing Microsoft Exchange for some years.
Extensive experience on Microsoft Technologies.

Check Also

SQL 2008 R2 In place Upgrade to SQL 2014

I have a SCCM Database server running Windows Server 2012 R2 with SQL 2008 R2 ...

Leave a Reply

Your email address will not be published.