Single-node startup method, device, equipment, and medium
By obtaining and judging the GI tuple information of the primary and secondary nodes, and sending the startup information to the management control node to start, the problem of data loss during the startup of a single node is solved, and the stability and security of the node are improved.
Patent Information
- Application Number
- CN202210446419.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-26
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-04-26
AI Technical Summary
During the single node startup process, how to avoid data loss caused by abnormalities between the main and spare nodes, and improve the stability and security of node operation.
By obtaining and saving the GI tuple information of the primary node and the standby node in the current cycle, we judge whether the historical information is the same as the current information, and sending the corresponding startup information to the management end to control the node's startup, ensuring the reliability of the data link and the formatting operation of the arbitration disk.
It effectively avoids data loss caused by abnormalities between the master and spare nodes, and improves the stability and security of node operation.
Smart Images

Figure CN114780305B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a single-node startup method, device, equipment and medium. Background Art
[0002] Currently, with the advent of the new infrastructure era, the demand for cloud deployment and cloud applications is also increasing. Virtualization technology, as the cornerstone of cloud computing, is ubiquitous. The virtualization management system is a platform for integrating underlying resources and is the basis for managing and monitoring virtual resources. Therefore, the performance of the virtualization management system directly affects the performance of the entire system. The deployment form of the virtualization system is also directly related to the performance of the system management module. Customer-site computer rooms are always subject to unstable factors such as power outages and network disconnections. To address the problem of the system being unable to operate normally and provide services after the main node fails, the deployment form of active and standby management nodes has emerged. The basic working principle is that the main node normally provides management node services, and the standby node synchronizes data with the main node. When the main node fails, the standby node can take over the system work, forming a main and standby dual-machine deployment form.
[0003] As can be seen from the above, during the startup of a single node, how to avoid data loss caused by abnormalities in both the primary and backup nodes and improve the stability and security of node operation are problems to be solved in this field. Summary of the Invention
[0004] In view of this, the present invention aims to provide a single-node startup method, apparatus, device, and medium that can effectively avoid data loss caused by abnormalities in both the primary and backup nodes, thereby improving the stability and security of node operation. The specific solution is as follows:
[0005] In a first aspect, the present application discloses a single-node startup method, comprising:
[0006] Obtain and save the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle in the local arbitration disk;
[0007] Determine whether the historical primary GI tuple information of the previous cycle in the local arbitration disk is the same as the current primary GI tuple information, and determine whether the historical backup GI tuple information of the previous cycle in the local arbitration disk is the same as the current backup GI tuple information;
[0008] If the historical main GI tuple information is different from the current main GI tuple information, the first startup information for starting the backup node is sent to the management end; if the historical backup GI tuple information is different from the current backup GI tuple information, the second startup information for starting the main node is sent to the management end, so that the management end uses the received startup information to control the startup of the corresponding node.
[0009] Optionally, before obtaining and saving the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle in the local arbitration disk, the method further includes:
[0010] Creating a logical unit from centralized storage or distributed storage, and establishing a data link between the primary node and the backup node and the logical unit;
[0011] The state of the logical unit is determined. If the state of the logical unit is available, an arbitration disk is established based on the logical unit and the data link, and the arbitration disk is formatted to obtain a local arbitration disk.
[0012] Optionally, establishing a data link between the primary node and the backup node and the logical unit includes:
[0013] Add corresponding IP addresses to the primary node and the backup node respectively to obtain a primary IP address and a backup IP address in the storage area network;
[0014] Scan storage adapters, and establish data links between the primary node and the backup node and the logical unit based on the primary IP address and the backup IP address.
[0015] Optionally, the acquiring and storing in the local arbitration disk the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle includes:
[0016] Determine the time range of the current cycle, obtain the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node within the current cycle, and record the corresponding information acquisition time;
[0017] The time range and the information acquisition time are written into the current primary GI tuple information and the current backup GI tuple information respectively, and then the updated current primary GI tuple information and the current backup GI tuple information are saved to the local arbitration disk.
[0018] Optionally, before determining whether the historical primary GI tuple information of the previous cycle in the local arbitration disk is identical to the current primary GI tuple information, and determining whether the historical backup GI tuple information of the previous cycle in the local arbitration disk is identical to the current backup GI tuple information, the process further includes:
[0019] Determine the time range of the previous cycle based on the time range of the current cycle;
[0020] The corresponding historical primary GI tuple information and the historical backup GI tuple information are determined from the local arbitration disk based on the time range of the previous cycle.
[0021] Optionally, determining whether the historical primary GI tuple information of the previous cycle in the local arbitration disk is the same as the current primary GI tuple information, and determining whether the historical backup GI tuple information of the previous cycle in the local arbitration disk is the same as the current backup GI tuple information, includes:
[0022] Determine whether the universally unique identifier in the historical primary GI tuple information of the previous cycle in the local arbitration disk is the same as the universally unique identifier in the current primary GI tuple information;
[0023] It is determined whether the universally unique identifier in the historical standby GI tuple information of the previous cycle in the local arbitration disk is the same as the universally unique identifier in the current standby GI tuple information.
[0024] Optionally, after determining whether the historical primary GI tuple information of the previous cycle in the local arbitration disk is identical to the current primary GI tuple information, and determining whether the historical backup GI tuple information of the previous cycle in the local arbitration disk is identical to the current backup GI tuple information, the process further includes:
[0025] If the historical main GI tuple information is different from the current main GI tuple information and the historical backup GI tuple information is different from the current backup GI tuple information, then the startup information for starting the main node or starting the backup node or starting the main node and a single backup node at the same time is sent to the management end.
[0026] In a second aspect, the present application discloses a single-node startup device, comprising:
[0027] An information acquisition module is used to acquire and save in a local arbitration disk the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle;
[0028] an information determination module, configured to determine whether the historical primary GI tuple information of the previous cycle in the local arbitration disk is identical to the current primary GI tuple information, and to determine whether the historical backup GI tuple information of the previous cycle in the local arbitration disk is identical to the current backup GI tuple information;
[0029] An information sending module is used to send first startup information for starting the backup node to the management end if the historical main GI tuple information is different from the current main GI tuple information; if the historical backup GI tuple information is different from the current backup GI tuple information, send second startup information for starting the main node to the management end, so that the management end uses the received startup information to control the startup of the corresponding node.
[0030] In a third aspect, the present application discloses an electronic device, comprising:
[0031] Memory, used to store computer programs;
[0032] The processor is configured to execute the computer program to implement the aforementioned single-node startup method.
[0033] In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the single-node startup method disclosed above are implemented.
[0034] It can be seen that the present application provides a single-node startup method, including obtaining and saving the current main GI tuple information corresponding to the master node and the current standby GI tuple information corresponding to the standby node in the current cycle in the local arbitration disk; judging whether the historical main GI tuple information of the previous cycle in the local arbitration disk is the same as the current main GI tuple information, and judging whether the historical standby GI tuple information of the previous cycle in the local arbitration disk is the same as the current standby GI tuple information; if the historical main GI tuple information is not the same as the current main GI tuple information, then sending the first startup information for starting the standby node to the management end; if the historical standby GI tuple information is not the same as the current standby GI tuple information, then sending the second startup information for starting the master node to the management end, so that the management end uses the received startup information to control the startup of the corresponding node. The present application periodically obtains and judges whether the GI tuple information in the arbitration disk is the same, thereby determining the information for restarting the node and sending it to the management end, which can effectively avoid the problem of data loss caused by abnormalities in both the master and standby nodes, and improve the stability and security of node operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0036] Figure 1This is a flow chart of a single-node startup method disclosed in this application;
[0037] Figure 2 This is a flow chart of a single-node startup method disclosed in this application;
[0038] Figure 3 This is a specific flow chart of a single-node startup method disclosed in this application;
[0039] Figure 4 This is an example diagram of a single-node startup method disclosed in this application;
[0040] Figure 5 This is a schematic diagram of the structure of a single-node startup device disclosed in this application;
[0041] Figure 6 This is a structural diagram of an electronic device provided in this application. DETAILED DESCRIPTION
[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0043] In the current context, with the advent of the new infrastructure era, the demand for cloud deployment and cloud applications is growing. Virtualization technology, as the cornerstone of cloud computing, is ubiquitous. A virtualization management system is a platform that integrates underlying resources and serves as the foundation for managing and monitoring virtual resources. Therefore, the performance of the virtualization management system directly impacts the performance of the entire system. The deployment model of the virtualization system is also directly related to the performance of the system management module. Customer-site computer rooms are often subject to unstable factors such as power outages and network disconnections. To address the problem of the system being unable to operate normally and provide services after the primary node fails, the deployment model of active and standby management nodes has emerged. The basic operating principle is that the primary node normally provides management node services, while the standby node synchronizes data with the primary node. If the primary node fails, the standby node can take over system operations, forming an active-standby dual-node deployment. As can be seen from the above, how to avoid data loss caused by failures of both the primary and standby nodes during the startup of a single node and improve the stability and security of node operation are unresolved issues in this field.
[0044] See also Figure 1 As shown, the embodiment of the present invention discloses a single node startup method, which may specifically include:
[0045] Step S11: obtaining and saving in the local arbitration disk the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle.
[0046] In this embodiment, before obtaining and saving the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle in the local arbitration disk, it also includes: creating a logical unit from centralized storage or distributed storage, and establishing a data link between the primary node and the backup node and the logical unit; judging the status of the logical unit, if the status of the logical unit is available, establishing an arbitration disk based on the logical unit and the data link, and formatting the arbitration disk to obtain a local arbitration disk.
[0047] In this embodiment, corresponding IP addresses are added to the primary node and the backup node respectively to obtain the primary IP address and the backup IP address in the storage area network, and then the storage adapter is scanned, and data links are established between the primary node and the backup node and the logical unit based on the primary IP address and the backup IP address respectively.
[0048] Step S12: Determine whether the historical primary GI tuple information of the previous cycle in the local arbitration disk is the same as the current primary GI tuple information, and determine whether the historical backup GI tuple information of the previous cycle in the local arbitration disk is the same as the current backup GI tuple information.
[0049] In this embodiment, it is determined whether the universal unique identifier in the historical main GI tuple information of the previous cycle in the local arbitration disk is the same as the universal unique identifier in the current main GI tuple information, and at the same time, it is determined whether the universal unique identifier in the historical backup GI tuple information of the previous cycle in the local arbitration disk is the same as the universal unique identifier in the current backup GI tuple information.
[0050] Step S13: If the historical main GI tuple information is different from the current main GI tuple information, the first startup information for starting the backup node is sent to the management end; if the historical backup GI tuple information is different from the current backup GI tuple information, the second startup information for starting the main node is sent to the management end, so that the management end uses the received startup information to control the startup of the corresponding node.
[0051] In this embodiment, if the historical main GI tuple information is different from the current main GI tuple information and the historical backup GI tuple information is different from the current backup GI tuple information, then the startup information for starting the main node or starting the backup node or starting the main node and a single backup node at the same time is sent to the management end.
[0052] In this embodiment, the current main GI tuple information corresponding to the master node and the current standby GI tuple information corresponding to the standby node in the current cycle are obtained and saved in the local arbitration disk; it is determined whether the historical main GI tuple information of the previous cycle in the local arbitration disk is the same as the current main GI tuple information, and whether the historical standby GI tuple information of the previous cycle in the local arbitration disk is the same as the current standby GI tuple information; if the historical main GI tuple information is not the same as the current main GI tuple information, the first startup information for starting the standby node is sent to the management end; if the historical standby GI tuple information is not the same as the current standby GI tuple information, the second startup information for starting the master node is sent to the management end, so that the management end uses the received startup information to control the startup of the corresponding node. This application periodically obtains and determines whether the GI tuple information in the arbitration disk is the same, thereby determining the information for restarting the node and sending it to the management end, which can effectively avoid the problem of data loss caused by abnormalities in both the master and standby nodes, and improve the stability and security of node operation.
[0053] See also Figure 2 As shown, the embodiment of the present invention discloses a single node startup method, which may specifically include:
[0054] Step S21: Determine the time range of the current cycle, obtain the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle, and record the corresponding information acquisition time.
[0055] Step S22: writing the time range and the information acquisition time into the current primary GI tuple information and the current backup GI tuple information respectively, and then saving the updated current primary GI tuple information and the current backup GI tuple information to the local arbitration disk.
[0056] Step S23: Determine whether the historical primary GI tuple information of the previous cycle in the local arbitration disk is the same as the current primary GI tuple information, and determine whether the historical backup GI tuple information of the previous cycle in the local arbitration disk is the same as the current backup GI tuple information.
[0057] In this embodiment, before determining whether the historical main GI tuple information of the previous cycle in the local arbitration disk is the same as the current main GI tuple information, it also includes: determining the time range of the previous cycle based on the time range of the current cycle, and then determining the corresponding historical main GI tuple information and the historical backup GI tuple information from the local arbitration disk based on the time range of the previous cycle.
[0058] Step S24: If the historical main GI tuple information is different from the current main GI tuple information, the first startup information for starting the backup node is sent to the management end; if the historical backup GI tuple information is different from the current backup GI tuple information, the second startup information for starting the main node is sent to the management end, so that the management end uses the received startup information to control the startup of the corresponding node.
[0059] In this embodiment, a time range of the current cycle is determined, and current primary GI tuple information corresponding to the master node and current backup GI tuple information corresponding to the backup node within the current cycle are obtained, and the corresponding information acquisition time is recorded; the time range and the information acquisition time are written into the current primary GI tuple information and the current backup GI tuple information, respectively, and then the updated current primary GI tuple information and the current backup GI tuple information are saved to a local arbitration disk; a determination is made as to whether historical primary GI tuple information of a previous cycle in the local arbitration disk is identical to the current primary GI tuple information, and whether historical backup GI tuple information of a previous cycle in the local arbitration disk is identical to the current backup GI tuple information; if the historical primary GI tuple information is different from the current primary GI tuple information, first startup information for starting the backup node is sent to the management end; if the historical backup GI tuple information is different from the current backup GI tuple information, second startup information for starting the master node is sent to the management end, so that the management end uses the received startup information to control the startup of the corresponding node. This application periodically obtains and determines whether the GI tuple information in the arbitration disk is the same, thereby determining the information for restarting the node and sending it to the management end. It can effectively avoid the problem of data loss caused by abnormalities in both the primary and backup nodes, and improve the stability and security of node operation.
[0060] For example, Figure 3As shown, a logical unit is created from centralized storage or distributed storage, and a data link is established between the primary node and the backup node and the logical unit. Then, the status of the logical unit is determined. If the status of the logical unit is available, an arbitration disk is established based on the logical unit and the data link, and the arbitration disk is formatted. The arbitration disk is successfully created to obtain a local arbitration disk. If the data link between the primary node and the backup node and the logical unit is not successfully established or the status of the logical unit is unavailable, the arbitration disk is failed to be created. Hearbeat (heartbeat program) periodically obtains the main GI tuple information corresponding to the master node and the backup GI tuple information corresponding to the backup node based on the arbitration disk startup service mechanism, and determines whether the universal unique identifier in the historical main GI tuple information of the previous cycle in the local arbitration disk is the same as the universal unique identifier in the current main GI tuple information, and at the same time determines whether the universal unique identifier in the historical backup GI tuple information of the previous cycle in the local arbitration disk is the same as the universal unique identifier in the current backup GI tuple information. If the historical main GI tuple information is different from the current main GI tuple information (i.e., A is powered off), then send a message for starting the The first startup information of the backup node is sent to the management end (i.e., starting B). If the historical backup GI tuple information is different from the current backup GI tuple information (i.e., B is powered off), the second startup information for starting the master node is sent to the management end (i.e., starting A); if the historical master GI tuple information is different from the current master GI tuple information and the historical backup GI tuple information is different from the current backup GI tuple information (i.e., A and B are globally powered off), the startup information for starting the master node or starting the backup node or starting the master node and a single backup node at the same time is sent to the management end (i.e., starting A or starting B or starting A and B at the same time).
[0061] For example, Figure 4 As shown, for example, if the update cycle is 15 seconds, 0 seconds to 15 seconds is used as the first cycle range, and the received primary GI tuple information and backup GI tuple information are saved to the arbitration disk. Then 15 seconds to 30 seconds is used as the second cycle, and 0 seconds to 15 seconds is the previous cycle. The arbitration disk path is saved to the / etc / inspur / qdisk file. The arbitration disk saves the universal unique identifier (i.e., the UUID corresponding to 01) in the received primary GI tuple information to the header corresponding to 01, and the GI tuple value in the primary GI tuple information is saved to the data storage corresponding to 01. The universal unique identifier (i.e., the UUID corresponding to 02) in the backup GI tuple information is saved to the header corresponding to 02, and the GI tuple value in the backup GI tuple information is saved to the data storage corresponding to 02.
[0062] See also Figure 5 As shown, the embodiment of the present invention discloses a single-node startup device, which may specifically include:
[0063] The information acquisition module 11 is used to acquire and save in the local arbitration disk the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle;
[0064] An information determination module 12 is configured to determine whether the historical primary GI tuple information of the previous cycle in the local arbitration disk is identical to the current primary GI tuple information, and to determine whether the historical backup GI tuple information of the previous cycle in the local arbitration disk is identical to the current backup GI tuple information;
[0065] The information sending module 13 is used to send the first startup information for starting the backup node to the management end if the historical main GI tuple information is different from the current main GI tuple information; if the historical backup GI tuple information is different from the current backup GI tuple information, send the second startup information for starting the main node to the management end, so that the management end uses the received startup information to control the startup of the corresponding node.
[0066] In this embodiment, the current main GI tuple information corresponding to the master node and the current standby GI tuple information corresponding to the standby node in the current cycle are obtained and saved in the local arbitration disk; it is determined whether the historical main GI tuple information of the previous cycle in the local arbitration disk is the same as the current main GI tuple information, and whether the historical standby GI tuple information of the previous cycle in the local arbitration disk is the same as the current standby GI tuple information; if the historical main GI tuple information is not the same as the current main GI tuple information, the first startup information for starting the standby node is sent to the management end; if the historical standby GI tuple information is not the same as the current standby GI tuple information, the second startup information for starting the master node is sent to the management end, so that the management end uses the received startup information to control the startup of the corresponding node. This application periodically obtains and determines whether the GI tuple information in the arbitration disk is the same, thereby determining the information for restarting the node and sending it to the management end, which can effectively avoid the problem of data loss caused by abnormalities in both the master and standby nodes, and improve the stability and security of node operation.
[0067] In some specific embodiments, the information acquisition module 11 may specifically include:
[0068] A data link establishment module, configured to create a logical unit from a centralized storage or a distributed storage, and to establish a data link between the primary node and the backup node and the logical unit;
[0069] The arbitration disk establishment module is used to determine the state of the logical unit. If the state of the logical unit is available, an arbitration disk is established based on the logical unit and the data link, and the arbitration disk is formatted to obtain a local arbitration disk.
[0070] In some specific embodiments, the information acquisition module 11 may specifically include:
[0071] An IP address adding module is used to add corresponding IP addresses to the primary node and the backup node respectively, so as to obtain a primary IP address and a backup IP address in the storage area network;
[0072] The storage adapter scanning module is used to scan the storage adapter and establish data links between the primary node and the backup node and the logical unit based on the primary IP address and the backup IP address.
[0073] In some specific embodiments, the information determination module 12 may specifically include:
[0074] The information acquisition time recording module is used to determine the time range of the current cycle, obtain the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node within the current cycle, and record the corresponding information acquisition time;
[0075] The tuple information saving module is used to write the time range and the information acquisition time into the current primary GI tuple information and the current backup GI tuple information respectively, and then save the updated current primary GI tuple information and the current backup GI tuple information to the local arbitration disk.
[0076] In some specific embodiments, the information determination module 12 may specifically include:
[0077] A time range determination module, configured to determine a time range of a previous cycle based on the time range of the current cycle;
[0078] The historical information determining module is configured to determine the corresponding historical primary GI tuple information and the historical backup GI tuple information from the local arbitration disk based on the time range of the previous cycle.
[0079] In some specific embodiments, the information determination module 12 may specifically include:
[0080] a primary GI tuple information determination module, configured to determine whether the universally unique identifier in the historical primary GI tuple information of the previous cycle in the local arbitration disk is the same as the universally unique identifier in the current primary GI tuple information;
[0081] The standby GI tuple information determination module is configured to determine whether the universally unique identifier in the historical standby GI tuple information of the previous cycle in the local arbitration disk is the same as the universally unique identifier in the current standby GI tuple information.
[0082] In some specific embodiments, the information sending module 13 may specifically include:
[0083] A startup information sending module is used to send startup information for starting the main node or starting the backup node or starting the main node and a single backup node at the same time to the management end if the historical main GI tuple information is different from the current main GI tuple information and the historical backup GI tuple information is different from the current backup GI tuple information.
[0084] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the single-node startup method performed by the electronic device disclosed in any of the aforementioned embodiments.
[0085] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0086] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.
[0087] Among them, the operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222 to enable the processor 21 to calculate and process the data 223 in the memory 22. It can be Windows, Unix, Linux, etc. In addition to including computer programs that can be used to complete the single-node startup method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks. In addition to including data transmitted from external devices received by the single-node startup device, the data 223 can also include data collected by its own input and output interface 25.
[0088] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0089] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the single-node startup method disclosed in any of the aforementioned embodiments are implemented.
[0090] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0091] The above is a detailed introduction to the single-node startup method, device, equipment and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A single node startup method, characterized in that: include: Obtain and save the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle in the local arbitration disk; Determine whether the historical primary GI tuple information of the previous cycle in the local arbitration disk is the same as the current primary GI tuple information, and determine whether the historical backup GI tuple information of the previous cycle in the local arbitration disk is the same as the current backup GI tuple information; If the historical primary GI tuple information is different from the current primary GI tuple information, first startup information for starting the backup node is sent to the management end. If the historical backup GI tuple information is different from the current backup GI tuple information, second startup information for starting the primary node is sent to the management end, so that the management end controls the startup of the corresponding node using the received startup information. The obtaining and storing in the local arbitration disk the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle includes: determining the time range of the current cycle, obtaining the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle, and recording the corresponding information acquisition time; The time range and the information acquisition time are written into the current primary GI tuple information and the current backup GI tuple information respectively, and then the updated current primary GI tuple information and the current backup GI tuple information are saved to the local arbitration disk.
2. The single-node startup method according to claim 1, characterized in that: Before obtaining and storing the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle in the local arbitration disk, the method further includes: Creating a logical unit from centralized storage or distributed storage, and establishing a data link between the primary node and the backup node and the logical unit; The state of the logical unit is determined. If the state of the logical unit is available, an arbitration disk is established based on the logical unit and the data link, and the arbitration disk is formatted to obtain a local arbitration disk.
3. The single-node startup method according to claim 2, characterized in that: The establishing of a data link between the master node and the backup node and the logical unit includes: Add corresponding IP addresses to the primary node and the backup node respectively to obtain a primary IP address and a backup IP address in the storage area network; Scan storage adapters, and establish data links between the primary node and the backup node and the logical unit based on the primary IP address and the backup IP address.
4. The single-node startup method according to claim 1, characterized in that: Before determining whether the historical primary GI tuple information of the previous cycle in the local arbitration disk is identical to the current primary GI tuple information, and determining whether the historical backup GI tuple information of the previous cycle in the local arbitration disk is identical to the current backup GI tuple information, the method further includes: Determine the time range of the previous cycle based on the time range of the current cycle; The corresponding historical primary GI tuple information and the historical backup GI tuple information are determined from the local arbitration disk based on the time range of the previous cycle.
5. The single-node startup method according to claim 1, characterized in that: The determining whether the historical primary GI tuple information of the previous cycle in the local arbitration disk is the same as the current primary GI tuple information, and determining whether the historical backup GI tuple information of the previous cycle in the local arbitration disk is the same as the current backup GI tuple information, includes: Determine whether the universally unique identifier in the historical primary GI tuple information of the previous cycle in the local arbitration disk is the same as the universally unique identifier in the current primary GI tuple information; It is determined whether the universally unique identifier in the historical standby GI tuple information of the previous cycle in the local arbitration disk is the same as the universally unique identifier in the current standby GI tuple information.
6. The single-node startup method according to any one of claims 1 to 5, characterized in that: After determining whether the historical primary GI tuple information of the previous cycle in the local arbitration disk is the same as the current primary GI tuple information, and determining whether the historical backup GI tuple information of the previous cycle in the local arbitration disk is the same as the current backup GI tuple information, the method further includes: If the historical main GI tuple information is different from the current main GI tuple information and the historical backup GI tuple information is different from the current backup GI tuple information, then the startup information for starting the main node or starting the backup node or starting the main node and a single backup node at the same time is sent to the management end.
7. A single-node startup device, characterized in that: include: An information acquisition module is used to acquire and save in a local arbitration disk the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle; an information determination module, configured to determine whether the historical primary GI tuple information of the previous cycle in the local arbitration disk is identical to the current primary GI tuple information, and to determine whether the historical backup GI tuple information of the previous cycle in the local arbitration disk is identical to the current backup GI tuple information; an information sending module, configured to send first startup information for starting the backup node to the management terminal if the historical primary GI tuple information is different from the current primary GI tuple information, and to send second startup information for starting the primary node to the management terminal if the historical backup GI tuple information is different from the current backup GI tuple information, so that the management terminal controls the startup of the corresponding node using the received startup information; The obtaining and storing in the local arbitration disk the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle includes: determining the time range of the current cycle, obtaining the current primary GI tuple information corresponding to the primary node and the current backup GI tuple information corresponding to the backup node in the current cycle, and recording the corresponding information acquisition time; The time range and the information acquisition time are written into the current primary GI tuple information and the current backup GI tuple information respectively, and then the updated current primary GI tuple information and the current backup GI tuple information are saved to the local arbitration disk.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the single-node startup method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that Used to store a computer program; wherein, when the computer program is executed by a processor, the single-node startup method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Data disaster recovery method, device and system
CN106254100A
Information synchronization method, device and system
CN110543512A