Can somebody provide an in depth explanation to how the disk witness and file share witness assign a vote to a node?
There is a good article on how cluster quorum works in Windows Failover Clustering here.
to summarise, for File Share or Cloud Witnesses, a witness log file is maintained with state information about the cluster, witnesses and quorum voting. Each node has a cluster service running that periodically checks in with the other nodes and the witnesses (depending on dynamic voting, node weighting etc) to validate the state and health of the cluster. If a node cannot communicate with other nodes, it will then verify connectivity with the witness, assess the witness log (if possible) and proceed from there with either taking control of the cluster or not.
For example, assume we have two nodes, Node A and Node B, and a File Share Witness (Witness A), with Node A the primary node in the cluster. If Node B, during a periodic health check, cannot communicate with Node A because a switch went down then it will try to verify cluster health by contacting the cluster witness (Witness A) and reviewing the witness log to determine health state.
If Witness A can still communicate with both nodes because it has a different path to Node A than Node B does, this information will be in the witness log and Node B will not try to assume the role of the primary node. Node A will also see this information in the witness log and continue normal operations.
On the other hand, if Witness A has also lost communication with Node A, this information will be in the witness log and Node B will try and assume the role of the primary node. Since Node A will not be able to communicate with Node B or Witness A in this scenario, its cluster service will have shut down to prevent split-brain from occurring.
A Shared Disk witness works almost identically, except the witness is highly-available storage connected to the cluster, so instead of a witness log the shared disk maintains a copy of the cluster configuration database on the disk instead of just a witness log. Behaviorally, the witness and node interactions are the same.
I have one scenario for DC-DR activity.
Node 1 - Primary replica ----------------- DC-1 Node 2 - Secondary replica ----------------- DC-2 Node 3 - File Share Witness ----------------- DC-1 -- Standalone VM (Protected VM)
If we shutdown primary replica which is in DC-1 then secondary replica will become primary which is in DC-2. Now if we shutdown File Share Witness and it will take 15-30 minutes to move DC-2. During movement of File Share Witness node what will be the status of Availability Group and DC-2 replica. And once File Share Witness node moves successfully on DC-2 then will it up the primary replica which is in DC-2 or there will be any manual intervention required or my cluster will be down.
Thanks in Advance..