16 C
Dubai
Monday, December 23, 2024

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.

Satheshwaran Manoharan
Satheshwaran Manoharanhttps://www.azure365pro.com
Award-winning Technology Leader with a wealth of experience running large teams and diversified industry exposure in cloud computing. From shipping lines to rolling stocks.In-depth expertise in driving cloud adoption strategies and modernizing systems to cloud native. Specialized in Microsoft Cloud, DevOps, and Microsoft 365 Stack and conducted numerous successful projects worldwide. Also, Acting as a Technical Advisor for various start-ups.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

× How can I help you?