AG force failover to DR, then reconnect to Prod nodes. Will AG keep Prod data or DR data ?

Published Dec 18 2021 07:38 PM 2,454 Views
Microsoft

I made a test in my testing environment. Below are my test results

 

  1. I have 3 nodes in this Alwayson. CPS2019VM3 is DR node. I set firewall rules in VM1 and VM2 to block all network traffics from/to VM3. You can see VM3 became ‘Resolving’ state.

 

Bob_Cai_0-1639884690106.png

 

 

Bob_Cai_1-1639884690121.png

 

 

  1. I forced quorum using below command

 

Bob_Cai_2-1639884690130.png

 

 

  1. Then I made a force failover allow data loss for AG.

 

Bob_Cai_3-1639884690135.png

 

 

 

  1. I updated 1 row in VM3. I want to see if this data will be kept after resuming data movement.

 

Bob_Cai_4-1639884690147.png

 

 

  1. Once I removed firewall rules and 2 subnets are re-connected. The original primary – VM2 became resolving state.  The original secondary – VM1 joined back AG immediately. VM3 was still primary.

 

Bob_Cai_5-1639884690149.png

 

 

  1. After a short while, VM2 joined back AG as secondary. I checked windows cluster. It was not ‘force quorum’ state anymore. The cluster has become normal mode.

 

  1. As I expected, VM1 and VM2 data movement were suspended. If you want to abandon data change in VM1 and VM2. Please just resume data movement. Then above data change will be synchronized to VM1 and VM2.

 

Bob_Cai_6-1639884690152.png

 

 

  1. If you want to keep data in VM1 and VM2, but abandon data in DR. You only need to do a manual failover allow data loss.

 

Bob_Cai_7-1639884690159.png

 

 

 

Conclusion
================

  1. Once you did an AG force failover allow data loss in DR. The DR node will always become primary node after re-connecting. No matter you reboot DR or not.

 

  1. Another 2 nodes in Prod site will join AG as secondary after re-connecting. Windows cluster will become normal quorum instead of force quorum automatically.

 

  1. If you want to keep data in DR, just resume data movement manually in secondary nodes.

 

  1. If you want to keep data in Prod site, do a manual failover allow data loss from DR node to Prod node.

 

Co-Authors
Version history
Last update:
‎Dec 18 2021 07:38 PM
Updated by: