- Published on : 26 July 2019 at 17:26 UTC
Since Windows Server 2012 R2, a new feature has appeared for managing failover clusters.
This feature is called "Dynamic witness" and allows you to fix a recurring problem that has arisen so far.
Indeed, for your cluster to work properly, you must first choose a quorum mode adapted to your configuration (including the number of nodes used in your cluster).
The goal is to obtain preferably an odd number of voters to obtain a majority more easily. For that, it was enough to add a witness disk or share when it was necessary.
Except that in the event of a server failure, you end up with an even number of nodes. Which was a problem.
In this case, we could (and we can always, but it will not be necessary any more) add or remove a witness disk / share to have an odd number of voters.
To overcome this problem, Microsoft has created the "Dynamic Witness" feature that allows you to dynamically add or remove the vote right of the witness disk to automatically keep an odd number of voters and thus be able to keep more easily a majority of voters.
For more information about the dynamic witness, see our article : Windows Server 2012 / 2012 R2 - What are the different types of quorum
To test this new feature, we used the same configuration as in our first tutorial (Create a failover cluster of file servers) except that our servers are now running Windows Server 2012 R2 instead of Windows Server 2012.
The first difference is that the "Quorum configuration" line has disappeared from the summary in the Failover Cluster Manager.
And a line "Witness" has appeared with the value "Disk (Witness)".
Because the voting privilege of the witness disk / share will be dynamically managed, it's recommended to use a witness disk / share for your cluster.
If it's preferable to use a witness, a voting right will be granted to him and if not he will be removed dynamically.
In short, since Windows Server 2012 R2, you create your cluster, you set a witness disk / share and finally you will have nothing to do.
The configuration will dynamically adapt so that the quorum of your cluster is good.
If you view the nodes of your cluster, you will see that by default, each node has a assigned vote and a current vote.
To find out if the witness disk in your cluster currently has voting rights, just use this powershell command :
(Get-Cluster "Cluster name").WitnessDynamicWeight
In our case, since we already have an odd number of nodes (and they are currently online), the witness disk of our cluster has no voting right :
Let's stop a cluster server to see what happens.
The stopped node loses its voting right (thanks to the dynamic quorum implemented since WS 2012 and which is enabled by default).
Which means that we end up with an even number of voters (our 2 nodes).
But if you check the voting rights of your witness disk (thanks to the previous powershell command), you will see that it now has a voting right.
So we always have an odd number of voters (our 2 nodes online + the witness disk that has recovered its voting right).
Let's stop a second node.
We see that the remaining node that is still online has lost its right to vote.
But if you check the voting status for the witness disk, you'll see that it's still on.
So, you still have a vote to keep your cluster running.
Of course, if the last node fails, nothing will work.
Hence the "Loading ..." status.
And the cluster will become permanently inaccessible.