A data exception processing method and system, electronic equipment and medium

By constructing a mapping relationship between volumes and mirror pairs and cache partitions in the storage system, only the volumes in the abnormal cache partition are taken offline when a node fails, thus solving the problem of global data read/write interruption caused by node failure and improving the processing efficiency of the storage system.

CN117170920BActive Publication Date: 2026-07-07INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2023-08-28
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In storage systems, when a node's cache partition or the entire node experiences a data anomaly, existing technologies can cause all volumes to go offline, affecting normal data read and write operations.

Method used

Establish the mapping relationship between volumes and mirror pairs in the storage system, and the mapping relationship between mirror pairs and cache partitions. When a response node fails, query the mirror pair and cache partition to which the failed node belongs, and only take offline the volumes in the failed cache partition to avoid affecting the read and write of other normal volumes.

Benefits of technology

This allows for the offline operation of only specific volumes when a node fails, while keeping other volumes functioning normally, thus improving the data read/write efficiency and exception handling efficiency of the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117170920B_ABST
    Figure CN117170920B_ABST
Patent Text Reader

Abstract

The application discloses a data exception processing method and system, electronic equipment and medium, and is applied to a storage system, comprising: constructing a mapping relationship between a volume and a mirror pair in the storage system, and a mapping relationship between the mirror pair and a cache partition; in response to an exception of a node, querying the mapping relationship between the volume and the mirror pair according to a serial number of the exception node to obtain a mirror pair to which the exception node belongs; combining the mirror pair to which the exception node belongs and an exception cache partition number in the exception node, querying the mapping relationship between the mirror pair and the cache partition to obtain an exception cache partition of the mirror pair to which the exception node belongs, and offline all volumes in the exception cache partition. The application can actively offline specific volumes, that is, only make no-attribute volumes and attribute volumes belonging to the exception node offline, thereby avoiding directly offline all volumes in all mirror pairs and affecting normal data reading and writing of part of the volumes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of processing technology, specifically to a data anomaly processing method, system, electronic device, and medium. Background Technology

[0002] To meet current data storage needs, high-end storage systems typically use mirrored nodes. A single node may process data from one or more mirrored pairs, and these nodes can be either owned or unowned volumes. Owned volumes are assigned to a single node, and the data within that volume is processed only within the mirrored pairs of that node. Unowned volumes, on the other hand, can be pre-configured to be processed across different mirrored pairs.

[0003] In current storage systems, which include nodes and nodes in mirror pairs, when a cache partition or the entire node experiences a data anomaly, all volumes are typically taken offline, causing some normal volumes to also go offline and become unable to read or write data. Based on the above problems, this application provides a data anomaly handling method, system, electronic device, and medium that performs an active offline mechanism only for specific volumes, that is, only taking offline unowned volumes and owned volumes belonging to the abnormal node, avoiding taking offline all volumes in the four mirror pairs directly and affecting the normal data read and write of some volumes. Summary of the Invention

[0004] To address at least one of the problems mentioned in the background art, this application provides a data anomaly handling method, system, electronic device, and medium that can perform an active offline mechanism for specific volumes, i.e., only unowned volumes and owned volumes belonging to the abnormal nodes are taken offline, avoiding the direct offline of all volumes in all mirror pairs, which would affect the normal data read and write of some volumes.

[0005] The specific technical solutions provided in this application are as follows:

[0006] Firstly, a data anomaly handling method is provided for application in a storage system, wherein the storage system includes several mirror pairs, each mirror pair including two nodes, and the method includes:

[0007] Construct the mapping relationship between volumes and mirror pairs, and the mapping relationship between mirror pairs and cache partitions in the storage system;

[0008] In response to a node anomaly, the mapping relationship between the volume and the mirror pair is queried based on the sequence number of the anomaly node to obtain the mirror pair to which the anomaly node belongs;

[0009] Obtain the abnormal cache partition number contained in the abnormal node;

[0010] By combining the mirror pair to which the abnormal node belongs and the abnormal cache partition number, the mapping relationship between the mirror pair and the cache partition is queried to obtain the abnormal cache partition of the mirror pair to which the abnormal node belongs, and all volumes in the abnormal cache partition are taken offline.

[0011] In one specific embodiment, constructing the mapping relationship between volumes and mirror pairs in the storage system specifically includes:

[0012] Obtain all volume information in the storage system, including owned volumes and unowned volumes;

[0013] By combining the owned volume and all mirror pairs, a mapping relationship between owned volume and mirror pairs is constructed;

[0014] Construct a mapping relationship between unowned volumes and all mirror pairs by combining the aforementioned unowned volumes and all mirror pairs;

[0015] Constructing the mapping relationship between the image pair and the cache partition specifically includes:

[0016] Obtain all mirror pairs and cache partitions in the storage system, wherein the cache partitions include all volumes;

[0017] The mapping relationship between the image pairs and the cache partitions is constructed by combining all the image pairs and the cache partitions.

[0018] In one specific embodiment, the mapping relationship between the volume and the mirror pair is queried based on the sequence number of the abnormal node to obtain the mirror pair to which the abnormal node belongs, specifically including:

[0019] Obtain the sequence number of the abnormal node, and query the mapping relationship between the owned volume and the mirror pair based on the sequence number of the abnormal node;

[0020] The first mirror pair to which the abnormal node belongs is obtained;

[0021] Simultaneously, based on the sequence number of the abnormal node, the mapping relationship between the unowned volume and the mirror pair is queried to obtain the second mirror pair to which the abnormal node belongs;

[0022] Both the first mirror pair and the second mirror pair belong to the mirror pair to which the abnormal node belongs.

[0023] In one specific embodiment, by combining the mirror pair to which the abnormal node belongs and the abnormal cache partition number in the abnormal node, the mapping relationship between the mirror pair and the cache partition is queried to obtain the abnormal cache partition of the mirror pair to which the abnormal node belongs, and all volumes in the abnormal cache partition are taken offline, specifically including:

[0024] Obtain the information of the first mirror pair;

[0025] By combining the information of the first mirror pair and the abnormal cache partition number of the abnormal node, the mapping relationship between the mirror pair and the cache partition is queried to obtain the abnormal cache partition of the first mirror pair.

[0026] Obtain the information of the second mirror pair;

[0027] By combining the information of the second mirror pair and the abnormal cache partition number of the abnormal node, the mapping relationship between the mirror pair and the cache partition is queried to obtain the abnormal cache partition of the second mirror pair;

[0028] Take offline all volumes in the abnormal cache partitions of the first mirror pair and the second mirror pair.

[0029] In one specific embodiment, in response to a node exception, the method further includes:

[0030] In response to a node anomaly, the sequence of the abnormal nodes, the anomaly information of the abnormal nodes, and the anomaly cache partition information in the abnormal nodes are obtained.

[0031] The abnormal node sequence, the abnormal information, and the abnormal cache partition information are stored in a bitmap, and the bitmap relationship between the abnormal node sequence, the abnormal information, and the abnormal cache partition is obtained.

[0032] The bitmap relationship is stored in the storage system.

[0033] In one specific embodiment, the method further includes:

[0034] In response to a node malfunction, the malfunctioning node reports the malfunction information to the storage system.

[0035] This is to identify the cause of the anomaly through the anomaly information and to handle the problems in the anomaly information.

[0036] In one specific embodiment, the method further includes:

[0037] When there are several abnormal nodes, obtain the abnormal state of the abnormal node with the smallest node number;

[0038] The abnormal state of the abnormal node with the smallest node number is taken as the abnormal information.

[0039] And report the abnormal information to the storage system.

[0040] Secondly, a data anomaly handling system is provided, applied to a storage system, the storage system including several mirror pairs, each mirror pair including at least two nodes, the system comprising:

[0041] The first construction unit is used to construct the mapping relationship between volumes and mirror pairs in the storage system;

[0042] The second building unit is used to build the mapping relationship between the image pair and the cache partition;

[0043] A response unit is used to respond to an anomaly in a node by querying the mapping relationship between the volume and the mirror pair based on the sequence number of the anomaly node, and obtaining the mirror pair to which the anomaly node belongs.

[0044] The processing unit combines the mirror pair to which the abnormal node belongs and the abnormal cache partition number in the abnormal node, queries the mapping relationship between the mirror pair and the cache partition, obtains the abnormal cache partition of the mirror pair to which the abnormal node belongs, and takes all volumes in the abnormal cache partition offline.

[0045] Thirdly, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps and is applied to a storage system, the storage system including a plurality of mirror pairs, each mirror pair including two nodes.

[0046] Step A: Construct the mapping relationship between volumes and mirror pairs, and the mapping relationship between mirror pairs and cache partitions in the storage system;

[0047] Step B: In response to a node anomaly, query the mapping relationship between the volume and the mirror pair based on the sequence number of the anomaly node to obtain the mirror pair to which the anomaly node belongs;

[0048] Step C: Obtain the abnormal cache partition number contained in the abnormal node, and combine the mirror pair to which the abnormal node belongs with the abnormal cache partition number in the abnormal node to query the mapping relationship between the mirror pair and the cache partition, obtain the abnormal cache partition of the mirror pair to which the abnormal node belongs, and take all volumes in the abnormal cache partition offline.

[0049] Fourthly, a computer-readable storage medium is provided, on which a computer program is stored, the computer program being executed by a processor to perform the following steps, applied to a storage system, the storage system including a plurality of mirror pairs, each mirror pair including two nodes;

[0050] Step A: Construct the mapping relationship between volumes and mirror pairs, and the mapping relationship between mirror pairs and cache partitions in the storage system;

[0051] Step B: In response to a node anomaly, query the mapping relationship between the volume and the mirror pair based on the sequence number of the anomaly node to obtain the mirror pair to which the anomaly node belongs;

[0052] Step C: Obtain the abnormal cache partition number contained in the abnormal node, and combine the mirror pair to which the abnormal node belongs with the abnormal cache partition number in the abnormal node to query the mapping relationship between the mirror pair and the cache partition, obtain the abnormal cache partition of the mirror pair to which the abnormal node belongs, and take all volumes in the abnormal cache partition offline.

[0053] The embodiments of this application have the following beneficial effects:

[0054] 1. The data anomaly handling method provided in this application constructs a mapping relationship between volumes and mirror pairs, and a mapping relationship between mirror pairs and cache partitions. When an anomaly occurs in a node in the storage system, the sequence number of the anomaly node is used to query the mapping relationship between volumes and mirror pairs to obtain the mirror pair to which the anomaly node belongs. Then, by combining the anomaly mirror pair and the anomaly cache partition number in the anomaly node, the mapping relationship between the mirror and the cache partition is queried to obtain the anomaly cache partition of the mirror pair to which the anomaly node belongs. All volumes in the anomaly cache partition are taken offline. At this time, other normal nodes and volumes continue to work normally.

[0055] 2. After a node malfunctions, the system also includes obtaining the abnormal cache partition number of the abnormal node and determining the corresponding abnormal cache partition in the abnormal mirror pair based on the abnormal cache partition number. This allows for locating the cache partition by the cache partition number and processing abnormal information at the granular level of the abnormal cache partition. Through the above settings, it is beneficial to obtain the sequence number of the cache partition that malfunctions in the abnormal node, so as to locate the corresponding cache partition by the cache partition sequence number and process the abnormal part at the granular level of the abnormal cache partition, thereby quickly handling the abnormal information problem in the abnormal node.

[0056] 3. After a node anomaly occurs, obtain the sequence of abnormal nodes, the anomaly information of the abnormal nodes, and the anomaly cache partition information in the abnormal nodes. Save the above three information through a bitmap and form a bitmap relationship between the sequence of abnormal nodes, the anomaly information of the abnormal nodes, and the anomaly cache partition. This is conducive to quickly indexing the corresponding anomaly cache partition, confirming the cause of the anomaly, and thus improving the efficiency of handling anomaly problems.

[0057] 4. When multiple abnormal nodes occur, the abnormal status of the abnormal node with the smallest node sequence number is obtained as the abnormal information and reported to the storage system. This avoids the inability to identify the specific abnormal problem when multiple nodes are abnormal. At the same time, the status of the node with the smallest node sequence number is used as the abnormal information so that the storage system can process this abnormal information first, thereby improving the efficiency of abnormal information processing. Attached Figure Description

[0058] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0059] Figure 1 A schematic diagram of the storage system according to this application is shown;

[0060] Figure 2 A schematic diagram illustrating the data anomaly handling method according to this application is shown;

[0061] Figure 3 A schematic diagram illustrating the mapping relationship between volumes and mirror pairs according to this application is shown;

[0062] Figure 4 A schematic diagram illustrating the mapping relationship between mirror pairs and cache partitions according to this application is shown.

[0063] Figure 5 This diagram illustrates the specific process for all volumes in the offline exception cache partition according to this application.

[0064] Figure 6 A schematic diagram of the data anomaly handling system according to this application is shown;

[0065] Figure 7 A schematic diagram of a computer device according to this application is shown. Detailed Implementation

[0066] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0067] It should be noted that, in this embodiment, a volume with a home node refers to a volume that is assigned to a home node, and the volume's data is only processed in the mirror pair of the home node; a volume without a home node refers to a volume that can be processed in different preset mirror pairs.

[0068] Example 1

[0069] like Figure 1 As shown, a data anomaly handling method is provided, which can be applied to... Figure 1 This will be illustrated using a storage system as an example. The storage system includes mirror pairs, and each mirror pair consists of two nodes, such as... Figure 2 As shown, it includes the following steps:

[0070] Step S1: Construct the mapping relationship between volumes and mirror pairs, and the mapping relationship between mirror pairs and cache partitions in the storage system.

[0071] by Figure 1 Taking the storage system in the example, the storage system includes four mirror pairs: [node0, node1], [node1, node2], [node2, node3], and [node3, node0]. Node0 includes "disk0 and disk1", ​​node1 includes "disk0 and disk1", ​​node2 includes "disk1", ​​and node3 includes "disk1". It can be seen that "disk0" is a owned volume, while "disk1" is an unowned volume. Furthermore, the two nodes belonging to the same mirror pair in the second mirror pair [node1, node2] and the fourth mirror pair [node3, node0] can handle different volumes.

[0072] Among them, such as Figure 3 As shown, constructing the mapping relationship between volumes and mirror pairs in the storage system specifically includes:

[0073] Retrieve all volumes in the storage system, including owned volumes and unowned volumes;

[0074] By combining the owned volume and all mirror pairs, a mapping relationship between owned volume and mirror pairs is constructed;

[0075] The mapping relationship between unowned volumes and mirror pairs is constructed by combining the unowned volumes and all mirror pairs.

[0076] like Figure 4 As shown, constructing the mapping relationship between the image pairs and the cache partitions specifically includes: obtaining all image pairs and cache partitions in the storage system, wherein the cache partitions include all volumes; and constructing the mapping relationship between the image pairs and the cache partitions by combining all image pairs and the cache partitions.

[0077] First, such as Figure 3 The diagram illustrates the mapping relationship between volumes and mirror pairs. `ioGrp` is an IO processing group consisting of four mirror pairs, encompassing all four nodes. The four mirror pairs correspond to `domain0`, `domain1`, `domain2`, and `domain3`. These four mirror pairs are actual mirror pairs, meaning they have a mapping relationship between the owner volume and the mirror pair. The volumes within these four mirror pairs have different mapping relationships when handling read and write requests. Figure 5There are several scenarios: ioGrp-domain0, ioGrp-domain1, ioGrp-domain2, ioGrp-domain3, and ioGrp-allnodes. Furthermore, volumes also include unowned volumes, and unowned volumes can exist on nodes of any mirror pair, such as... Figure 3 and 4 As shown, there are five mirror pairs in an ioGrp: four real mirror pairs are used to compare the correspondence of owned volumes, each mirror pair contains two nodes, and one virtual mirror pair is used to compare the correspondence of unowned volumes, containing all nodes in the ioGrp.

[0078] Next, establish the mapping relationship between mirror pairs and cache partitions. Cache partitions exist throughout the entire ioGrp. Cache partitions include volumes. A cache partition may contain one or more volumes. Since the volumes in a cache partition include owned volumes and unowned volumes, there is a corresponding relationship between cache partitions and five mirror pairs. Establishing the mapping relationship between cache partitions and mirror pairs is to facilitate finding cache partitions that cannot process read and write requests normally and the volumes belonging to those cache partitions.

[0079] The above scheme establishes a mapping relationship between volumes and mirror pairs in the storage system, as well as a mapping relationship between the mirror pairs and cache partitions.

[0080] Step S2: In response to a node anomaly, query the mapping relationship between the volume and the mirror pair based on the sequence number of the anomaly node to obtain the mirror pair to which the anomaly node belongs.

[0081] Node anomalies can include an anomaly in the entire node or an anomaly in the node's cache partition. If the amount of data that cannot be submitted to the lower layer exceeds the set threshold, it means that the cache partition cannot process read and write requests normally. At this time, the node reports the anomaly to the storage system and determines whether the anomaly node belongs to the node in the mirror pair.

[0082] Specifically, this includes obtaining the sequence number of the abnormal node, querying the mapping relationship between the volume to which the abnormal node belongs and the mirror pair based on the sequence number of the abnormal node, and obtaining the first mirror pair to which the abnormal node belongs.

[0083] Simultaneously, based on the sequence number of the abnormal node, the mapping relationship between the unowned volume and the mirror pair is queried to obtain the second mirror pair to which the abnormal node belongs;

[0084] Both the first mirror pair and the second mirror pair belong to the mirror pair to which the abnormal node belongs.

[0085] In other words, by querying the mapping relationship between owned volumes and mirror pairs, the first mirror pair obtained is the abnormal mirror pair corresponding to the owned volume. At this time, only the mirror pairs containing all owned volumes need to be processed. Then, by querying the mapping relationship between unowned volumes and mirror pairs, the second mirror pair obtained is the abnormal mirror pair corresponding to the unowned volume, thereby realizing the processing of the abnormal mirror pairs containing the unowned volume.

[0086] Specifically, with Figure 1 Taking the storage system in the example, if node0 is abnormal, the first mirror pair corresponding to the owned volume of node0 is domain0 and domain3. Further, through the mapping relationship between unowned volumes and mirror pairs, the mirror pair where the unowned volume corresponding to node0 is located is queried, that is, the second mirror pair, and the first mirror pair and the second mirror pair are processed at the same time.

[0087] The method further includes, when a node becomes abnormal, specifically step 2.1: in response to a node becoming abnormal, obtaining the abnormal node sequence, the abnormal information of the abnormal node, and the abnormal cache partition information in the abnormal node;

[0088] Step 2.2: Save the abnormal node sequence, the abnormal information, and the abnormal cache partition information through a bitmap, and obtain the bitmap relationship between the abnormal node sequence, the abnormal information, and the abnormal cache partition;

[0089] Step 2.3: Store the bitmap relationship in the storage system.

[0090] It should be noted that the abnormal node sequence refers to the sequence number of the abnormal node; for example, node1 has a sequence number of 1. Node abnormalities can include cache partition abnormalities or entire node cache abnormalities. Specifically, when a node's cache partition or the entire node fails to flush data due to reasons such as the lower-level device being offline or the volume being full, or when the amount of data submitted to the lower layer exceeds a preset threshold, the cache partition cannot process read and write requests normally, resulting in a node abnormality. Furthermore, storing abnormal information and the reasons why abnormal nodes cannot flush data using a bitmap facilitates quick indexing of the problem corresponding to the abnormal node when abnormal information is needed, thereby improving the efficiency of the storage system in handling abnormal issues after they occur.

[0091] In one specific embodiment, when a node malfunctions, a bitmap relationship is first established between the sequence of malfunctioning nodes, the malfunction information, and the cache partition. This bitmap relationship is a unique correspondence between the point where the malfunction occurred and the cache partition.

[0092] In one specific embodiment, in response to a node anomaly, the abnormal node reports anomaly information to the storage system, so as to confirm the cause of the anomaly through the anomaly information and handle the problems in the anomaly information.

[0093] Step S3: Obtain the abnormal cache partition number contained in the abnormal node;

[0094] Step S4: Combining the mirror pair to which the abnormal node belongs and the abnormal cache partition number, query the mapping relationship between the mirror pair and the cache partition to obtain the abnormal cache partition of the mirror pair to which the abnormal node belongs, and take all volumes in the abnormal cache partition offline.

[0095] like Figure 5 As shown, the specific steps include:

[0096] Step S4.1: Obtain the information of the first mirror pair;

[0097] Step S4.2: Combine the information of the first mirror pair and the abnormal cache partition number of the abnormal node to query the mapping relationship between the mirror pair and the cache partition, and obtain the abnormal cache partition of the first mirror pair;

[0098] Step S4.3: Obtain the information of the second mirror pair;

[0099] Step S4.4: Combine the information of the second mirror pair and the abnormal cache partition number of the abnormal node to query the mapping relationship between the mirror pair and the cache partition, and obtain the abnormal cache partition of the second mirror pair;

[0100] Step S4.5: Take offline all volumes in the abnormal cache partition of the first mirror pair and the abnormal cache partition of the second mirror pair.

[0101] In step S2, the first mirror pair corresponding to the owned volume and the second mirror pair corresponding to the unowned volume are obtained respectively. Then, the abnormal cache partition number of the abnormal node is obtained. It should be noted that the node is divided into several cache partitions. When the node is abnormal, the specific cache partition number of the node that is abnormal can be obtained. Combining the information of the first mirror pair and the abnormal cache partition number of the abnormal node, the mapping relationship between the mirror pair and the cache partition is queried to obtain the abnormal cache partition corresponding to the first mirror pair. Similarly, the abnormal cache partition corresponding to the second mirror pair is queried. At this time, the volume in the offline abnormal cache partition does not affect the normal operation of the volumes in other cache partitions.

[0102] It should be noted that both the constructed mapping relationship between unowned volumes and mirror pairs and the mapping relationship between owned volumes and mirror pairs include all mirror pairs. Therefore, the first mirror pair obtained by querying may be the same or different.

[0103] In response to a node anomaly, the system also reports the sequence number of the abnormal cache partition in the abnormal node to the storage system, so as to process the problems in the anomaly information at the granularity of the abnormal cache partition.

[0104] In one specific embodiment, after receiving an anomaly message, the storage system locates the anomaly cache partition based on the anomaly cache partition number, thereby enabling the handling of services that cannot be flushed due to cache anomalies at the cache partition level. This configuration facilitates obtaining the sequence number of the anomaly cache partition within the anomaly node, allowing for the location of the corresponding cache partition and the handling of the anomaly at the anomaly cache partition level, thus enabling rapid resolution of anomaly information issues within the anomaly node.

[0105] Specifically, the reason for offline status is recorded for each volume in the offline exception cache partition. Furthermore, once the problem in the exception information has been resolved, the offline state of the volume is cleared to allow all volumes to function normally. That is, when the underlying exception offline process is completed, the offline status of the cached volume needs to be cleared so that the corresponding volume can continue to process read and write requests sent by the host. The implementation process is basically the same as for exception offline status, the only difference being that the status value in the triggering process is the opposite of the value that triggers volume offline status.

[0106] In a specific embodiment, when there are several abnormal nodes, the abnormal state of the abnormal node with the smallest node number is obtained;

[0107] The abnormal state of the abnormal node with the smallest node sequence number is taken as the abnormal information; and the abnormal information is reported to the storage system.

[0108] It should be noted that when multiple nodes in the storage system experience anomalies, the status of the node with the smallest node sequence number is used as the anomaly information reported to the storage system. This is to avoid the inability to identify the specific anomaly when multiple nodes experience anomalies. At the same time, using the status of the node with the smallest node sequence number as the anomaly information allows the storage system to process this anomaly information first, improving the efficiency of anomaly information processing.

[0109] With the solution in this embodiment, when a node cache fails to be flushed normally in the storage system, only specific volumes are proactively taken offline, while volumes that can be processed normally are retained. This avoids the impact of taking offline all volumes in the four mirror pairs on normal read and write processing.

[0110] It should be understood that, although Figure 2 and Figure 5The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2 and Figure 5 At least some of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0111] Example 2

[0112] like Figure 6 As shown, a data anomaly handling system is provided, applied to a storage system. The storage system includes several mirror pairs, each mirror pair comprising two nodes. The system includes:

[0113] The first construction unit is used to construct the mapping relationship between volumes and mirror pairs in the storage system;

[0114] The second building unit is used to build the mapping relationship between the image pair and the cache partition;

[0115] A response unit is used to respond to an anomaly in a node by querying the mapping relationship between the volume and the mirror pair based on the sequence number of the anomaly node, and obtaining the mirror pair to which the anomaly node belongs.

[0116] The processing unit is configured to obtain the abnormal cache partition number contained in the abnormal node, and combine the mirror pair to which the abnormal node belongs with the abnormal cache partition number in the abnormal node to query the mapping relationship between the mirror pair and the cache partition, obtain the abnormal cache partition of the mirror pair to which the abnormal node belongs, and take all volumes in the abnormal cache partition offline.

[0117] In a specific embodiment, the first construction unit is specifically used to obtain all volume information in the storage system, including owned volumes and unowned volumes; to construct a mapping relationship between owned volumes and mirror pairs by combining the owned volumes and all mirror pairs; and to construct a mapping relationship between unowned volumes and mirror pairs by combining the unowned volumes and all mirror pairs.

[0118] In one specific embodiment, the second construction unit is specifically used to obtain all image pairs and cache partitions in the storage system, wherein the cache partitions include all volumes; and to construct a mapping relationship between the image pairs and the cache partitions by combining all image pairs and the cache partitions.

[0119] In one specific embodiment, the response unit further includes a query unit, which is used to obtain the sequence number of the abnormal node, query the mapping relationship between the assigned volume and the mirror pair based on the sequence number of the abnormal node, and obtain the first mirror pair to which the abnormal node belongs; at the same time, query the mapping relationship between the unassigned volume and the mirror pair based on the sequence number of the abnormal node, and obtain the second mirror pair to which the abnormal node belongs; both the first mirror pair and the second mirror pair belong to the mirror pair to which the abnormal node belongs.

[0120] In a specific embodiment, the processing unit specifically includes a first acquisition unit, a second acquisition unit, and an offline unit. The first acquisition unit is used to acquire the first image pair information; combine the first image pair information and the abnormal cache partition number of the abnormal node to query the mapping relationship between the image pair and the cache partition, and obtain the abnormal cache partition of the first image pair.

[0121] The second acquisition unit is used to acquire the information of the second mirror pair;

[0122] By combining the information of the second mirror pair and the abnormal cache partition number of the abnormal node, the mapping relationship between the mirror pair and the cache partition is queried to obtain the abnormal cache partition of the second mirror pair;

[0123] The offline unit is used to query the mapping relationship between the mirror pair and the cache partition by combining the information of the second mirror pair and the abnormal cache partition number of the abnormal node, so as to obtain the abnormal cache partition of the second mirror pair; and to offline all volumes in the abnormal cache partition of the first mirror pair and the abnormal cache partition of the second mirror pair.

[0124] In one specific embodiment, it further includes a bitmap storage unit, used to, in response to an abnormal node, obtain the abnormal node sequence, the abnormal information of the abnormal node, and the abnormal cache partition information in the abnormal node; save the abnormal node sequence, the abnormal information, and the abnormal cache partition information through a bitmap, and obtain the bitmap relationship of the abnormal node sequence, the abnormal information, and the abnormal cache partition; and store the bitmap relationship in the storage system.

[0125] In one specific embodiment, it further includes a reporting unit, which is used to respond to an anomaly in a node by having the abnormal node report anomaly information to the storage system, so as to confirm the cause of the anomaly through the anomaly information and handle the problems in the anomaly information.

[0126] In one specific embodiment, the confirmation unit is used to, when there are several abnormal nodes, obtain the abnormal state of the abnormal node with the smallest node sequence number; take the abnormal state of the abnormal node with the smallest node sequence number as abnormal information; and report the abnormal information to the storage system.

[0127] For specific limitations regarding the exception handling system, please refer to the limitations on data exception handling methods mentioned above, which will not be repeated here. Each module in the above exception handling system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0128] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores exception information data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a data exception handling method.

[0129] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0130] Example 3

[0131] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0132] Step 101: Construct the mapping relationship between volumes and mirror pairs, and the mapping relationship between mirror pairs and cache partitions in the storage system;

[0133] Step 102: In response to a node anomaly, query the mapping relationship between the volume and the mirror pair based on the sequence number of the anomaly node to obtain the mirror pair to which the anomaly node belongs;

[0134] Step 103: Obtain the abnormal cache partition number contained in the abnormal node, and combine the mirror pair to which the abnormal node belongs with the abnormal cache partition number in the abnormal node to query the mapping relationship between the mirror pair and the cache partition, obtain the abnormal cache partition of the mirror pair to which the abnormal node belongs, and take all volumes in the abnormal cache partition offline.

[0135] In a specific embodiment, step 101, which involves constructing the mapping relationship between volumes and mirror pairs in the storage system, specifically includes: obtaining all volumes in the storage system, where all volume information includes owned volumes and unowned volumes; constructing the mapping relationship between owned volumes and mirror pairs by combining the owned volumes and all mirror pairs; and constructing the mapping relationship between unowned volumes and mirror pairs by combining the unowned volumes and all mirror pairs.

[0136] Step 101, which involves constructing the mapping relationship between the image pair and the cache partition, specifically includes:

[0137] Obtain all image pairs and cache partitions in the storage system, wherein the cache partitions include all volumes; combine all image pairs and the cache partitions to construct a mapping relationship between the image pairs and the cache partitions.

[0138] In a specific embodiment, step 102, which involves querying the mapping relationship between the volume and the mirror pair based on the sequence number of the abnormal node to obtain the mirror pair to which the abnormal node belongs, specifically includes:

[0139] Obtain the sequence number of the abnormal node, and query the mapping relationship between the owned volume and the mirror pair based on the sequence number of the abnormal node; obtain the first mirror pair to which the abnormal node belongs; at the same time, query the mapping relationship between the unowned volume and the mirror pair based on the sequence number of the abnormal node, and obtain the second mirror pair to which the abnormal node belongs; both the first mirror pair and the second mirror pair belong to the mirror pair to which the abnormal node belongs.

[0140] In a specific embodiment, step 103, which combines the mirror pair to which the abnormal node belongs and the abnormal cache partition number in the abnormal node to query the mapping relationship between the mirror pair and the cache partition, obtains the abnormal cache partition of the mirror pair to which the abnormal node belongs, and takes all volumes in the abnormal cache partition offline, specifically includes:

[0141] Obtain the information of the first mirror pair; combine the information of the first mirror pair and the abnormal cache partition number of the abnormal node to query the mapping relationship between the mirror pair and the cache partition, and obtain the abnormal cache partition of the first mirror pair;

[0142] Obtain the information of the second mirror pair; combine the information of the second mirror pair with the abnormal cache partition number of the abnormal node to query the mapping relationship between the mirror pair and the cache partition, and obtain the abnormal cache partition of the second mirror pair;

[0143] Take offline all volumes in the abnormal cache partitions of the first mirror pair and the second mirror pair.

[0144] In a specific embodiment, step 102, in response to a node anomaly, further includes obtaining the abnormal node sequence, the abnormal information of the abnormal node, and the abnormal cache partition information in the abnormal node; saving the abnormal node sequence, the abnormal information, and the abnormal cache partition information through a bitmap, and obtaining the bitmap relationship of the abnormal node sequence, the abnormal information, and the abnormal cache partition; and storing the bitmap relationship in the storage system.

[0145] In one specific embodiment, in step 102, in response to a node anomaly, the abnormal node reports anomaly information to the storage system so as to confirm the cause of the anomaly through the anomaly information and handle the problem in the anomaly information.

[0146] In one specific embodiment, the method further includes: when there are several abnormal nodes, obtaining the abnormal state of the abnormal node with the smallest node sequence number; taking the abnormal state of the abnormal node with the smallest node sequence number as abnormal information; and reporting the abnormal information to the storage system.

[0147] Example 4

[0148] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0149] Step 201: Construct the mapping relationship between volumes and mirror pairs, and the mapping relationship between mirror pairs and cache partitions in the storage system;

[0150] Step 202: In response to a node anomaly, query the mapping relationship between the volume and the mirror pair based on the sequence number of the anomaly node to obtain the mirror pair to which the anomaly node belongs;

[0151] Step 203: Obtain the abnormal cache partition number contained in the abnormal node, and combine the mirror pair to which the abnormal node belongs with the abnormal cache partition number in the abnormal node to query the mapping relationship between the mirror pair and the cache partition, obtain the abnormal cache partition of the mirror pair to which the abnormal node belongs, and take all volumes in the abnormal cache partition offline.

[0152] In a specific embodiment, step 201, constructing the mapping relationship between volumes and mirror pairs in the storage system, specifically includes: obtaining all volumes in the storage system, where all volume information includes owned volumes and unowned volumes; constructing the mapping relationship between owned volumes and mirror pairs by combining the owned volumes and all mirror pairs; and constructing the mapping relationship between unowned volumes and mirror pairs by combining the unowned volumes and all mirror pairs.

[0153] Step 201, which involves constructing the mapping relationship between the image pair and the cache partition, specifically includes:

[0154] Obtain all image pairs and cache partitions in the storage system, wherein the cache partitions include all volumes; combine all image pairs and the cache partitions to construct a mapping relationship between the image pairs and the cache partitions.

[0155] In a specific embodiment, step 202, which involves querying the mapping relationship between the volume and the mirror pair based on the sequence number of the abnormal node to obtain the mirror pair to which the abnormal node belongs, specifically includes:

[0156] Obtain the sequence number of the abnormal node, and query the mapping relationship between the owned volume and the mirror pair based on the sequence number of the abnormal node; obtain the first mirror pair to which the abnormal node belongs; at the same time, query the mapping relationship between the unowned volume and the mirror pair based on the sequence number of the abnormal node, and obtain the second mirror pair to which the abnormal node belongs; both the first mirror pair and the second mirror pair belong to the mirror pair to which the abnormal node belongs.

[0157] In a specific embodiment, step 203, which combines the mirror pair to which the abnormal node belongs and the abnormal cache partition number in the abnormal node to query the mapping relationship between the mirror pair and the cache partition, obtains the abnormal cache partition of the mirror pair to which the abnormal node belongs, and takes all volumes in the abnormal cache partition offline, specifically includes:

[0158] Obtain the information of the first mirror pair; combine the information of the first mirror pair and the abnormal cache partition number of the abnormal node to query the mapping relationship between the mirror pair and the cache partition, and obtain the abnormal cache partition of the first mirror pair;

[0159] Obtain the information of the second mirror pair; combine the information of the second mirror pair with the abnormal cache partition number of the abnormal node to query the mapping relationship between the mirror pair and the cache partition, and obtain the abnormal cache partition of the second mirror pair;

[0160] Take offline all volumes in the abnormal cache partitions of the first mirror pair and the second mirror pair.

[0161] In a specific embodiment, step 202, in response to a node anomaly, further includes obtaining the abnormal node sequence, the abnormal information of the abnormal node, and the abnormal cache partition information in the abnormal node; saving the abnormal node sequence, the abnormal information, and the abnormal cache partition information through a bitmap, and obtaining the bitmap relationship of the abnormal node sequence, the abnormal information, and the abnormal cache partition; and storing the bitmap relationship in the storage system.

[0162] In a specific embodiment, in step 202, in response to an anomaly in a node, the abnormal node reports anomaly information to the storage system so as to confirm the cause of the anomaly through the anomaly information and handle the problem in the anomaly information.

[0163] In one specific embodiment, the method further includes: when there are several abnormal nodes, obtaining the abnormal state of the abnormal node with the smallest node sequence number; taking the abnormal state of the abnormal node with the smallest node sequence number as abnormal information; and reporting the abnormal information to the storage system.

[0164] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0165] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0166] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A data anomaly handling method, characterized in that, Applied to a storage system comprising several mirror pairs, each mirror pair comprising two nodes, the method includes: Construct the mapping relationship between volumes and mirror pairs, and the mapping relationship between mirror pairs and cache partitions in the storage system; Specifically, constructing the mapping relationship between volumes and mirror pairs in the storage system includes: obtaining all volume information in the storage system, including owned volumes and unowned volumes; constructing a mapping relationship between owned volumes and mirror pairs by combining the owned volumes and all mirror pairs; and constructing a mapping relationship between unowned volumes and mirror pairs by combining the unowned volumes and all mirror pairs. Constructing the mapping relationship between mirror pairs and cache partitions specifically includes: obtaining all mirror pairs and cache partitions in the storage system, wherein the cache partitions include all volumes; and constructing a mapping relationship between mirror pairs and cache partitions by combining all mirror pairs and the cache partitions. In response to a node anomaly, the mapping relationship between the volume and mirror pair is queried based on the anomaly node to obtain the mirror pair to which the anomaly node belongs. Specifically, this includes: obtaining the sequence number of the anomaly node; obtaining the mirror pair to which the anomaly node belongs based on the sequence number of the anomaly node; querying the mapping relationship between the volume and mirror pair to which the anomaly node belongs to obtain the first mirror pair to which the anomaly node belongs; and simultaneously, querying the mapping relationship between the volume and mirror pair to which the anomaly node belongs based on the sequence number of the anomaly node to obtain the second mirror pair to which the anomaly node belongs. Both the first mirror pair and the second mirror pair belong to the mirror pair to which the anomaly node belongs. Obtain the abnormal cache partition number contained in the abnormal node; By combining the mirror pair to which the abnormal node belongs and the abnormal cache partition number, the mapping relationship between the mirror pair and the cache partition is queried to obtain the abnormal cache partition of the mirror pair to which the abnormal node belongs, and all volumes in the abnormal cache partition are taken offline.

2. The data anomaly handling method according to claim 1, characterized in that, By combining the mirror pair to which the abnormal node belongs and the abnormal cache partition number in the abnormal node, the mapping relationship between the mirror pair and the cache partition is queried to obtain the abnormal cache partition of the mirror pair to which the abnormal node belongs, and all volumes in the abnormal cache partition are taken offline, specifically including: Obtain the information of the first mirror pair; By combining the information of the first mirror pair and the abnormal cache partition number of the abnormal node, the mapping relationship between the mirror pair and the cache partition is queried to obtain the abnormal cache partition of the first mirror pair. Obtain the information of the second mirror pair; By combining the information of the second mirror pair and the abnormal cache partition number of the abnormal node, the mapping relationship between the mirror pair and the cache partition is queried to obtain the abnormal cache partition of the second mirror pair; Take offline all volumes in the abnormal cache partitions of the first mirror pair and the second mirror pair.

3. The data anomaly handling method according to claim 1 or 2, characterized in that, In response to a node exception, the method further includes: In response to a node anomaly, the sequence of the abnormal nodes, the anomaly information of the abnormal nodes, and the anomaly cache partition information in the abnormal nodes are obtained. The abnormal node sequence, the abnormal information, and the abnormal cache partition information are stored in a bitmap, and the bitmap relationship between the abnormal node sequence, the abnormal information, and the abnormal cache partition is obtained. The bitmap relationship is stored in the storage system.

4. The data anomaly handling method according to claim 3, characterized in that, The method further includes: In response to a node malfunction, the malfunctioning node reports the malfunction information to the storage system. This is to identify the cause of the anomaly through the anomaly information and to handle the problems in the anomaly information.

5. The data anomaly handling method according to claim 1 or 2, characterized in that, The method further includes: When there are several abnormal nodes, obtain the abnormal state of the abnormal node with the smallest node number; The abnormal state of the abnormal node with the smallest node number is taken as the abnormal information. And report the abnormal information to the storage system.

6. A data anomaly processing system based on the method of any one of claims 1 to 5, characterized in that, Applied to a storage system, the storage system includes several mirror pairs, each mirror pair including two nodes, the system comprising: The first construction unit is used to construct the mapping relationship between volumes and mirror pairs in the storage system; The second building unit is used to build the mapping relationship between the image pair and the cache partition; A response unit is used to respond to an anomaly in a node by querying the mapping relationship between the volume and the mirror pair based on the sequence number of the anomaly node, and obtaining the mirror pair to which the anomaly node belongs. The processing unit is configured to obtain the abnormal cache partition number contained in the abnormal node, and combine the mirror pair to which the abnormal node belongs with the abnormal cache partition number in the abnormal node to query the mapping relationship between the mirror pair and the cache partition, obtain the abnormal cache partition of the mirror pair to which the abnormal node belongs, and take all volumes in the abnormal cache partition offline.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.