Monday, February 10, 2014

Windows Server 2012 R2 dynamic quorum enhancement

In Windows Server 2012, Microsoft added a dynamic quorum feature in Failover Clustering. Dynamic quorum is applied to increase high availability of cluster itself. It can work with "Node Majority", "Node and Disk Majority" and "Node and File Share Majority". By default, Dynamic quorum is enabled for clusters. After enabled Dynamic quorum, cluster can now survive with only 1 node (Last Man Standing) in all other nodes failure environment. In previous version, the cluster active nodes must be greater than 50%. If not, the cluster stop running.

In Windows Server 2012 R2, Microsoft added Dynamic witness to work with a cluster which is configured to use dynamic quorum. Dynamic witness automatically adjust witness vote based in active cluster membership so Microsoft suggested that administrators add witness in a cluster and don't need to care about the cluster with odd or even nodes after enabling Dynamic witness in Windows Server 2012 R2 failover cluster environment.

There are some changes in the Failover Cluster Manager console. We will have a look at the console and PowerShell cmdlets.

There are 3 cluster nodes in my lab environment and I configured "Node Majority" cluster quorum settings.

"Witness: None" is "Node Majority".

Administrators also can perform "Get-ClusterQuorum | FL *" to verify the quorum type.


In Failover Cluster Manager console, the nodes window has been updated. Now, it shows current vote and assigned vote information to administrators. Administrators know which node participate the vote of this cluster.


To verify the "Dynamic Quorum" and "Dynamic Witness", administrators can perform "Get-Cluster | Ft Name, DynamicQuorum, WitnessDynamicWeight -Autosize" in PowerShell.


DynamicQuorum 1 is enabled and there is no witness in my lab environment so Witness DynamicWeight is 0.

In Windows Server 2012, administrators can change "Dynamic Quorum" in a wizard of Failover Cluster Manager. However, administrators need to perform cmdlet to disable "Dynamic Quorum" in Windows Server 2012 R2.

To disable "Dynamic Quorum", perform "(Get-Cluster).DynamicQuorum = 0" in PowerShell.


Remark: WitnessDynamicWeight cannot be modifed. It controls by cluster itself.

Now, I added a disk to be  the witness of CU01.



"Quorum type" has been updated.

Besides, Microsoft recommended that administrators don't need to assign drive letter for the quorum disk.


Administrators can change the drive letter under "Cluster Core Resources".

In my lab environment, 3 Nodes + Witness disk = 4 votes. It may cause split-brain.  However, the cluster is enabled "Dynamic Quorum" and "Dynamic Witness". The cluster automatically adjust the witness vote = 0 that's mean witness disk doesn't participate vote.

Perform "Get-Cluster | Ft Name, DynamicQuorum, WitnessDynamicWeight -Autosize" in PowerShell to verify it.


Now, I will stop cluster service in one of nodes.



Perform "Get-Cluster | Ft Name, DynamicQuorum, WitnessDynamicWeight -Autosize" in PowerShell to verify it again.


To prevent split-brain, the cluster automatically adjust the witness vote = 1 that's mean witness disk participates vote.

Now, I change the Witness to "Node and File Share Majority".



"Quorum type" has been updated.

Besides, the Share permission and NTFS permission of a folder which is stored the quorum should assign "Write" permission for cluster name object (CNO) and the file server is not in the same cluster node.



Perform "Get-Cluster | Ft Name, DynamicQuorum, WitnessDynamicWeight -Autosize" in PowerShell to verify it again.


Remark: If you have explicitly removed the vote of a node, the cluster cannot dynamically add or remove that vote.



In the above tests, we can see the enhancement of dynamic quorum.

More information:
Failover Clustering: Quorum Model Design for Your Private Cloud

What's New in Failover Clustering in Windows Server 2012 R2

Windows Server 2012 Failover Clustering Dynamic Quorum - Revisited

Windows Server 2012 Failover Clustering Dynamic Quorum

Configure and Manage the Quorum in a Windows Server 2012 Failover Cluster

This posting is provided “AS IS” with no warranties, and confers no rights!

8 comments:

  1. excellent explanation and recap. thanks, save tons of my time !

    ReplyDelete
    Replies
    1. Thanks for your comment. I hope it can help you.

      Delete
  2. We had two node cluster with file share witness. We lost both file share and a node. The cluster was down and it was up as soon as it had access to file share. Why last node standing doesn't come into picture over here? I am kind of lost over here. Where it is exactly useful?

    ReplyDelete
    Replies
    1. Are the node and file share downed simultaneously?
      If yes, the answer is dynamic quorum works when the failure nodes are downed sequentially rather than simultaneously.
      After the node is down, the cluster need to take time to recover and recalculate the quorum for the existing cluster.

      Delete
  3. Thanks Terry for the reply. Actually we have a 3 node cluster with file share witness. As one of the node was in a different data center we removed the vote for that node in the cluster. With existing two node and file share witness, we applied patches on secondary replica and restarted the secondary replica. At the same time we lost access to file share witness. Not sure if both happened at the same time or we lost the access to file share witness before. But as soon as we hit the restart button the alerts started popping up.

    ReplyDelete
    Replies
    1. As mentioned, after the node is down, the cluster need to take time to recover and recalculate the quorum for the existing cluster. if both happened at the same time, it may crash the cluster of your scenario.

      Delete
  4. If there are just two nodes in the cluster and dynamic quorum is enabled do we need to have a witness at all?

    ReplyDelete
    Replies
    1. For best practice design, witness is required.

      Delete