LinkedInTwitterRSS

WSFC’s Dynamic Witness in Windows Server 2012 R2

By on Jul 2, 2013 in AlwaysOn, availability groups, failover clustering, FCI, quorum, SQL Server, Windows Server 2012, Windows Server 2012 R2, Witness | 1 comment

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 GRANDILLUSION 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. GRANDILLUSION up and running

Figure 2. GRANDILLUSION up and running

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

witness4

Figure 3. GRANDILLUSION 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 GRANDILLUSION 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. GRANDILLUSION now on DENNIS

Figure 5. GRANDILLUSION 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 GRANDILLUSION 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 GRANDILLUSION. 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.

    1 Comment

  1. Allan,
    Thank you for this great article. In regards to Figure 6., the 2 nodes are down, one has current vote as 0(JY) and other still has current vote 1(TOMMY). Why so? Does even failed node do the voting?
    Please elaborate.

    Thank You
    Naveen

    Naveen

    April 9, 2014

Trackbacks/Pingbacks

  1. Week of July 15: Clustering Server Workloads, Updated Windows Server 2012 Rollup, Changes to Group Policy, and Practical Powershell with Windows Server MVPs - Server and Cloud Partner and Customer Solutions Team Blog - Site Home - TechNet Blogs - [...] WSFC’s Dynamic Witness in Windows Server 2012 R2 [...]
  2. Windows Server 2012 R2 の Dynamic Witness を 2012 と比較しながら確認してみる | SE の雑記 - [...] 、Windows Server 2012 R2 Preview & System Center 2012 R2 Preview 評価ガイド 、WSFC’s Dynamic Witness in Windows Server 2012 …

Post a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>