Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

WSFC time Division scene implementation

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The last article mentioned that when there is a time partition in a WSFC cluster, there will be different ways to use disk witness and shared witness. Lao Wang actually made a practice. Seeing that there is no blog in this area in China, he decided on a whim to write this foreign blog.

First of all, let's take a look at the shared witness processing when there is a time partition. The so-called time partition means that when you modify the resource state of one node, the other node is not online, and then the modified node goes down. cluster database synchronization problems faced by synchronization when another node is online

Let's assume that such a scene

Time node 1: node 1 and node 2 survive at the same time, the DTC cluster role is added to node 1, and the cluster database is automatically synchronized to node 2.

Time Node 2: node 1 is down, Node 2 looks up the cluster database online Cluster 1 hosts the DTC role

Time Node 3: node 2 adds a SOFS role

Time node 4: node 2 downtime

Time node 5: node 1 online

When this scenario actually occurs, you will find that Node 1 under the shared witness is unable to work properly anyway.

Open the event manager-system, you will see the error of Event ID 1561, the message is already clear, because the node does not have the latest version of the cluster database, so it cannot be started, cannot form a cluster

This is exactly what Lao Wang mentioned in his last article. When you use a shared witness, when there is a time zone, the shared witness cannot be dealt with, because there is no cluster database in the shared witness.

Then when you open Cluster Administrator on node 1, you will find that you can't connect to CNO anyway. You try to ping the cluster CNO VCO domain name through ping, but when you visit them and use the VCO name, you will find that you can't connect.

At this time, only when Node 2 is repaired, and when Node 2 joins the cluster, Node 1 can synchronize the latest cluster database with Node 2 before Node 1 Cluster Administrator can open normally and rejoin the cluster.

Even if your node 1 can be opened at this time, do not carry out compulsory arbitration, because once the compulsory arbitration is performed, the paxos tag will be overwritten, the paxos tag of node 1 will be promoted to the latest, and the shared witness only acknowledges the party with the latest paxos. As a result, the cluster will think that the cluster database of node 1 is up to date, and then if node 2 is repaired and opened, the previously modified content will be completely lost. Because node 2 is based on the cluster database of node 1, time partitioning occurs in the case of shared witness, and only wait for the authoritative node to repair and go online, or by restoring the cluster authoritative database.

Let's take a look at the effect of the same time partition scenario witnessed by disk.

Time node 1: node 1 and node 2 survive at the same time, the DTC cluster role is added to node 1, and the cluster database is automatically synchronized to node 2.

Time Node 2: node 1 is down, Node 2 looks up the cluster database online Cluster 1 hosts the DTC role

Time Node 3: node 2 adds a SOFS role

Time node 4: node 2 downtime

Time node 5: node 1 online

SOFS role added to Node 2 when Node 1 is not online

Node 2 is down, node 1 is online

Node 1 can synchronously use SOFS role information and provide cluster application services normally.

In the same case, Node 2 adds a new SOFS role in the absence of Node 1. After that, Node 2 goes down and Node 1 goes online. You can see that Node 1 can still be started normally, Cluster Administrator can also be opened normally, and cluster applications can also provide services normally.

Why is this so, because the cluster disk will store the latest cluster database, when we use the disk witness, when we add or delete the cluster resources, in addition to synchronizing the status to the node's own cluster database registry, it will also synchronize a copy to the witness disk. When there is a time partition, all that happens is that node 1 contacts the witness disk and synchronizes with the witness disk to the latest cluster database. Then start the service normally.

Therefore, you can see that shared witness will still have problems in some scenarios. Lao Wang suggests that you can use disk witness as much as possible.

2016 the newly launched Cloud blob witness that I have not tried the time partition scene, I do not know whether it is similar to the effect of shared witness or disk witness, the key is whether there will be the latest cluster database. I will verify it later when I have time. You are also welcome to verify it and tell me the answer.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report