Storage cluster master selection method and device, equipment and medium

By deploying encrypted containers in unified SAS chassis service and using entropy weight method to process robustness indicators, the problems of misjudgment and load imbalance in storage cluster selection are solved, and efficient and reliable storage cluster selection is achieved, reducing costs and increasing costs stability.

CN119003307APending Publication Date: 2024-11-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411215401.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The existing storage cluster master selection technology has problems such as misjudgment, failure to select the master, long time to choose the master, and unbalanced load of the master node, making it difficult to achieve efficient and reliable storage cluster master selection.

Method used

Through the unified SAS chassis service deployment encrypted containers, the robustness indicators of each node to be evaluated in the storage cluster are obtained, and these indicators are processed using the entropy weight method to filter out the node with the highest robustness comprehensive score as the new master node.

Benefits of technology

The automated storage cluster selection is realized, which improves the efficiency of master selection, reduces costs, enhances stability, and takes into account the robustness indicators of nodes in multiple aspects, avoids the problems of unbalanced load of master nodes and unreliable master selection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003307A_ABST
    Figure CN119003307A_ABST
Patent Text Reader

Abstract

The invention discloses a storage cluster master selection method and device, equipment and a medium, and relates to the technical field of computer technologies, and the method comprises the steps: obtaining a robustness index of each to-be-evaluated node in a storage cluster through an encryption container; processing the robustness index of each to-be-assessed node obtained by using the encryption container by using an entropy weight method through the unified SAS chassis service to obtain a comprehensive robustness score of each to-be-assessed node; and screening out a target node with the highest robustness comprehensive score from the to-be-evaluated nodes through the unified SAS chassis service, and determining the target node as a new current main node in the storage cluster. By means of the scheme, more efficient and reliable storage cluster master selection is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a storage cluster master election method, device, equipment and medium. Background Art

[0002] Storage machines are often used to store important customer data and are known for their stability and reliability. With the continuous development of information technology, the demand for data storage is increasing, and stability and reliability are becoming more and more important. In large-scale data storage systems, a storage architecture with multiple controller nodes is usually used. Each node can manage storage devices independently, and all nodes can be interconnected through the network. In a storage cluster, the master node is responsible for managing the resources and task allocation of the cluster and saving the core data of the cluster. When a cluster failure occurs, the master node can respond in time to ensure that the cluster does not lose data and that the cluster failure does not spread. Therefore, the robustness and reliability of the master node are crucial to the operation of the entire cluster, and the rational selection of the master node is of great significance.

[0003] Currently, storage cluster leader election technologies include heartbeat packet election, voting election, and priority election. However, these leader election technologies have many problems, such as misjudgment due to inaccurate node network status, leader election failure, time-consuming leader election process, and unbalanced load on the master node.

[0004] It can be seen that how to achieve more efficient and reliable storage cluster leader election is a problem that technical personnel in this field need to solve. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a storage cluster leader selection method, device, equipment and medium to achieve more efficient and reliable storage cluster leader selection. The specific scheme is as follows:

[0006] In a first aspect, the present application discloses a storage cluster master election method, comprising:

[0007] Obtaining robustness indicators of each node to be evaluated in the storage cluster using an encrypted container deployed through a unified SAS chassis service;

[0008] The robustness index of each of the nodes to be evaluated obtained by using the encryption container is processed by the unified SAS chassis service using an entropy weight method to obtain a comprehensive robustness score of each of the nodes to be evaluated;

[0009] The target node with the highest comprehensive robustness score is selected from each of the nodes to be evaluated through the unified SAS chassis service, and the target node is determined as a new current master node in the storage cluster.

[0010] Optionally, the encrypted container is a container obtained by encrypting a preset lightweight container, the node to be evaluated is a node determined from the storage cluster based on the number of error codes of the current master node in the storage cluster, and the robustness index includes a performance index, an availability index, and a reliability index of the node to be evaluated.

[0011] Optionally, the obtaining of the robustness index of each node to be evaluated in the storage cluster by using the encrypted container deployed by the unified SAS chassis service includes:

[0012] Determine the number of error codes of the current master node in the storage cluster, and determine whether the number of error codes is greater than a preset threshold;

[0013] If the number of error codes is greater than the preset threshold, each node in the storage cluster except the current master node is determined as a node to be evaluated, and the robustness index of each node to be evaluated in the storage cluster is obtained by using an encrypted container deployed by a unified SAS chassis service;

[0014] If the number of error codes is not greater than the preset threshold, all nodes in the storage cluster are determined as nodes to be evaluated, and the robustness index of each node to be evaluated in the storage cluster is obtained using the encrypted container deployed by the unified SAS chassis service.

[0015] Optionally, the performance indicator is an indicator used to measure the efficiency and speed of the nodes in the storage cluster in completing tasks, the availability indicator is an indicator used to measure the degree of availability of the nodes in the storage cluster during operating hours, and the reliability indicator is an indicator used to measure the ability of the nodes in the storage cluster to maintain normal operation within a preset time period.

[0016] Optionally, the sub-indicators in the performance indicators are the node's storage bandwidth, throughput, response time, and storage capacity, the sub-indicators in the availability indicators are the node's availability, downtime, and maintenance time, and the sub-indicators in the reliability indicators are the node's mean time between failures, mean repair time, accuracy and integrity, and fault self-healing ability; wherein, the availability is the proportion of time during which services can be provided normally during normal operating hours, the downtime is the time during which services cannot be provided due to a fault, and the maintenance time is the time required for a node to perform maintenance or upgrade operations.

[0017] Optionally, the robustness index of each node to be evaluated is processed using an entropy weight method to obtain a comprehensive robustness score of each node to be evaluated, including:

[0018] For any node to be evaluated among the nodes to be evaluated, the performance index, the availability index and the reliability index of the node to be evaluated are respectively standardized to obtain dimensionless standardized indexes;

[0019] The sub-indicators under each of the standardized indicators are summed up respectively to obtain the sum of the sub-indicators corresponding to each of the standardized indicators, and the ratio between each of the sub-indicators in the standardized indicator and the corresponding sum of the sub-indicators is determined as the characteristic weight of the corresponding sub-indicator in the standardized indicator, and the information entropy of each of the standardized indicators is determined based on the characteristic weight;

[0020] Obtaining a difference between a preset value and the information entropy of each of the standardized indicators, and determining each of the differences as a difference coefficient of the corresponding standardized indicator;

[0021] Summing each of the difference coefficients to obtain a difference coefficient sum, and determining a ratio between the difference coefficient and the difference coefficient sum as a weight of the corresponding standardized index;

[0022] The comprehensive robustness score of any node to be evaluated is determined based on the weights of each of the standardized indicators of any node to be evaluated and the characteristic proportions of each of the sub-indicators in the standardized indicators.

[0023] Optionally, after determining the target node as the new current master node in the storage cluster, the method further includes:

[0024] If the new current master node is not the same master node as the original master node where the failure occurred, monitoring whether the original master node where the failure occurred has recovered to normal;

[0025] If the failed original master node returns to normal, the encrypted container is used to obtain the robustness index of each node in the storage cluster, and a new round of master election operation is performed within the entire node range of the storage system based on the acquired robustness index of each node.

[0026] Optionally, the storage cluster master election method further includes:

[0027] When a fault occurs in the current master node, a fault report is generated through the unified SAS chassis service;

[0028] After determining the new current master node, generating a cluster master election log through the unified SAS chassis service;

[0029] The fault report and / or the cluster master election log is sent to a display platform through a preset interface.

[0030] In a second aspect, the present invention discloses a storage cluster master selection device, comprising:

[0031] An indicator acquisition module, used to obtain robustness indicators of each node to be evaluated in the storage cluster by using an encrypted container deployed through a unified SAS chassis service;

[0032] A score determination module, used to process the robustness index of each node to be evaluated obtained by using the encryption container by using the entropy weight method through the unified SAS chassis service, so as to obtain a comprehensive robustness score of each node to be evaluated;

[0033] The node master selection module is used to select the target node with the highest comprehensive robustness score from each of the nodes to be evaluated through the unified SAS chassis service, and determine the target node as the new current master node in the storage cluster.

[0034] In a third aspect, the present invention discloses an electronic device, comprising:

[0035] Memory, used to store computer programs;

[0036] The processor is used to execute the computer program to implement the steps of the storage cluster master election method disclosed above.

[0037] In a fourth aspect, the present invention discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the storage cluster master election method disclosed above are implemented.

[0038] It can be seen that the present invention uses an encrypted container deployed by a unified SAS chassis service to obtain the robustness index of each node to be evaluated in the storage cluster; the unified SAS chassis service uses an entropy weight method to process the robustness index of each node to be evaluated obtained by using the encrypted container to obtain a comprehensive robustness score for each node to be evaluated; the unified SAS chassis service selects the target node with the highest comprehensive robustness score from each node to be evaluated, and determines the target node as the new current master node in the storage cluster.

[0039] Beneficial effects: The present invention realizes automatic storage cluster master selection through unified SAS chassis service, improves the efficiency of storage cluster master selection, and integrates the unified SAS chassis service with the storage cluster, does not require an additional system or platform, can reduce the storage cluster master selection cost and improve stability; when using an encrypted container to obtain the robustness index of each node to be evaluated in the storage cluster, the security and reliability of the data can be guaranteed, and the container has the advantages of being lightweight, easy to deploy, strong in real time, high in resource utilization, and capable of storing data, so that the performance of the storage cluster is improved; the entropy weight method is used to process the robustness index to obtain the comprehensive robustness score of each node to be evaluated, and various robustness-related indicators of the node can be considered in many aspects, so that the most robust controller node in the storage cluster can be selected, thereby avoiding the problems of unbalanced load of the master node and unreliable master selection. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A flow chart of a storage cluster master election method provided by an embodiment of the present invention;

[0042] Figure 2 A specific storage cluster master selection method flow chart provided in an embodiment of the present invention

[0043] Figure 3 A specific schematic diagram of cluster leader election provided by an embodiment of the present invention;

[0044] Figure 4 A schematic diagram of the structure of a storage cluster master selection device provided by an embodiment of the present invention;

[0045] Figure 5 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.

[0047] Storage machines are often used to store important customer data and are known for their stability and reliability. With the continuous development of information technology, the demand for data storage is increasing, and stability and reliability are becoming more and more important. In large-scale data storage systems, a storage architecture with multiple controller nodes is usually used. Each node can manage storage devices independently, and all nodes can be interconnected through the network. In a storage cluster, the master node is responsible for managing the resources and task allocation of the cluster and saving the core data of the cluster. When a cluster failure occurs, the master node can respond in time to ensure that the cluster does not lose data and that the cluster failure does not spread. Therefore, the robustness and reliability of the master node are crucial to the operation of the entire cluster, and the rational selection of the master node is of great significance.

[0048] Currently, storage cluster leader election technologies include heartbeat packet election, voting election, and priority election. However, these leader election technologies have many problems, such as misjudgment due to inaccurate node network status, leader election failure, time-consuming leader election process, and unbalanced load on the master node.

[0049] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.

[0050] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0051] Next, a storage cluster master election solution provided by an embodiment of the present invention is described in detail. Figure 1 A storage cluster master election method provided in an embodiment of the present invention includes:

[0052] Step S11: using the encrypted container deployed by the unified SAS chassis service to obtain the robustness index of each node to be evaluated in the storage cluster.

[0053] In this embodiment, the encrypted container is a container obtained by encrypting a preset lightweight container, the node to be evaluated is a node determined from the storage cluster based on the number of error codes of the current master node in the storage cluster, and the robustness index includes the performance index, availability index and reliability index of the node to be evaluated.

[0054] The unified SAS (Serial Attached SCSI) chassis service (Organic SASEnclosure Service) monitors whether the current master node in the storage cluster has any faults. Node faults can be divided into hardware faults, software faults, and network fault lights. Among them, hardware faults are one of the most common types of faults, which may include power failures, hard disk damage, memory failures, etc. of the server. These hardware problems will cause the node to fail to operate normally and thus cannot continue to serve as the master node. Software faults may be caused by program errors, configuration errors, system crashes, etc. For example, problems with the database management system, cluster management software, or other key software on the master node may cause the node to fail to work properly. Network failure means that if there is a problem with the network connection between the master node and other nodes, such as network delays, packet loss, interruptions, etc., the master node may fail to communicate normally with other nodes, thereby triggering the process of re-election of the master.

[0055] Deploy encrypted containers through the unified SAS chassis service, specifically preparing the container (Docker) environment; preparing the data acquisition form, writing a container file (Dockerfile) containing encryption instructions to build a container image and implement container encryption; running the encrypted container. In this way, the container has many advantages such as lightweight, easy to deploy, strong real-time performance, high resource utilization, and large data storage. It is very convenient to use the encrypted container to obtain a large amount of real-time data in the future, and encrypting the container can ensure the security and reliability of the stored data. It should be noted that the encrypted container can be pre-deployed through the unified SAS chassis service before the storage cluster selects the master, or it can be deployed through the unified SAS chassis service every time the storage cluster selects the master and needs to obtain the robustness indicators of each node to be evaluated in the storage cluster.

[0056] In this embodiment, the use of an encrypted container deployed through a unified SAS chassis service to obtain the robustness index of each node to be evaluated in the storage cluster includes: determining the number of error codes of the current master node in the storage cluster, and judging whether the number of error codes is greater than a preset threshold; if the number of error codes is greater than the preset threshold, then each node in the storage cluster except the current master node is determined as a node to be evaluated, and the encrypted container deployed through the unified SAS chassis service is used to obtain the robustness index of each node to be evaluated in the storage cluster; if the number of error codes is not greater than the preset threshold, then all nodes in the storage cluster are determined as nodes to be evaluated, and the encrypted container deployed through the unified SAS chassis service is used to obtain the robustness index of each node to be evaluated in the storage cluster.

[0057] The error code is used to record the type of fault, fault time, fault location and other information of the master node. Therefore, after the current master node fails, the relationship between the number of error codes and the preset threshold can be used to determine whether the current master node is still available. That is, if the number of error codes is greater than the preset threshold, each node in the storage cluster except the current master node is determined as a node to be evaluated, and the current master node is determined as an unavailable node, that is, the current master node cannot participate in the subsequent master election, and is deemed to have been removed from the storage cluster. The encrypted container deployed through the unified SAS chassis service is used to obtain the robustness indicators of each node to be evaluated in the storage cluster. If the number of error codes is not greater than the preset threshold, it means that the current master node is an available node, and the current master node can participate in the subsequent master election. All nodes in the storage cluster are determined as nodes to be evaluated, and the encrypted container deployed through the unified SAS chassis service is used to obtain the robustness indicators of each node to be evaluated in the storage cluster.

[0058] Furthermore, it is also possible to determine whether the current master node can be used as a node to be evaluated based on the size relationship between the error code ratio and a preset ratio threshold, that is, to determine whether the current master node still participates in the subsequent master election based on the size relationship between the error code ratio and the preset ratio threshold, specifically to determine the error code ratio of the current master node, if the error code ratio is greater than the preset ratio threshold, then each node in the storage cluster except the current master node is determined as a node to be evaluated, and the robustness index of each node to be evaluated in the storage cluster is obtained by using the encrypted container deployed through the unified SAS chassis service; if the error code ratio is not greater than the preset ratio threshold, then all nodes in the storage cluster are determined as nodes to be evaluated, and the robustness index of each node to be evaluated in the storage cluster is obtained by using the encrypted container deployed through the unified SAS chassis service, so as to avoid the inaccuracy of judging whether the current master node is still available based only on the size relationship between the number of error codes and the preset threshold, and to make the judgment conditions more diverse and flexible, so as to reasonably judge whether the current master node can be used as a node to be evaluated, and provide strong guarantee for the subsequent storage cluster master election.

[0059] In this embodiment, the performance index is an index used to measure the efficiency and speed of the nodes in the storage cluster when completing tasks, the availability index is an index used to measure the availability of the nodes in the storage cluster during the operating time, and the reliability index is an index used to measure the ability of the nodes in the storage cluster to maintain normal operation within a preset time period. It can be understood that the performance index is a series of measurement standards used to evaluate the efficiency and speed of each node in the storage cluster when performing tasks; the availability index is a metric that measures the ability of the nodes in the storage cluster to maintain an operational state or provide services within a given operating time, which reflects the degree to which the nodes can be successfully accessed and used when needed; the reliability index is a metric that measures the ability of the nodes in the storage cluster to continue to maintain their normal functions and operating states within a preset time period without failure or interruption, which reflects the stability of the nodes within the specified time and the reliability of trouble-free operation.

[0060] In this embodiment, the sub-indicators in the performance indicators are the node's storage bandwidth, throughput, response time, and storage capacity, the sub-indicators in the availability indicators are the node's availability, downtime, and maintenance time, and the sub-indicators in the reliability indicators are the node's mean time between failures, mean repair time, accuracy and integrity, and fault self-healing ability; wherein, the availability is the proportion of time during which services can be provided normally during normal operating hours, the downtime is the time during which services cannot be provided due to a fault, and the maintenance time is the time required for node maintenance or upgrade operations.

[0061] The storage bandwidth of a node refers to the node's ability to transmit data in the storage system, that is, the amount of data that can be processed or transmitted per unit time. It reflects the efficiency of the node in data reading and writing operations. The storage bandwidth directly affects the data access speed and the overall performance of the system. Throughput refers to the total amount of data that a node can successfully process per unit time. In a storage system, it usually refers to the amount of data that a node can process in read and write operations, which reflects the node's ability to process data. Response time refers to the time from when a node receives a request to when it starts processing the request or the time required to complete processing and return the result. It measures the node's response speed to requests. Storage capacity refers to the total amount of data that a node can store, which reflects the amount of data that the node can accommodate physically or logically.

[0062] The availability of a node is the proportion of time that services can be provided normally during normal operating hours; the downtime is the time that services cannot be provided due to failures; and the maintenance time is the time required for node maintenance or upgrade operations. Availability, downtime, and maintenance time together reflect the stability and operating efficiency of the system.

[0063] The mean time between failures (MTBF) of a node is an important indicator for measuring node reliability. It indicates the average working time between two adjacent failures, also known as the mean failure interval. It reflects the ability of a node to maintain functionality within a specified time. The mean time to repair (MTTR) describes the average repair time required for a node to switch from a faulty state to a working state. It measures the node's ability to recover after a failure. Accuracy and integrity reflect the node's ability to maintain accuracy and integrity during storage and transmission. Fault self-healing capability refers to the node's ability to automatically detect, diagnose and restore normal operation when a failure occurs. It reflects the node's intelligence and automation level.

[0064] Step S12: The robustness index of each node to be evaluated obtained by using the encryption container is processed by the unified SAS chassis service using an entropy weight method to obtain a comprehensive robustness score of each node to be evaluated.

[0065] In this embodiment, the entropy weight method is used to process the robustness index of each node to be evaluated to obtain a comprehensive robustness score of each node to be evaluated, including: for any node to be evaluated among the nodes to be evaluated, the performance index, the availability index and the reliability index of any node to be evaluated are respectively standardized to obtain corresponding dimensionless standardized indicators; each sub-indicator under each standardized indicator is summed to obtain the sub-indicator sum corresponding to each standardized indicator, and the ratio between each sub-indicator in the standardized indicator and the corresponding sub-indicator sum is determined as the ratio. The characteristic proportion of the corresponding sub-indicator in the standardized indicator, and the information entropy of each standardized indicator is determined based on the characteristic proportion; the difference between the preset value and the information entropy of each standardized indicator is obtained, and each difference is determined as the difference coefficient of the corresponding standardized indicator; the difference coefficient is summed to obtain the difference coefficient sum, and the ratio between the difference coefficient and the difference coefficient sum is determined as the weight of the corresponding standardized indicator; the robustness comprehensive score of any node to be evaluated is determined based on the weight of each standardized indicator of any node to be evaluated and the characteristic proportion of each sub-indicator in the standardized indicator. The entropy weight method is an objective weighting method, which determines the objective weight according to the size of the indicator variability. The basic idea of ​​the entropy weight method is that if the information entropy of an indicator is smaller, it means that the degree of variation of the indicator is greater, the amount of information provided is more, the role played in the comprehensive evaluation is greater, and its weight is greater; conversely, the greater the information entropy of an indicator, the smaller the degree of variation of the indicator, the less information provided, the smaller the role played in the comprehensive evaluation, and the smaller its weight is. Therefore, the tool of information entropy can be used to calculate the weight of each indicator and provide a basis for the comprehensive evaluation of multiple indicators.

[0066] The entropy weight method is used to process the robustness index of each node to be evaluated to obtain the comprehensive robustness score of each node to be evaluated. i Take the comprehensive robustness score of as an example to illustrate:

[0067] 1) Set the node to be evaluated i The performance index, availability index and reliability index of the system are standardized respectively to obtain dimensionless standardized indexes;

[0068] 2) Sum up each sub-indicator under each standardized indicator to obtain the sum of the sub-indicators corresponding to each standardized indicator, and determine the ratio between each sub-indicator in the standardized indicator and the corresponding sum of the sub-indicators as the characteristic weight of the corresponding sub-indicator in the standardized indicator; wherein, the formula for obtaining the characteristic weight of the sub-indicator is as follows:

[0069] ;

[0070] In the formula, represents the i-th sub-indicator under the j-th standardized indicator, m represents the number of all sub-indicators under the j-th standardized indicator, It represents the characteristic weight of the ith sub-indicator under the jth standardized indicator;

[0071] 3) Determine the information entropy of each standardized indicator based on the feature weight; the specific formula is as follows:

[0072] ;

[0073] In the formula, is a constant, represents the information entropy of the jth standardized indicator;

[0074] 4) Obtain the difference between the preset value and the information entropy of each standardized indicator, and determine each difference as the difference coefficient of the corresponding standardized indicator; the specific formula is as follows:

[0075] ;

[0076] In the formula, represents the coefficient of variation of the jth standardized indicator;

[0077] 5) The sum of the difference coefficients is obtained by summing up the difference coefficients, and the ratio between the difference coefficient and the difference coefficient sum is determined as the weight of the corresponding standardized indicator; the specific formula is as follows:

[0078] ;

[0079] In the formula, represents the weight of the jth standardized indicator;

[0080] 6) The robustness comprehensive score of any node to be evaluated is determined based on the weights of each standardized indicator of any node to be evaluated and the characteristic proportions of each sub-indicator in the standardized indicator; the specific formula is as follows:

[0081] ;

[0082] In the formula, Indicates the node to be evaluated i The overall robustness score.

[0083] Step S13: Screening out the target node with the highest comprehensive robustness score from the nodes to be evaluated through the unified SAS chassis service, and determining the target node as the new current master node in the storage cluster.

[0084] After obtaining the comprehensive robustness scores of each node to be evaluated, the comprehensive robustness scores of each node to be evaluated are sorted, and then the node to be evaluated with the highest comprehensive robustness score is selected as the target node. For example, the comprehensive robustness scores of each node to be evaluated are sorted in order from large to small, and then the node to be evaluated with the first comprehensive robustness score is selected as the target node, and the target node is determined as the new current master node in the storage cluster to replace the original master node that has failed.

[0085] In this embodiment, it also includes: when the current master node fails, generating a fault report through the unified SAS chassis service; after determining the new current master node, generating a cluster master election log through the unified SAS chassis service; and sending the fault report and / or the cluster master election log to the display platform through a preset interface.

[0086] The unified SAS chassis service can provide early warnings so that users can perform cluster maintenance in a timely manner. That is to say, when a fault occurs in the current master node, a fault report is generated by the unified SAS chassis service and sent to the display platform through a preset interface. In this way, users can understand the specific fault situation on the display platform.

[0087] The unified SAS chassis service has the log collection capability. The unified SAS chassis service can also generate a cluster master election log. That is, after determining the new current master node, the unified SAS chassis service generates a cluster master election log, and then sends the cluster master election log to the display platform through the preset interface, so that users can timely understand the latest master node of the storage cluster on the display platform and realize full automation of the master election process.

[0088] It can be seen that the present invention uses an encrypted container deployed by a unified SAS chassis service to obtain the robustness index of each node to be evaluated in the storage cluster; the unified SAS chassis service uses an entropy weight method to process the robustness index of each node to be evaluated obtained by using the encrypted container to obtain a comprehensive robustness score for each node to be evaluated; the unified SAS chassis service selects the target node with the highest comprehensive robustness score from each node to be evaluated, and determines the target node as the new current master node in the storage cluster.

[0089] Beneficial effects: The present invention realizes automatic storage cluster master selection through unified SAS chassis service, improves the efficiency of storage cluster master selection, and integrates the unified SAS chassis service with the storage cluster, does not require an additional system or platform, can reduce the storage cluster master selection cost and improve stability; when using an encrypted container to obtain the robustness index of each node to be evaluated in the storage cluster, the security and reliability of the data can be guaranteed, and the container has the advantages of being lightweight, easy to deploy, strong in real time, high in resource utilization, and capable of storing data, so that the performance of the storage cluster is improved; the entropy weight method is used to process the robustness index to obtain the comprehensive robustness score of each node to be evaluated, and various robustness-related indicators of the node can be considered in many aspects, so that the most robust controller node in the storage cluster can be selected, thereby avoiding the problems of unbalanced load of the master node and unreliable master selection.

[0090] See also Figure 2 The embodiment of the present invention discloses a specific method for selecting a master in a storage cluster. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution. It includes:

[0091] Step S21: using the encrypted container deployed by the unified SAS chassis service to obtain the robustness index of each node to be evaluated in the storage cluster.

[0092] If the current master node in the storage cluster fails, it means that the storage cluster needs to enter the master election mode through the unified SAS chassis service. Based on the number of error codes of the current master node in the storage cluster, it is determined whether the current master node is available, that is, whether the current master node needs to be blocked. The specific situation is as follows:

[0093] 1) If the current master node needs to be shielded and a fault report of the current master node needs to be reported, then the nodes to be evaluated are the nodes in the storage cluster other than the current master node. The remaining nodes other than the current master node enter the master election process and obtain the robustness indicators of each node to be evaluated in the storage cluster through the encrypted container deployed by the unified SAS chassis service;

[0094] 2) If the current master node does not need to be shielded, the nodes to be evaluated are all nodes in the storage cluster. That is, all nodes enter the master election process and obtain the robustness indicators of each node to be evaluated in the storage cluster through the encrypted container deployed by the unified SAS chassis service.

[0095] This embodiment obtains the robustness index of the node to be evaluated in real time, avoids the storage process occupation caused by collecting robustness indicators in a timed manner, and further affects the storage performance. In addition, if the amount of collected data is small, the robustness of the node cannot be well evaluated. The collection end collects data through an interface, which is highly insecure and has a high risk for the reliable security of storage. In addition, an additional client is required as the collection end, resulting in a complex topology environment and increased resource occupation. The collection in this embodiment is more comprehensive, and the robustness index of the node to be evaluated is collected using an encrypted container. No interface collection is required, which has higher security. The unified SAS chassis service is integrated with the storage cluster, and no additional client is required. The cost is low and the environment is more concise.

[0096] Step S22: The robustness index of each node to be evaluated obtained by using the encryption container is processed by the unified SAS chassis service using an entropy weight method to obtain a comprehensive robustness score of each node to be evaluated.

[0097] Compared with the equal-weighted average method, the entropy weight method can take into account the differences between different indicators; compared with the empirical scoring method, the entropy weight method does not require empirical judgment, thus avoiding subjectivity and one-sidedness; compared with the hierarchical analysis method, the entropy weight method is simpler to calculate and avoids excessive resource consumption.

[0098] Step S23: Screening out the target node with the highest comprehensive robustness score from the nodes to be evaluated through the unified SAS chassis service, and determining the target node as the new current master node in the storage cluster.

[0099] Step S24: If the new current master node is not the same master node as the original master node where the failure occurred, monitor whether the original master node where the failure occurred has recovered to normal.

[0100] For example Figure 3 A specific cluster master election diagram is shown. Because the original master node is usually more robust, if the new current master node is not the same master node as the original master node that failed, the original master node that failed is monitored in real time to see if it has recovered to normal.

[0101] Step S25: If the failed original master node recovers, the encrypted container is used to obtain the robustness index of each node in the storage cluster, and a new round of master election operation is performed in the entire node range of the storage system based on the acquired robustness index of each node.

[0102] If the failed original master node recovers to normal, it means that the original master node is currently an available node, so a new round of master election can be started, that is, the robustness index of each node in the storage cluster is obtained by using the encrypted container, and a new round of master election is performed in the whole node range of the storage system based on the obtained robustness index of each node, so as to ensure that the robustness of the selected master node is the highest in the cluster.

[0103] It can be seen that the present invention processes the robustness index of each node of the multi-control storage cluster collected by the deployed encrypted container based on the entropy weight algorithm through the unified SAS chassis service to obtain a comprehensive robustness score that can fully reflect the status of each node, thereby improving the accuracy and reliability of the master node selection; the nodes are sorted according to the robustness index, and the node with the highest robustness is selected as the master node, which can ensure that the master node has good performance, availability and reliability; when the master node fails or is unavailable, it can respond quickly to complete the master election, avoiding the loss of data and the destruction of the cluster in the absence of a master, and greatly improving the fault recovery capability and flexibility of the cluster; the entire master election process is fully automated through the unified SAS chassis service, the master election process is efficient, and complex processes such as voting or priority setting can be avoided, which greatly improves the efficiency of the master election.

[0104] Figure 4 A schematic diagram of the structure of a storage cluster master selection device provided by an embodiment of the present invention includes:

[0105] An indicator acquisition module 11 is used to obtain the robustness indicator of each node to be evaluated in the storage cluster by using an encrypted container deployed by a unified SAS chassis service;

[0106] A score determination module 12 is used to process the robustness index of each node to be evaluated obtained by using the encryption container by using the entropy weight method through the unified SAS chassis service to obtain a comprehensive robustness score of each node to be evaluated;

[0107] The node master selection module 13 is used to select the target node with the highest comprehensive robustness score from each of the nodes to be evaluated through the unified SAS chassis service, and determine the target node as the new current master node in the storage cluster.

[0108] It can be seen that the present invention uses an encrypted container deployed by a unified SAS chassis service to obtain the robustness index of each node to be evaluated in the storage cluster; the unified SAS chassis service uses an entropy weight method to process the robustness index of each node to be evaluated obtained by using the encrypted container to obtain a comprehensive robustness score for each node to be evaluated; the unified SAS chassis service selects the target node with the highest comprehensive robustness score from each node to be evaluated, and determines the target node as the new current master node in the storage cluster.

[0109] Beneficial effects: The present invention realizes automatic storage cluster master selection through unified SAS chassis service, improves the efficiency of storage cluster master selection, and integrates the unified SAS chassis service with the storage cluster, does not require an additional system or platform, can reduce the storage cluster master selection cost and improve stability; when using an encrypted container to obtain the robustness index of each node to be evaluated in the storage cluster, the security and reliability of the data can be guaranteed, and the container has the advantages of being lightweight, easy to deploy, strong in real time, high in resource utilization, and capable of storing data, so that the performance of the storage cluster is improved; the entropy weight method is used to process the robustness index to obtain the comprehensive robustness score of each node to be evaluated, and various robustness-related indicators of the node can be considered in many aspects, so that the most robust controller node in the storage cluster can be selected, thereby avoiding the problems of unbalanced load of the master node and unreliable master selection.

[0110] Furthermore, the present application also discloses an electronic device. Figure 5 This is a structural diagram of an electronic device according to an exemplary embodiment. The content of the diagram cannot be considered as any limitation on the scope of use of this application. The electronic device 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. In addition, the electronic device in this embodiment may specifically be an electronic computer. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the following steps:

[0111] Obtaining robustness indicators of each node to be evaluated in the storage cluster using an encrypted container deployed through a unified SAS chassis service;

[0112] The robustness index of each of the nodes to be evaluated obtained by using the encryption container is processed by the unified SAS chassis service using an entropy weight method to obtain a comprehensive robustness score of each of the nodes to be evaluated;

[0113] The target node with the highest comprehensive robustness score is selected from each of the nodes to be evaluated through the unified SAS chassis service, and the target node is determined as a new current master node in the storage cluster to replace the original master node that has failed.

[0114] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:

[0115] The encrypted container is a container obtained by encrypting a preset lightweight container, the node to be evaluated is a node determined from the storage cluster based on the number of error codes of the current master node in the storage cluster, and the robustness index includes the performance index, availability index and reliability index of the node to be evaluated.

[0116] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:

[0117] The method of obtaining the robustness index of each node to be evaluated in the storage cluster by using the encrypted container deployed by the unified SAS chassis service includes:

[0118] Determine the number of error codes of the current master node in the storage cluster, and determine whether the number of error codes is greater than a preset threshold;

[0119] If the number of error codes is greater than the preset threshold, each node in the storage cluster except the current master node is determined as a node to be evaluated, and the robustness index of each node to be evaluated in the storage cluster is obtained by using an encrypted container deployed by a unified SAS chassis service;

[0120] If the number of error codes is not greater than the preset threshold, all nodes in the storage cluster are determined as nodes to be evaluated, and the robustness index of each of the nodes to be evaluated in the storage cluster is obtained using an encrypted container deployed through a unified SAS chassis service.

[0121] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:

[0122] The performance indicator is an indicator used to measure the efficiency and speed of the nodes in the storage cluster in completing tasks, the availability indicator is an indicator used to measure the degree to which the nodes in the storage cluster can be used during the running time, and the reliability indicator is an indicator used to measure the ability of the nodes in the storage cluster to maintain normal operation within a preset time period.

[0123] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:

[0124] The sub-indicators of the performance indicators are the node's storage bandwidth, throughput, response time, and storage capacity; the sub-indicators of the availability indicators are the node's availability, downtime, and maintenance time; the sub-indicators of the reliability indicators are the node's mean time between failures, mean repair time, accuracy and integrity, and fault self-healing ability; wherein, the availability is the proportion of time during which services can be provided normally during normal operating hours, the downtime is the time during which services cannot be provided due to a fault, and the maintenance time is the time required for node maintenance or upgrade operations.

[0125] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:

[0126] The robustness index of each node to be evaluated is processed using the entropy weight method to obtain a comprehensive robustness score of each node to be evaluated, including:

[0127] For any node to be evaluated among the nodes to be evaluated, the performance index, the availability index and the reliability index of the node to be evaluated are respectively standardized to obtain dimensionless standardized indexes;

[0128] The sub-indicators under each of the standardized indicators are summed up respectively to obtain the sum of the sub-indicators corresponding to each of the standardized indicators, and the ratio between each of the sub-indicators in the standardized indicator and the corresponding sum of the sub-indicators is determined as the characteristic weight of the corresponding sub-indicator in the standardized indicator, and the information entropy of each of the standardized indicators is determined based on the characteristic weight;

[0129] Obtaining a difference between a preset value and the information entropy of each of the standardized indicators, and determining each of the differences as a difference coefficient of the corresponding standardized indicator;

[0130] Summing each of the difference coefficients to obtain a difference coefficient sum, and determining a ratio between the difference coefficient and the difference coefficient sum as a weight of the corresponding standardized index;

[0131] The comprehensive robustness score of any node to be evaluated is determined based on the weights of each of the standardized indicators of any node to be evaluated and the characteristic proportions of each of the sub-indicators in the standardized indicators.

[0132] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:

[0133] After determining the target node as the new current master node in the storage cluster, the method further includes:

[0134] If the new current master node is not the same master node as the original master node where the failure occurred, monitoring whether the original master node where the failure occurred has recovered to normal;

[0135] If the failed original master node returns to normal, the encrypted container is used to obtain the robustness index of each node in the storage cluster, and a new round of master election operation is performed within the entire node range of the storage system based on the acquired robustness index of each node.

[0136] In some specific implementations, the processor may further include the following steps by executing the computer program stored in the memory:

[0137] When a fault occurs in the current master node, a fault report is generated through the unified SAS chassis service;

[0138] After determining the new current master node, generating a cluster master election log through the unified SAS chassis service;

[0139] The fault report and / or the cluster master election log is sent to a display platform through a preset interface.

[0140] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present 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, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0141] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0142] The operating system 221 is used to manage and control various hardware devices on the electronic device and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the storage cluster master election method executed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0143] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the storage cluster master election method disclosed above is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.

[0144] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0145] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0146] The steps of the method or algorithm 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), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0147] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0148] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for selecting a master in a storage cluster, characterized in that: include: Obtaining robustness indicators of each node to be evaluated in the storage cluster using an encrypted container deployed through a unified SAS chassis service; The robustness index of each of the nodes to be evaluated obtained by using the encryption container is processed by the unified SAS chassis service using an entropy weight method to obtain a comprehensive robustness score of each of the nodes to be evaluated; The target node with the highest comprehensive robustness score is selected from each of the nodes to be evaluated through the unified SAS chassis service, and the target node is determined as a new current master node in the storage cluster.

2. The method for selecting a master in a storage cluster according to claim 1, wherein: The encrypted container is a container obtained by encrypting a preset lightweight container, the node to be evaluated is a node determined from the storage cluster based on the number of error codes of the current master node in the storage cluster, and the robustness index includes the performance index, availability index and reliability index of the node to be evaluated.

3. The method for selecting a master in a storage cluster according to claim 2, wherein: The method of obtaining the robustness index of each node to be evaluated in the storage cluster by using the encrypted container deployed by the unified SAS chassis service includes: Determine the number of error codes of the current master node in the storage cluster, and determine whether the number of error codes is greater than a preset threshold; If the number of error codes is greater than the preset threshold, each node in the storage cluster except the current master node is determined as a node to be evaluated, and the robustness index of each node to be evaluated in the storage cluster is obtained by using an encrypted container deployed by a unified SAS chassis service; If the number of error codes is not greater than the preset threshold, all nodes in the storage cluster are determined as nodes to be evaluated, and the robustness index of each of the nodes to be evaluated in the storage cluster is obtained using an encrypted container deployed through a unified SAS chassis service.

4. The method for selecting a master in a storage cluster according to claim 2, wherein: The performance indicator is an indicator used to measure the efficiency and speed of the nodes in the storage cluster in completing tasks, the availability indicator is an indicator used to measure the degree to which the nodes in the storage cluster can be used during the running time, and the reliability indicator is an indicator used to measure the ability of the nodes in the storage cluster to maintain normal operation within a preset time period.

5. The method for selecting a master in a storage cluster according to claim 2, wherein: The sub-indicators of the performance indicators are the node's storage bandwidth, throughput, response time, and storage capacity; the sub-indicators of the availability indicators are the node's availability, downtime, and maintenance time; the sub-indicators of the reliability indicators are the node's mean time between failures, mean repair time, accuracy and integrity, and fault self-healing ability; wherein, the availability is the proportion of time during which services can be provided normally during normal operating hours, the downtime is the time during which services cannot be provided due to a fault, and the maintenance time is the time required for node maintenance or upgrade operations.

6. The method for selecting a master in a storage cluster according to claim 5, characterized in that: The robustness index of each node to be evaluated is processed using the entropy weight method to obtain a comprehensive robustness score of each node to be evaluated, including: For any node to be evaluated among the nodes to be evaluated, the performance index, the availability index and the reliability index of the node to be evaluated are respectively standardized to obtain dimensionless standardized indexes; The sub-indicators under each of the standardized indicators are summed up respectively to obtain the sum of the sub-indicators corresponding to each of the standardized indicators, and the ratio between each of the sub-indicators in the standardized indicator and the corresponding sum of the sub-indicators is determined as the characteristic weight of the corresponding sub-indicator in the standardized indicator, and the information entropy of each of the standardized indicators is determined based on the characteristic weight; Obtaining a difference between a preset value and the information entropy of each of the standardized indicators, and determining each of the differences as a difference coefficient of the corresponding standardized indicator; Summing each of the difference coefficients to obtain a difference coefficient sum, and determining a ratio between the difference coefficient and the difference coefficient sum as a weight of the corresponding standardized index; The comprehensive robustness score of any node to be evaluated is determined based on the weights of each of the standardized indicators of any node to be evaluated and the characteristic proportions of each of the sub-indicators in the standardized indicators.

7. The method for selecting a master in a storage cluster according to claim 1, wherein: After determining the target node as the new current master node in the storage cluster, the method further includes: If the new current master node is not the same master node as the original master node where the failure occurred, monitoring whether the original master node where the failure occurred has recovered to normal; If the failed original master node returns to normal, the encrypted container is used to obtain the robustness index of each node in the storage cluster, and a new round of master election operation is performed within the entire node range of the storage system based on the acquired robustness index of each node.

8. The method for selecting a master in a storage cluster according to claim 1, wherein: Also includes: When a fault occurs in the current master node, a fault report is generated through the unified SAS chassis service; After determining the new current master node, generating a cluster master election log through the unified SAS chassis service; The fault report and / or the cluster master election log is sent to a display platform through a preset interface.

9. A storage cluster master selection device, characterized in that: include: An indicator acquisition module, used to obtain robustness indicators of each node to be evaluated in the storage cluster by using an encrypted container deployed through a unified SAS chassis service; A score determination module, used to process the robustness index of each node to be evaluated obtained by using the encryption container by using the entropy weight method through the unified SAS chassis service, so as to obtain a comprehensive robustness score of each node to be evaluated; The node master selection module is used to select the target node with the highest comprehensive robustness score from each of the nodes to be evaluated through the unified SAS chassis service, and determine the target node as the new current master node in the storage cluster.

10. An electronic device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program to implement the steps of the storage cluster master election method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the storage cluster master election method according to any one of claims 1 to 8 are implemented.