Sql-Server

Win2012R2 上的 MS SQL 2016 AlwaysOn 群集 - 如果文件共享見證已關閉,則 AG 進行故障轉移

  • March 24, 2017

我們目前的設置包括:

  • 單個故障轉移群集中的八 (8) 個 Windows 2012 R2 節點,無共享儲存,文件共享見證(在 DC 上)
  • MS SQL 2016 AlwaysOn 與幾個 AG 組
  • 預設“如果資源失敗”策略

集群驗證報告顯示了一些小警告(更新差異等),但總體上一切似乎都很好。

最近,由於大約半小時的 DC 停機時間以及隨之而來的 File Share Witness 不可用,其中一個 AG 發生了故障。這並不是我們所期望的,因為我們的想法是所有 8 個節點的 Quorum 仍然存在,因此不會發生故障轉移。

在閱讀了關於 quorum/FSW/等的所有可用文件後,我仍然沒有明確的答案或理解為什麼會發生故障轉移。

FC 事件日誌包含以下歧義:

FailoverClustering Event ID:1069 Resource Control Manager

Cluster resource 'File Share Witness' of type 'File Share Witness' in clustered role 'Cluster Group' failed.

Based on the failure policies for the resource and role, the cluster service may try to bring the resource online on this node or move the group to another node of the cluster and then restart it. Check the resource and group state using Failover Cluster Manager or the Get-ClusterResource Windows PowerShell cmdlet.

在交換到輔助節點 (NODE5) 的節點上,系統事件日誌包含:

16.03.2017 12:39:47 Cluster resource 'File Share Witness' of type 'File Share Witness' in clustered role 'Cluster Group' failed due to an attempt to block a required state change in that cluster resource.

16.03.2017 12:39:47 File share witness resource 'File Share Witness' failed to arbitrate for the file share '\\DC\CLUSTER'. Please ensure that file share '\\DC\CLUSTER' exists and is accessible by the cluster.

16.03.2017 12:39:48 The Cluster service failed to bring clustered role 'Cluster Group' completely online or offline. One or more resources may be in a failed state. This may impact the availability of the clustered role.

16.03.2017 12:39:48 Cluster resource 'File Share Witness' of type 'File Share Witness' in clustered role 'Cluster Group' failed due to an attempt to block a required state change in that cluster resource.

16.03.2017 12:39:48 File share witness resource 'File Share Witness' failed to arbitrate for the file share '\\DC\CLUSTER'. Please ensure that file share '\\DC\CLUSTER' exists and is accessible by the cluster.

和故障轉移集群事件日誌:

Cluster resource 'File Share Witness' in clustered role 'Cluster Group' has transitioned from state Terminating to state Failed.

<...>

The Cluster service is attempting to fail over the clustered role 'Cluster Group' from node 'NODE5' to node 'NODE6'.

<...>

Clustered role 'db5' is moving to cluster node 'NODE6'.

在我看來,這基本上意味著故障轉移是由 File Share Witness 離線這一事實引起的。但為什麼?

我們想知道有沒有辦法解決這種行為。歡迎任何澄清或建議,謝謝!

在我看來,這基本上意味著故障轉移是由 File Share Witness 離線這一事實引起的。但為什麼?

這不是它的意思。閱讀發布的日誌,我可以看到核心集群組失敗到另一個節點(希望它修復與見證的連接問題),但是沒有關於 SQL Server 的任何內容。您需要在日誌中查找 SQL Server 發生故障的位置並追溯它以了解群集決定啟動自動故障的原因。

發生自動故障的事實意味著集群具有仲裁。如果沒有,就不會發生自動故障。

我們想知道有沒有辦法解決這種行為。歡迎任何澄清或建議,謝謝!

沒有什麼可以解決的,因為這不是正在發生的事情。查看日誌以查看自動失敗的原因是什麼,這就是它失敗的原因 - 不是因為它無法對 FSW 進行健康檢查。

引用自:https://serverfault.com/questions/840350