Exchange 2010 – File Share Witness oddities…

In Exchange 2010 when a Database Availability Group (DAG) it utilized, and there is an even number of DAG members, the underlying cluster is implemented utilizing the quorum type Node and File Share Majority. The settings utilized for the File Share Witness are defined on the DAG when the logical DAG object is created and are either set by the administrator or automatically defined.

To verify the quorum type you can use either cluster.exe or cluster powershell extensions (Preferred)

Cluster.exe <cluster> /quorum (Windows 2008 & Windows 2008 R2)

Cluster.exe cluster.domain.com /quorum

Witness Resource Name Path Type

--------------------- --------------------------------------------- --------

File Share Witness (\\HT-1.DOMAIN.COM\DAG.DOMAIN.COM) Majority

Get-Cluster <cluster> | Get-ClusterQuorum | FL (Windows 2008 R2 Only)

Cluster : DAG
QuorumResource : File Share Witness (\\HT-1.DOMAIN.COM\DAG.DOMAIN.COM)
QuorumType : NodeAndFileShareMajority

In Failover Cluster Manager, the resources can be viewed by looking at the Cluster Core Resources.

image

It may become necessary to change the server hosting the file share witness. In Exchange 2010 this is not done utilizing Failover Cluster Manager, but rather utilizing the set-databaseavailabilitygroup commandlet. It is after the witness server is successfully updated that the oddity occurs. Here’s an example:

Currently the DAG utilizes the witness server HT-1. Using the set-databaseavailabilitygroup command the witness server is changed to HT-2. (set-databaseavailabilitygroupserver –witnessServer HT-2) The command returns without error. When running the previous cluster commands the following output is noted:

Cluster.exe cluster.domain.com /quorum (Windows 2008 and Windows 2008 R2)

Witness Resource Name Path Type

--------------------- --------------------------------------------- --------

File Share Witness (\\HT-1.DOMAIN.COM\DAG.DOMAIN.COM) Majority

Get-Cluster <cluster> | Get-ClusterQuorum | FL (Windows 2008 R2 Only)

Cluster : DAG
QuorumResource : File Share Witness (\\HT-1.DOMAIN.COM\DAG.DOMAIN.COM)
QuorumType : NodeAndFileShareMajority

Also in Failover Cluster Manager the following is noted in the cluster core resources group.

image

After looking at this output the administrator could be lead to believe that the witness server did not successfully update. After all both cluster.exe and powershell both show the File Share Witness (\\HT-1.DOMAIN.COM\DAG.DOMAIN.COM). It is only in Failover Cluster Manager, if the windows is fully expanded, that you can see both (\\HT-1.DOMAIN.COM\DAG.DOMAIN.COM) and (\\HT-2.DOMAIN.COM\DAG.DOMAIN.COM). This leads administrators to believe that two file share witness servers are currently in use.

Thankfully both of these perceived conditions are false. The command was both successful in changing the witness server and only one file share witness is in use.

Each cluster resource has a display name and a set of public and private properties. Unfortunately when using set-databaseavailabilitygroup to change the witness server, the File Share Witness resource private property for where the witness is stored is updated but the public property display name, which contains the previous witness server, is not. Let’s take a look at this further.

Using cluster.exe or powershell I can review the private properties of the File Share Witness resource. (Command output truncated to show relevant values only.)

Cluster.exe <cluster> res <resource> /priv <or> /prop (Windows 2008 & Windows 2008 R2)

Cluster.exe cluster.domain.com res “File Share Witness (\\HT-1.domain.com\DAG.domain.com)" /prop

Listing properties for 'File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)':

T Resource Name Value

-- -------------------- ------------------------------ -----------------------

SR File Share Witness (\\HT-1.domain.COM\DAG.domain.COM) Name File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)

Cluster.exe cluster.domain.com res “File Share Witness (\\HT-1.domain.com\DAG.domain.com)" /priv

Listing private properties for 'File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)':

T Resource Name Value

-- -------------------- ------------------------------ -----------------------

S File Share Witness (\\HT-1.domain.COM\DAG.domain.COM) SharePath \\HT-1.domain.com\DAG.domain.com

Get-ClusterResource –Cluster <cluster> –Name <ResourceName> | fl (Windows 2008 R2 Only – Public Properties)

Name : File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)
State : Online
OwnerGroup : Cluster Group
ResourceType : File Share Witness

Get-ClusterResource –Cluster <cluster> –Name <ResourceName> | Get-ClusterParameter fl (Windows 2008 R2 Only – Private Properties)

Name : SharePath
IsReadOnly : False
ParameterType : String
Value : \\HT-1.domain.com\DAG.domain.com

At this time a set-databaseavailability group is issued to change the witness server. After the command completes successfully, the previous commands are run. (Command output truncated to show relevant values only.)

Cluster.exe cluster.domain.com res “File Share Witness (\\HT-1.domain.com\DAG.domain.com)" /prop

Listing properties for 'File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)':

T Resource Name Value

-- -------------------- ------------------------------ -----------------------

SR File Share Witness (\\HT-1.domain.COM\DAG.domain.COM) Name File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)

Cluster.exe cluster.domain.com res “File Share Witness (\\HT-1.domain.com\DAG.domain.com)" /priv

Listing private properties for 'File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)':

T Resource Name Value

-- -------------------- ------------------------------ -----------------------

S File Share Witness (\\HT-1.domain.COM\DAG.domain.COM) SharePath \\HT-2.domain.com\DAG.domain.com

(Note: The SharePath in the previous output reflects the new witness server as expected)

Get-ClusterResource –Cluster <cluster> –Name <ResourceName> | fl (Windows 2008 R2 Only – Public Properties)

Name : File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)
State : Online
OwnerGroup : Cluster Group
ResourceType : File Share Witness

Get-ClusterResource –Cluster <cluster> –Name <ResourceName> | Get-ClusterParameter fl (Windows 2008 R2 Only – Private Properties)

Name : SharePath
IsReadOnly : False
ParameterType : String
Value : \\HT-2.domain.com\DAG.domain.com

(Note: The SharePath in the previous output reflects the new witness server as expected)

As you can see the set-databaseavailability group command did complete it’s task successfully by updating the SharePath attribute of the quorum resource to utilize the correct witness server.