WSFC’s Dynamic Witness in Windows Server 2012 R2

As I noted in a previous blog post “Windows Server 2012 R2 for the DBA: 10 Reasons It Matters”, Windows Server 2012 R2 introduces a new quorum concept: dynamic witness. In fact, the whole notion of quorum has changed a bit in Windows Server 2012 R2 (I’ll save that for another time). In this post I want to focus on dynamic witness only.

For those who don’t know, a witness in context of quorum is that additional “voter”/tie breaker in cases where you have an even number of nodes to ensure that you always have an odd number of votes. Prior to Windows Server 2012 R2, if you lost a node in a Windows Server failover cluster (WSFC), you would manually have to readjust quorum. For example, if you have a three-node WSFC and lost one node, you would still be up and running, but you would be down to two nodes and to get back to odd, you’d have to add some sort of witness in manually. Managing quorum is one of the most important administrative tasks for deploying WSFCs, and one of the most common things I see most environments not do well.

Enter Windows Server 2012 R2. By default, you create a witness when the WSFC is formed no matter how many nodes you have. However, the WSFC will not use the witness unless it needs it. I’m going to show you an example to illustrate how all of this works. In this case, I have a three node WSFC named STYX with the node names of DENNIS, TOMMY, and JY. I have a single clustered instance (FCI) of SQL Server 2014 named GRAND\ILLUSION that is currently running on JY. Figures 1 and 2 show this configuration.

The interesting thing as shown in Figure 1 is that there’s a new parameter for the WSFC: WitnessDynamicWeight. This will either be set to 0 or 1. If it’s 0, no witness is in play. With 1, a witness is being used. It’s really that simple.

Figure 1. All nodes up

Figure 1. All nodes up

 

Figure 2. GRAND\ILLUSION up and running

Figure 2. GRAND\ILLUSION up and running

Let’s say we lose JY which is currently hosting GRAND\ILLUSION. JY fails over to TOMMY as shown in Figure 3.

witness4

Figure 3. GRAND\ILLUSION now running on TOMMY

Now this is where things get interesting. With Windows Server 2012 and earlier, at this point you would see warnings noting with the loss of a node, you would go down. If you look at Figure 4, note that JY is down as I stated, but WitnessDynamicWeight has a value of 1 since we have an even number of nodes, making the total number of voters 3. This means it is using the witness I configured during the initial setup of the WSFC. In other words, the WSFC is managing quorum for me.

Figure 4. W = 1

Figure 4. WitnessDynamicWeight = 1

Now we lose TOMMY and GRAND\ILLUSION is running on DENNIS as shown in Figure 5. Wait, what? We’re down to one node – last man standing – and still running? You bet! This concept is not 100% new – last man standing was possible with Windows Server 2012 in many cases.

Figure 5. GRAND\ILLUSION now on DENNIS

Figure 5. GRAND\ILLUSION now on DENNIS

Figure 6 shows that both JY and TOMMY are down, but DENNIS is left standing alone with the witness disk.

Figure 6. Down to one node, but still running

Figure 6. Down to one node, but still running

Can you override dynamic witness? Sure. Let’s assume you have the same three node WSFC and you want the old behavior. Just get rid of the witness. In the Cluster Cluster Quorum Wizard dialog shown in Figure 7, select the option Do not configure a quorum witness.

Figure X. Removing the witness

Figure 7. Removing the witness

Figure 8 shows the warning that Microsoft gives you when you have no witness in Windows Server 2012 R2.

Figure 8. Warning that there is no witness

Figure 8. Warning that there is no witness

Now let’s look at a similar scenario as above. We lost JY, and GRAND\ILLUSION is on TOMMY as shown in Figure 9. Note that WitnessDynamicWeight has a value of 0 and there is no quorum resource (nee witness) configured.

Figure 9.

Figure 9. Look Ma! No witness

Finally, in Figure 10 we see that TOMMY is down for the count, and DENNIS owns GRAND\ILLUSION. The reason I show the value for WitnessDynamicWeight and no quorum is to show I wasn’t making this up; you’re literally down to last man standing again.

Figure 10. d

Figure 10. Down to last man standing

Like my quick glance at using CSVs with SQL Server 2014, this is a sneak peak at how Windows Server 2012 R2′s dynamic witness along with dynamic quorum introduced in Windows Server 2012 can increase the availability of your FCIs and AGs.

2 Responses to “WSFC’s Dynamic Witness in Windows Server 2012 R2”

  1. [...] 、Windows Server 2012 R2 Preview & System Center 2012 R2 Preview 評価ガイド 、WSFC’s Dynamic Witness in Windows Server 2012 R2 [...]

Leave a Reply