- Published on : 12 July 2019 at 18:10 UTC
When you want to create a cluster on Windows Server, you will see that you will be told about Quorum and witness disk.
In this article, we'll explain what these terms are and what you'll need to pay attention to when you want to create a cluster on Windows Server (whether it's a cluster of file servers, Hyper-V servers, ...).
- What is a Quorum
- How does it work and why use a Quorum
- Modes available on Windows Server
- Dynamic Quorum (since WS 2012)
- Dynamic witness (since WS 2012 R2)
A quorum is the minimum number of voters required to validate a decision.
In the case of a cluster, more than 50% of the voters will have to be present (or available) for the cluster to continue to function.
In the case of a cluster, these voters can be :
- servers (called nodes when they are part of a cluster)
- a witness disk
- OR a witness file share
Using a Quorum in a Microsoft cluster is important because it allows you to provide one or more highly available services without overloading your server resources, as well as discovering faulty servers in a cluster.
To understand this, here is what will happen when using a quorum.
Assuming you create a cluster with 5 servers, at least 3 servers must be available to keep your cluster running.
Indeed, by having 3 servers available on a total of 5 servers, you will have at least 50% of voters available.
Now, if a 3rd server goes down, you'll end up with only 2 servers on a total of 5 servers.
This will cause the shutdown of your cluster.
Indeed, the remaining 2 servers may not be able to host all the services that were hosted by your 5 servers. So, the cluster is stopped to prevent the remaining 2 servers are overloaded and do not end up crashing.
This can be very problematic depending on the services that were hosted by these servers.
In addition, it avoids ending up with 2 separate clusters that would work under the same name thinking that the remaining servers were down.
When using the "Node majority" mode, only the nodes in your cluster will have voting rights.
Using the previous example, this means that you will need at least 3 out of 5 online servers for Quorum to be reached and your cluster to work properly.
Note that in order to be able to obtain a majority using the "Node majority" mode, you should preferably use an odd number of nodes.
Below this number of available servers, the cluster will no longer work.
When using the "Node majority" mode, the nodes of your cluster and a quorum witness will have a voting right.
This mode should preferably be used with an even number of nodes.
If you create a cluster with 4 servers, adding a witness disk (or a witness share) will allow you to have an odd number of voters again (5 in this case).
This will allow you to easily get a majority of voters.
Bref, pour que votre cluster puisse continuer à fonctionner en choisissant ce mode, il faudra qu'au moins 3 votants en sur 5 soient disponibles.
In short, to keep your cluster running by choosing this mode, you must have at least 3 out of 5 voters available.
Finally, you can also choose the mode "No majority (witness disk only)". However, this mode is strongly discouraged because the witness disk will be a single point of failure.
By using this mode, the cluster will be able to function as long as the witness disk is accessible.
This means that all nodes in the cluster (except 1) can fail without shutting down the cluster.
However, if the witness disk is no longer accessible, the cluster will shutdown (even if all servers in the cluster are still online).
By default, the Windows Server wizard will select the mode that best suits your configuration.
For more information on configuring Quorum, refer to the "Configure and manage quorum" page of the Microsoft site.
Since Windows Server 2012, you benefit from dynamic quorum.
Previously, when a witness disk or a node failed, it always counted for quorum.
Which means that if 3 voters are no longer available out of 5 in total, the cluster will stop.
Thanks to the dynamic quorum, the quorum value is dynamically updated.
This means that when a voter is no longer available (for example, if a server goes down), it will lose its voting rights.
In our example cluster with 5 servers, if a server goes down, we will get a quorum of 4/4.
So the cluster will continue to work without problem.
Same if a 2nd server goes down. We will get a quorum of 3/3.
In short, the cluster would stop only when the last node (or the last voter) fails.
This has several advantages :
- this simplifies quorum management for the server administrator, because all you have to do is let Windows Server choose the best quorum mode when you create the cluster.
- this will increase the availability of your cluster and the services it hosts, regardless of the scenario (server failure, scheduled server cluster shutdown, ...)
- and in addition, it's enabled by default
Be aware that this can be disabled with a simple PowerShell command, if you wish :
(Get-Cluster "Cluster name").DynamicQuorum = 0
Since Windows Server 2012 R2, you will also benefit from the dynamic witness.
This new feature (which is enabled by default) allows you to dynamically manage the vote of the the witness disk or share.
In fact, until Windows Server 2012, you had to manually adjust the quorum configuration to keep an odd number of voters and thus get a majority of voters in your cluster.
Now, thanks to the dynamic witness, the right to vote of the witness disk or share will be dynamically managed to automatically keep an odd number of voters.
However, for this to be possible, you will need to set up a witness disk or share for your cluster (even if you already have an odd number of nodes in your cluster.
To find out whether the witness disk or share of your cluster currently has voting rights, use this PowerShell command :
(Get-Cluster "Cluster name").WitnessDynamicWeight