Arbitration method, device and electronic equipment based on SAN storage active-active network

The application server obtains the status parameters of the storage device, determines and determines the task takeover, solves the problem of data inconsistency in the dual-active network, reduces the difficulty and cost of networking, and realizes the arbitration function in the original structure.

CN113849127BActive Publication Date: 2024-10-01BEIJING TENGLING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111022337.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-01
Publication Date
2024-10-01
Estimated Expiration
2041-09-01

AI Technical Summary

Technical Problem

In a dual-machine active-active network, when the data between the two data centers cannot be synchronized, split-brain phenomenon is prone to occur, resulting in data inconsistency, and the existing third-party server arbitration method will increase the difficulty and cost of networking.

Method used

Obtain the status parameters of each storage device through the application server, determine whether the status of the storage device is normal, and determine the normal storage device as the task takeover to conduct arbitration based on the original structure of the dual-active network and reduce the difficulty of networking. and cost.

Benefits of technology

It realizes convenient arbitration in the active-active network, avoids data inconsistency, reduces the difficulty and cost of networking, and expands the functions of the application server so that it can obtain the status information of the storage device in the original data channel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113849127B_ABST
    Figure CN113849127B_ABST
Patent Text Reader

Abstract

The present specification provides an arbitration method, apparatus and electronic device based on a SAN storage active-active network, wherein the active-active network includes an application server and two storage devices, and the method includes: the application server obtains status parameters of each storage device, wherein the status parameters include parameters characterizing whether the storage device is abnormal; the application server determines whether the status of the storage device is normal based on the status parameters, and determines whether to arbitrate the storage device with a normal status as the task takeover party. In the present application, the application server can obtain the status information of each storage device through the original data channel between the storage device and the storage device, and implement arbitration based on the original active-active network of the application server. Compared with the existing third-party server arbitration method, there is no need to introduce a third-party server or build a dedicated network, which reduces the complexity and cost of networking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer communications, and in particular to an arbitration method, device and electronic equipment based on a SAN storage active-active network. Background Art

[0002] The dual-machine dual-active network is a disaster recovery system that is different from the traditional active-standby mode. The two data centers in the dual-active network are equal, regardless of master or slave, and work tasks are processed at the same time. The data between the two data centers interact in real time and back up each other. Therefore, when one of the data centers fails, the other data center can take over all work tasks in time, avoiding data loss and improving the resource utilization of the two data centers. However, when the data between the two data centers cannot be synchronized, a brain split is likely to occur, that is, the two data centers become two independent data centers, each processing work tasks. At this time, data inconsistency will occur, and users cannot determine which data center's data is the only production data they need and which one is not needed, so arbitration is required to select a data center that has no failures and contains all the data of the two data centers to continue working. The commonly used method at present is the third-party server arbitration method, which implements arbitration by introducing a third-party server, but this method will increase the difficulty and cost of networking. Summary of the invention

[0003] In order to overcome the problems of difficulty in networking and high cost caused by the third-party server arbitration method, this specification provides an arbitration method, device and electronic device based on a SAN storage active-active network.

[0004] According to a first aspect of an embodiment of this specification, there is provided an arbitration method based on a SAN storage active-active network, the method comprising:

[0005] The application server obtains status parameters of each storage device, wherein the status parameters include parameters indicating whether the storage device is abnormal;

[0006] The application server determines whether the state of the storage device is normal according to the state parameter, and determines whether to arbitrate the storage device in the normal state as the task takeover party.

[0007] According to a second aspect of an embodiment of this specification, an arbitration device based on a SAN storage active-active network is provided, comprising:

[0008] An acquisition module, used to acquire status parameters of each storage device, wherein the status parameters include parameters indicating whether the storage device is abnormal;

[0009] The judgment module is used to determine whether the state of the storage device is normal according to the state parameter, and determine whether to arbitrate the storage device with a normal state as the task takeover party.

[0010] According to a third aspect of the embodiments of this specification, there is provided an electronic device, including:

[0011] processor;

[0012] a memory for storing processor-executable instructions;

[0013] Wherein, the processor is configured to:

[0014] Acquire status parameters of each storage device, wherein the status parameters include parameters indicating whether the storage device is abnormal;

[0015] Determine whether the state of the storage device is normal according to the state parameter, and determine whether to arbitrate the storage device in the normal state as the task takeover party.

[0016] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and the computer program is used to execute the method described in the first aspect above.

[0017] The technical solutions provided by the embodiments of this specification may have the following beneficial effects:

[0018] This application expands the functions of the application server in the dual-machine dual-active network, enabling the application server to obtain the status information of each storage device through the original data channel between the storage devices. When the data between the storage devices cannot be synchronized, the application server determines the service takeover party based on the obtained status information, realizing arbitration based on the original structure and composition of the dual-active network, reducing the difficulty and cost of networking.

[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.

[0021] Figure 1 This is a simplified networking diagram based on a SAN storage active-active network according to an embodiment of the present application.

[0022] Figure 2 The present application is a flowchart of an arbitration method based on a SAN storage active-active network according to an embodiment.

[0023] Figure 3 This is a flow chart of an arbitration method based on a SAN storage active-active network according to another embodiment of the present application.

[0024] Figure 4 This is a flow chart of an arbitration method based on a SAN storage active-active network according to another embodiment of the present application.

[0025] Figure 5 This is a flow chart of an arbitration method based on a SAN storage active-active network according to another embodiment of the present application.

[0026] Figure 6 It is a block diagram of an arbitration device based on a SAN storage active-active network according to an exemplary embodiment of the present application.

[0027] Figure 7 It is a block diagram of an electronic device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0028] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.

[0029] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0030] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0031] In an active-active network, two data centers simultaneously undertake business and data is exchanged in real time and backed up each other. When the data between the two data centers cannot be synchronized, in order to avoid the situation where the data of both data centers continue to undertake business and cause inconsistency between the two data centers, arbitration is required to select only one of the data centers to continue to undertake the business. The currently commonly used arbitration method requires the introduction of a third-party server on the basis of the original network, which increases the difficulty and cost of networking. Therefore, in order to realize arbitration based on the original structure of the active-active network, the present application provides an arbitration method, device, electronic device and computer-readable storage medium based on a SAN storage active-active network.

[0032] First, the network architecture based on SAN storage active-active network is introduced. Figure 1 As shown. The active-active network includes an application server 110 and two storage devices 120 and 130. The three independent physical entities are connected to each other through an FC network or an IP network based on the SCSI protocol to form three links. The storage space in the storage device is mapped on the application server. The storage device is equivalent to a storage hard disk for the application server. The data written on the application server is stored in the two storage devices. The two storage devices synchronize data and share status information through the active-active link.

[0033] like Figure 2 As shown, the present application provides an arbitration method based on a SAN storage active-active network, which may include the following steps:

[0034] S101, the application server obtains status parameters of each storage device, where the status parameters include parameters indicating whether the storage device is abnormal;

[0035] The above parameters characterizing whether the storage device is abnormal may include at least one of the following: a parameter characterizing whether the storage device can read and write normally, a parameter characterizing whether the storage device can communicate normally, and a parameter characterizing whether the data stored in the storage device is complete, but are not limited to the above three parameters. In addition, in a specific application, the state parameters of the storage device may also include at least one of the following two parameters: a parameter characterizing whether the link between the two storage devices is abnormal, and a parameter characterizing whether the storage device is a priority site. The priority site is a storage device that is set in advance to be preferentially selected to continue the work task when the data between the two storage devices cannot be synchronized.

[0036] There are many ways for the application server to obtain the status parameters of each storage device. In one embodiment of the present application, the application server obtains the status parameters of each storage device by sending a heartbeat packet to the storage device. The application server sends a heartbeat message to the storage device, and the frequency of sending can be determined according to a preset time period, for example, once per second. The application server then receives feedback information from the storage device, and the feedback information carries the status parameters of the storage device. If the application server does not receive feedback information from the storage device within a certain period of time after sending the message, the application server considers that the storage device is offline and the two cannot continue to communicate.

[0037] In another embodiment of the present application, the state parameters of the storage device are reported by the storage device to the application server when the storage device is abnormal or the link with the opposite storage device is abnormal, or the above two abnormalities occur simultaneously. In an active-active network, data between two storage devices is synchronized in real time, and status information is shared. The two storage devices can determine whether the link with the opposite storage device is abnormal by sending heartbeat packets. If the heartbeat packet of the opposite storage device is not received, it is considered that the link is abnormal and the current state parameters of the storage device are sent to the application server. If it is found that the storage device itself is abnormal, such as being unable to read and write, incomplete data, etc., the current state parameters of the storage device are sent to the application server. If the above two situations occur simultaneously, the storage device sends its current state parameters to the application server.

[0038] S102: The application server determines whether the state of the storage device is normal according to the state parameter, and determines whether to arbitrate the storage device in the normal state as the task takeover party.

[0039] The application server first determines whether the status of the storage device is normal based on the status parameters of the received storage device. If the status of the storage device is normal, the application server determines whether to arbitrate the storage device with normal status as the task takeover party based on the specific situation, that is, the storage device as the task takeover party needs to meet the condition of normal status. In one embodiment of the present application, the storage device with normal status is a storage device that can read and write normally and has complete data. Then the step of determining whether the storage device is normal at least includes: determining whether the storage device can read and write normally and determining whether the data of the storage device is complete. If the storage device is abnormal, the storage device will not be determined as the task takeover party.

[0040] When the storage device is normal, the reasons why the data cannot be synchronized between the two storage devices include link abnormality, or / and the opposite storage device abnormality, so there are three reasons for the data synchronization failure: (1) link abnormality; (2) opposite storage device abnormality; (3) link abnormality and opposite storage device abnormality. In the three different situations, the results of whether to arbitrate the storage device in normal state as the task takeover party are also different. In the first case, the link is abnormal: both storage devices can work normally, and the aforementioned brain split phenomenon is prone to occur. At this time, the storage device of the priority site is arbitrated as the task takeover party. If the storage device is the priority site, the storage device is determined to be the priority site. In the second case, the opposite storage device is abnormal: only one storage device is normal. At this time, the normal storage device is arbitrated as the task takeover party, so the storage device is determined to be the task takeover party. In the third case, the link is abnormal and the opposite storage device is abnormal, and the result is the same as the second case. Therefore, the determination of whether to arbitrate the storage device in normal state as the task takeover party requires first determining the reason for the data asynchrony between the two storage devices.

[0041] In another embodiment of the present application, in addition to the parameter characterizing whether the storage device is abnormal, the status parameter also includes a parameter characterizing whether the link between the two storage devices is abnormal, or / and a parameter characterizing whether the storage device is a priority site. The application server determines whether the status of the storage device is normal based on the status parameter, and determines whether to arbitrate the storage device in normal status as the task takeover party, including at least one of the following:

[0042] Determining whether the storage device is normal;

[0043] Determining whether a link between the storage device and its peer storage device is abnormal;

[0044] Determine whether the storage device opposite to the storage device is abnormal;

[0045] Determine whether the storage device is a priority site.

[0046] The key to realize arbitration in the active-active network is to realize the information interaction between the arbitration device and the two storage devices, and the arbitration device is an application server in this application. Based on the SAN storage active-active network, the application server and the two storage devices are connected through the FC or IP network based on the SCSI protocol, and the three use a fixed form to transmit fixed instructions. The third-party server arbitration method introduces a third-party server as a device to realize arbitration. The third-party server adopts the TCP protocol, and the arbitration function can only be realized in the IP network. When the active-active network is connected through the IP network, since the IP network allows a variety of communication protocols, including SCSI and TCP protocols, the third-party server can realize the arbitration function through the link in the original active-active network. In theory, the arbitration software in the third-party server can be applied to the application server in the original active-active network, and the arbitration is realized by the application server. However, when the active-active network is connected through the FC network, the third-party server using the TCP protocol needs to deploy a new IP network to realize the arbitration function, thereby increasing the difficulty and cost of networking. The arbitration method based on the SAN storage active-active network provided in this application can realize arbitration through the link in the original active-active network when the active-active network is connected through the IP or FC network. In one embodiment of the present application, by extending a specific field in the SCSI-3 protocol, the arbitration function can be implemented by the application server on the basis of the original network, so that the state parameters of the storage device can be transmitted between the application server and the storage device, and the state parameters are carried in the extended field of the protocol. In another embodiment of the present application, the extended field is the 0x04 field of the PERSISTENT_RESERVE_IN instruction and the 0x10 field of the PERSISTENT_RESERVE_OUT instruction.

[0047] In conjunction with a preferred embodiment, an arbitration method based on a SAN storage active-active network provided by the present application is introduced below.

[0048] like Figure 3 As shown, the present application provides an arbitration method based on a SAN storage active-active network, comprising the following steps:

[0049] S201, the application server sends a heartbeat message to the storage device every 1 second;

[0050] The structure of the heartbeat message is as follows. The message type includes at least one of the following, represented by different numbers: heartbeat check (0), heartbeat reply (1), arbitration application (2), arbitration reply (3).

[0051]

[0052]

[0053] S202, the application server receives feedback information from the storage device, where the feedback information carries a status parameter of the storage device;

[0054] The state parameters of the storage device include parameters indicating whether the storage device is abnormal, parameters indicating whether the link between two storage devices is abnormal, and parameters indicating whether the storage device is a priority site. The parameters indicating whether the storage device is abnormal include parameters indicating whether the storage device can read and write normally, parameters indicating whether the storage device can communicate normally, and parameters indicating whether the data stored in the storage device is complete.

[0055] The message structure fed back by the storage device is as follows: "Is the remote site abnormal?" is a parameter that characterizes whether the link between the storage device and the opposite storage device is abnormal; "Arbitration result" refers to whether the storage device continues to work normally during the last arbitration; and "Is the local LUN abnormal?" is a parameter that characterizes whether the storage device can read and write normally.

[0056]

[0057] S203: The application server determines whether the state of the storage device is normal according to the state parameter, and determines whether to arbitrate the storage device in the normal state as the task takeover party.

[0058] The process of the application server determining the task takeover party is the process of executing arbitration. The message structure is as follows:

[0059]

[0060] like Figure 4 As shown, the above step S203 includes the following steps S2031-S2036 (a, b), and there is no order between steps S2031 and S2032:

[0061] S2031, determining whether the storage device can read and write normally;

[0062] If the judgment is yes, execute step S2032, and if the judgment is no, execute step S2036a.

[0063] S2032, determining whether the data of the storage device is complete;

[0064] If the judgment is yes, execute step S2033, if the judgment is no, execute step S2036a.

[0065] In this embodiment, the state is normal means that the storage device can read and write normally and the data is complete. If it is determined that the storage device can read and write normally and the data is complete, then the storage device is considered to be in a normal state, and step S2033 is executed.

[0066] S2033, determining whether a link between the storage device and its peer storage device is abnormal;

[0067] If the answer is yes, step S2034 is executed. If the answer is no, the entire active-active network operates normally without determining whether to arbitrate the storage device as the task takeover party (not shown in the figure).

[0068] The purpose of executing step S2033 is to determine whether the data between the two storage devices can be synchronized. If it is determined that the link is normal, it means that the data between the two storage devices can be synchronized, and the entire active-active network works normally, and there is no need to determine the task takeover party; if it is determined that the link is abnormal, it means that the data between the two storage devices cannot be synchronized, and step S2034 is executed.

[0069] S2034, determining whether the peer storage device of the storage device is abnormal;

[0070] like Figure 5 As shown, the following sub-steps are included and steps S20341-S20343 have no order:

[0071] S20341, determining whether the peer storage device of the storage device can read and write;

[0072] If the judgment is yes, execute step S20342; if the judgment is no, execute step S20344a.

[0073] S20342, determining whether the data of the peer storage device of the storage device is complete;

[0074] If the judgment is yes, execute step S20343; if the judgment is no, execute step S20344a.

[0075] S20343, determining whether the peer storage device of the storage device is offline;

[0076] If the judgment is yes, execute step S20344a; if the judgment is no, execute step S20344b.

[0077] When the peer storage device can read and write, the data is complete and not offline, the peer storage device is normal. If the peer storage device is judged to be abnormal, the storage device is determined to be the task takeover party; if the peer storage device is judged to be normal, step S2035 is executed.

[0078] S20344a, the peer storage device of the storage device is abnormal;

[0079] The storage device is determined to be the task takeover party.

[0080] S20344b: The peer storage device of the storage device is normal;

[0081] Continue to step S2035.

[0082] S2035, determining whether the storage device is a priority site;

[0083] If the judgment is yes, execute step S2036b; if the judgment is no, execute step S20346a.

[0084] When both storage devices are normal and only the link is abnormal, the storage device pre-configured as the priority site is determined as the task takeover party. If the storage device is the priority site, the storage device is determined as the task takeover party; otherwise, the storage device's peer device is determined as the task takeover party.

[0085] S2036a, not determining the storage device as a task takeover party;

[0086] S2036b, determining the storage device as the task takeover party;

[0087] S204: The application server sends the arbitration result to the storage device.

[0088] The application server can send the arbitration result to the storage device after each arbitration, or send it to the storage device when the current arbitration result of the storage device is different from the previous one. The specific structure is as follows:

[0089]

[0090] Based on the above method embodiments, the present application provides an arbitration device based on a SAN storage active-active network, such as Figure 6 As shown, the device comprises:

[0091] An acquisition module 210, configured to acquire status parameters of each storage device, wherein the status parameters include parameters indicating whether the storage device is abnormal;

[0092] The judgment module 220 is used to determine whether the state of the storage device is normal according to the state parameter, and determine whether to arbitrate the storage device with a normal state as the task takeover party.

[0093] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.

[0094] The embodiment of the arbitration device of the active-active network of the present application can be applied to electronic devices, such as application servers. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the file processing in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory for execution. From the hardware level, such as Figure 7 The figure is a hardware structure diagram of the computer device where the file processing device of the embodiment of this specification is located, except Figure 7 In addition to the processor 310, memory 330, network interface 320, and non-volatile memory 340 shown, the server or electronic device where the device 331 is located in the embodiment may also include other hardware according to the actual function of the electronic device, which will not be described in detail.

[0095] In addition, corresponding to the above method embodiments, the present application also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the arbitration method of the active-active network described in the present application.

[0096] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0097] Those skilled in the art will readily appreciate other embodiments of the specification after considering the specification and practicing the invention claimed herein. The specification is intended to cover any variations, uses or adaptations of the specification that follow the general principles of the specification and include common knowledge or customary techniques in the art that are not claimed in the specification. The specification and examples are to be considered exemplary only, and the true scope and spirit of the specification are indicated by the following claims.

[0098] It should be understood that the present description is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.

[0099] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

Claims

1. An arbitration method based on a SAN storage active-active network, characterized in that: The active-active network includes an application server and two storage devices. The devices in the active-active network are connected via an FC network or an IP network based on the SCSI protocol to form three links. The method includes: The application server obtains status parameters of each storage device, where the status parameters are carried in an extended field of the SCSI-3 protocol, and the status parameters include parameters indicating whether the storage device is abnormal; The application server determines whether the state of the storage device is normal according to the state parameter, and determines whether to arbitrate the storage device in the normal state as the task takeover party.

2. The method according to claim 1, characterized in that The parameter characterizing whether the storage device is abnormal includes at least one of the following: A parameter indicating whether the storage device can be read and written normally; A parameter indicating whether the storage device can communicate normally; A parameter indicating whether the data stored in the storage device is complete.

3. The method according to claim 1, characterized in that: The state parameters also include at least one of the following: A parameter indicating whether the link between two storage devices is abnormal; A parameter indicating whether the storage device is a priority site. The priority site is a storage device that is preferentially selected to continue working tasks when data between two storage devices cannot be synchronized.

4. The method according to claim 1, characterized in that: The storage device in a normal state is A storage device that can be read and written normally and has complete data.

5. The method according to claim 3, characterized in that: The step of determining whether to arbitrate a storage device in a normal state as a task takeover party comprises at least one of the following: Abnormal storage devices are not allowed to take over the task; Arbitrate the normal storage device as the task takeover party; When the storage device and the opposite storage device are both normal and the link between the two storage devices is abnormal, the storage device at the priority site is arbitrated as the task takeover party.

6. The method according to claim 1, characterized in that The application server obtains the status parameters of each storage device including: The application server sends a heartbeat message to the storage device; The application server receives feedback information from the storage device, where the feedback information carries status parameters of the storage device.

7. The method according to claim 1, characterized in that The application server obtains the status parameters of each storage device including: The state parameters of the storage device are reported by the storage device to the application server when the storage device is abnormal and / or the link between the storage device and the opposite storage device is abnormal.

8. The method according to claim 1, characterized in that The extended fields are the 0x04 field of the PERSISTENT_RESERVE_IN instruction and the 0x10 field of the PERSISTENT_RESERVE_OUT instruction.

9. An arbitration device based on a SAN storage active-active network, characterized in that: The active-active network includes an application server and at least two storage devices. The devices in the active-active network are connected via an FC network or an IP network based on the SCSI protocol to form three links. The device includes: An acquisition module, used for acquiring status parameters of each storage device, wherein the status parameters are carried in an extended field of the SCSI-3 protocol, and the status parameters include parameters indicating whether the storage device is abnormal; The judgment module is used to determine whether the state of the storage device is normal according to the state parameter, and determine whether to arbitrate the storage device with a normal state as the task takeover party.

10. An electronic device, characterized in that include: processor; a memory for storing processor-executable instructions; The processor is used to execute processor-executable instructions to implement the method as claimed in claim 1.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is used to instruct related hardware to implement the method described in any one of claims 1-8.