Cache mirror image determination method and storage system

By forming cache mirror pairs across chassis, the service interruption problem caused by power failure of the entire machine when nodes in the same chassis form a mirror pair is solved, and the stability of the storage system and the resource utilization rate are improved.

CN120803373AInactive Publication Date: 2025-10-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511294507.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-11
Publication Date
2025-10-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When two nodes in the same chassis form a cache mirror pair, they may be unable to continue providing services to users after a power outage, affecting the stability of the storage system and resource utilization efficiency.

Method used

By forming a cache mirror pair across chassis, using the first and second chassis to connect to the shared memory respectively, the master and backup node relationships between multiple controllers are determined to ensure that services can continue to be provided even if the entire machine loses power.

Benefits of technology

It improves the resource utilization of the storage system and maintains the stability of the storage system. Even if the whole system loses power, it can continue to work and ensure service continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803373A_ABST
    Figure CN120803373A_ABST
Patent Text Reader

Abstract

The invention provides a cache mirror image determination method and a storage system, which can be applied to the technical field of computer data storage. The cache mirror image determination method comprises the steps that a first cache mirror image pair is determined, a target first controller in a plurality of first controllers serves as a main node, a target second controller in a plurality of second controllers is determined to serve as a standby node according to a node identifier of any first controller, the plurality of first controllers are arranged in a first machine frame, and the plurality of second controllers are arranged in a second machine frame; the plurality of first controllers are arranged on the first machine frame, the plurality of second controllers are arranged on the second machine frame, the first machine frame and the second machine frame are respectively connected with the shared memory, and the first machine frame and the second machine frame belong to the same input and output group, so that the plurality of first controllers and the plurality of second controllers cooperatively process data storage requests; a second cache mirror image pair is determined, the target second controller serves as a main node, the alternative first controller serves as a standby node, and the alternative first controller is any one of the multiple first controllers except the target first controller;
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computer data storage, and more particularly to a cache mirror determining method and a storage system. BACKGROUND

[0002] The cache mirror is to cache the received data to the master node and the standby node respectively. When a node fails, another node can be used to cache data to provide services for users. The cache mirror is a technology to prevent the loss of cached data and provide continuous services for users.

[0003] However, two nodes in the same machine frame form a cache mirror pair, and the whole machine is powered off, so it is difficult to continue to provide services for users by using the cache mirror pair. SUMMARY

[0004] In view of the above problems, the present application provides a cache mirror determining method and a storage system.

[0005] According to a first aspect of the present application, a cache mirror determining method is provided, comprising: determining a first cache mirror pair, wherein a target first controller in a plurality of first controllers is a master node, and a target second controller in a plurality of second controllers is a standby node according to the node identifier of any first controller, the plurality of first controllers are arranged in a first machine frame, the plurality of second controllers are arranged in a second machine frame, the first machine frame and the second machine frame are connected with a shared storage respectively, the first machine frame and the second machine frame belong to the same input / output group, so that the plurality of first controllers and the plurality of second controllers cooperatively process data storage requests; determining a second cache mirror pair, wherein the target second controller is a master node, and an alternative first controller is a standby node, wherein the alternative first controller is any first controller in the plurality of first controllers except the target first controller.

[0006] A second aspect of the present application provides a storage system, comprising: a first machine frame comprising a plurality of first controllers; a second machine frame comprising a plurality of second controllers, the first machine frame and the second machine frame belong to the same input / output group, so that the plurality of first controllers and the plurality of second controllers cooperatively process data storage requests, the first machine frame and the second machine frame are connected with a shared storage respectively to facilitate the first controllers and the second controllers to form a cache mirror pair across the machine frames, the cache mirror pair is obtained by using the above cache mirror determining method.

[0007] The third aspect of the present application provides a cache mirror determining device, comprising: a first determining module, configured to determine a first cache mirror pair, a target first controller in a plurality of first controllers as a master node, and a target second controller in a plurality of second controllers determined according to a node identifier of any first controller as a backup node, the plurality of first controllers being arranged in a first machine frame, the plurality of second controllers being arranged in a second machine frame, the first machine frame and the second machine frame being connected with a shared memory, the first machine frame and the second machine frame belonging to a same input / output group, so that the plurality of first controllers and the plurality of second controllers cooperatively process data storage requests; and a second determining module, configured to determine a second cache mirror pair, wherein the target second controller is the master node, and an alternative first controller is the backup node, and the alternative first controller is any first controller in the plurality of first controllers except the target first controller.

[0008] The fourth aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method.

[0009] The fifth aspect of the present application further provides a computer-readable storage medium having a computer program or instructions stored thereon, wherein the computer program or instructions are executed by a processor to implement the steps of the method.

[0010] The sixth aspect of the present application further provides a computer program product comprising a computer program or instructions, wherein the computer program or instructions are executed by a processor to implement the steps of the method.

[0011] According to the embodiments of the present application, the first machine frame and the second machine frame are connected with the shared memory, so as to form the cache mirror pair across the machine frames by the plurality of controllers. Even if the whole machine is powered off, the controller of another machine frame can continue to provide services for users. Specifically, the target first controller in the plurality of first controllers is the master node, and the target second controller in the plurality of second controllers determined according to the node identifier of any first controller is the backup node, so as to improve the resource utilization rate of the storage system. Meanwhile, the target second controller is the master node, and the alternative first controller is the backup node, and the alternative first controller is any first controller in the plurality of first controllers except the target first controller. Compared with the two controllers in the same machine frame forming the cache mirror pair, the cache mirror pair is formed across the machine frames, and even if the whole machine is powered off, each cache mirror pair in the input / output group can continue to work, thereby maintaining the stability of the storage system. BRIEF DESCRIPTION OF DRAWINGS

[0012] The above and other objects, features and advantages of the present application will become more apparent from the following description of embodiments of the present application taken in conjunction with the accompanying drawings, in which:

[0013] Figure 1 An application scenario diagram of the cache mirror image determination method according to an embodiment of the present application is shown;

[0014] Figure 2 A flowchart of the cache mirror image determination method according to an embodiment of the present application is shown;

[0015] Figure 3 A principle diagram of the cache mirror image determination method according to an embodiment of the present application is shown;

[0016] Figure 4 A diagram showing the first cache mirror image pair after reorganization for single-node failure according to an embodiment of the present application is shown;

[0017] Figure 5 A diagram showing the first cache mirror image pair after reorganization for double-node failure according to an embodiment of the present application is shown;

[0018] Figure 6 A flowchart of the reorganization method for the first cache mirror image pair due to the online of a new node according to an embodiment of the present application is shown;

[0019] Figure 7 A diagram showing the state transition of the first cache mirror image pair according to an embodiment of the present application is shown;

[0020] Figure 8 A flowchart of the processing of node offline according to an embodiment of the present application is shown;

[0021] Figure 9 A structural block diagram of a storage system according to an embodiment of the present application is shown;

[0022] Figure 10 A structural block diagram of a cache mirror image determination apparatus according to an embodiment of the present application is shown;

[0023] Figure 11 A block diagram of an electronic device suitable for implementing the cache mirror image determination method according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0024] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. It is to be understood, however, that the description is merely exemplary and is not intended to limit the scope of the present application. In the following detailed description of the embodiments of the present application, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present application. However, it would be apparent to those skilled in the art that the embodiments of the present application can be practiced without these specific details. In other instances, well-known structures and techniques have not been described in detail in order to avoid obscuring aspects of the present application.

[0025] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "includes" and tautological derivatives thereof, means that the named feature can be included, but not necessarily to the exclusion of one or more other features, steps, operations, and / or components.

[0026] All terms used herein including technical and scientific terms have the meanings commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein are defined as having a meaning that is consistent with the context within the present specification and that the terms should not be interpreted in an overly idealized or overly formal manner.

[0027] In situations where similar terminology is used, such as "at least one of A, B, and C," it is generally intended that if two of A and B, or two of B and C are present in a system (and no A is present in the system), that the system is to be considered as not having A in the system, even though the phrase "at least one of A, B, and C" has been used to describe the system.

[0028] In the current centralized storage system, a structure with two controllers in a frame is adopted, and the controller is taken as a node, and each input / output group is composed of two nodes in the frame. And the two nodes form a cache mirror pair with each other in the same frame. At the same time, the node identifier in the cluster is only related to the order of the node joining the input / output group. The advantage of this technical architecture is simple structure, easy to understand and implement, but it also has some disadvantages, especially in system scalability and stability. This design can meet the basic needs when the number of nodes is small, but when the number of nodes in the input / output group needs to be expanded as the system scale expands, the limitations of the existing technology gradually appear.

[0029] When the number of nodes in the input / output group is expanded to 4, there are at most two frames (i.e. two cache mirror pairs) in each input / output group, if the node identifier is still allocated according to the original design according to the order of joining the cluster, the control module will not be able to determine the physical relationship between the two nodes in the input / output group, such as whether they are in the same frame or not.

[0030] At the same time, according to the original design, if the two nodes in the same frame are still grouped into a mirror cache pair, it is also impossible to macro-control through the node identifier, which is not conducive to resource allocation. It is also not flexible to handle some fault scenarios, for example, when the two nodes in the same frame in the input / output group are offline (such as the whole machine power off), the mirror cache pair state of the input / output group will become unstable, and it is difficult to continue to provide services to the user. These problems may be particularly pronounced when the system scale is increased or expanded, affecting the overall stability and resource utilization efficiency of large-scale storage systems.

[0031] Therefore, embodiments of the present application provide a cache mirror determination method, comprising: determining a first cache mirror pair, wherein a target first controller in a plurality of first controllers is a master node, and a target second controller in a plurality of second controllers is a backup node according to a node identifier of any first controller, the plurality of first controllers are arranged in a first chassis, the plurality of second controllers are arranged in a second chassis, the first chassis and the second chassis are connected with a shared memory, and the first chassis and the second chassis belong to a same input / output group, so that the plurality of first controllers and the plurality of second controllers cooperatively process data storage requests; and determining a second cache mirror pair, wherein the target second controller is the master node, and an alternative first controller is the backup node, wherein the alternative first controller is any first controller in the plurality of first controllers except the target first controller.

[0032] Figure 1 An application scenario diagram of the cache mirror determination method according to an embodiment of the present application is shown.

[0033] As shown in Figure 1 , the application scenario 100 according to the embodiment can include a first chassis 110, a shared memory 120, and a second chassis 130. The first chassis 110 and the second chassis 130 are connected with the shared memory 120, so that the controllers in the first chassis 110 and the controllers in the second chassis 130 form a cache mirror pair across the chassis. For example, the storage data of the first chassis 110 is copied to the shared memory 120, and the second chassis 130 obtains the storage data of the first chassis 110 from the shared memory 120. The first chassis 110 and the second chassis 130 can also respectively read data from the shared memory 120 or store data to the shared memory 120.

[0034] The first chassis 110 and the second chassis 130 can belong to a same input / output group, so that the controllers in the first chassis 110 and the controllers in the second chassis 130 cooperatively process data storage requests. For example, in response to the input / output group receiving a data storage request from a terminal, a cache mirror pair can be allocated according to the data service type for data storage.

[0035] Figure 2 A flowchart of the cache mirror determination method according to an embodiment of the present application is shown.

[0036] As shown in Figure 2 , the cache mirror determination method of the embodiment includes operations S210-S220.

[0037] In operation S210, a first cache mirror pair is determined, in which a target first controller in the plurality of first controllers is a master node, and a target second controller in the plurality of second controllers is a backup node according to a node identifier of any first controller, the plurality of first controllers are disposed in a first chassis, the plurality of second controllers are disposed in a second chassis, the first chassis and the second chassis are connected with a shared storage, the first chassis and the second chassis belong to a same input / output group, so that the plurality of first controllers and the plurality of second controllers cooperatively process a data storage request.

[0038] In operation S220, a second cache mirror pair is determined, in which the target second controller is a master node, and an alternative first controller is a backup node, the alternative first controller is any first controller in the plurality of first controllers except the target first controller.

[0039] According to an embodiment of the present application, the chassis can be a physical shell or frame for accommodating, fixing and protecting the storage core components. For example, the first chassis internally connects the components through an internal bus, to realize signal transmission between the plurality of first controllers, and between the chassis and external devices (such as servers, network switches).

[0040] According to an embodiment of the present application, the master node and the backup node of the cache mirror pair are respectively used for storing or caching data from the data storage request. In the case of failure of one node in the cache mirror pair, the other node can continue to cache data, and the service provided to the user will not be interrupted. The two controllers in the same chassis form a cache mirror pair, and if the whole machine is powered off (both nodes in the cache mirror pair fail), the service provided to the user is interrupted.

[0041] According to an embodiment of the present application, the first chassis and the second chassis are respectively connected with a shared storage, so that the cache mirror pair can be formed across the chassis.

[0042] For example, the shared storage can be a back-end shared disk. The storage data of the first chassis is copied to the shared storage, and the storage data of the first chassis is obtained from the shared storage by the second chassis.

[0043] For example, the first chassis and the second chassis work cooperatively through a cluster protocol, each controller still independently manages the storage data, and the Paxos consensus algorithm is used to maintain data consistency. The cluster protocol can be RADOS (Reliable Autonomic Distributed Object Store).

[0044] According to an embodiment of the present application, different input / output groups correspond to different types of data storage requests. For example, storage requests from an application can be allocated to an input / output group dedicated to processing the application, and controllers within the input / output group cooperatively complete data caching, data transmission, medium access, and the like.

[0045] According to an embodiment of the present application, in order to improve the efficiency of resource use, the first controller and the second controller can serve as both a master node and a backup node in a cache mirror pair, but in the same input / output group, a controller can only serve as a master node or a backup node once.

[0046] The node identifiers corresponding to the controllers in the same chassis can be a sequence of numbers arranged in ascending or descending order with a preset difference value, and the preset difference value is the number of chassis in the input / output group. The sequence of numbers corresponding to the plurality of second controllers does not have the same number as the sequence of numbers corresponding to the plurality of first controllers.

[0047] For example, the number of chassis in the input / output group can be 2, the sequence of numbers corresponding to the plurality of first controllers can be {0, 2}, and the sequence of numbers corresponding to the plurality of second controllers can be {3, 5}. The numbers of the node identifiers in the same input / output group are not consecutive.

[0048] The controllers with node identifiers 0, 2, 3, and 5 can be referred to as node 0, node 2, node 3, and node 5, respectively.

[0049] The first controller of node 0 is taken as the master node of the first cache mirror pair. Any node 5 in the second chassis is taken as the backup node of the first cache mirror pair. In the case where node 5 is the master node of the second cache mirror pair, node 2 in the first chassis except node 0 is taken as the backup node of the second cache mirror pair.

[0050] In the case where node 2 is the master node of the third cache mirror pair, any second controller in the second chassis except the node 5 that has been a backup node is taken as the backup node, i.e., node 3 is the backup node of the third cache mirror pair. In the case where node 3 is the master node of the fourth cache mirror pair, any first controller in the first chassis except the node 2 that has been a master node is taken as the backup node, i.e., node 0 is the backup node of the fourth cache mirror pair. The cache mirror pairs obtained by the embodiment are (0, 5), (5, 2), (2, 3), and (3, 0), respectively.

[0051] Therefore, the node identifier can determine whether it is in the same chassis in the cache mirror pair, facilitating the formation of a cache mirror pair across chassis.

[0052] It should be noted that the above method is also applicable to the case where the same chassis includes more than two controllers, and a cache mirror pair can also be formed across chassis.

[0053] Figure 3 A schematic diagram of a cache mirror determination method according to an embodiment of the application is shown.

[0054] The number of chassis in the input / output group can be 2, the number sequence corresponding to the plurality of first controllers can be {0, 2}, and the number sequence corresponding to the plurality of second controllers can be {1, 3}.

[0055] As shown in FIG. 1, controllers with node identifiers 0-3 are respectively referred to as node 0, node 1, node 2, and node 3. Figure 3 The first controller of node 0 is taken as the primary node of the first cache mirror pair. The adjacent number greater than 0 is determined to be 1. Node 1 is taken as the backup node. In the case where node 1 is taken as the primary node, the adjacent number greater than the node identifier 1 is 2, and the first controller of node 2 is taken as the backup node of the second cache mirror pair.

[0056] The primary node of the first cache mirror pair can be node 2, and the adjacent number greater than the node identifier 2 is 3. Node 3 is taken as the backup node. In the case where node 3 is taken as the primary node, node 0 can only be taken as the backup node of the second cache mirror pair. The cache mirror pairs obtained in this embodiment are (0, 1), (1, 2), (2, 3), and (3, 0).

[0057] The number sequence is arranged in ascending order, and the backup node is determined in the manner of taking the adjacent number in descending order (such as {2, 0}, {3, 1}). The cache mirror pairs obtained in descending order are (2, 3), (3, 0), (0, 1), and (1, 2), which are exactly the same as the four mirror pairs described above.

[0058] The backup node is determined in the manner of taking the adjacent number in ascending order. The cache mirror pairs obtained in ascending order or in descending order are (0, 3), (3, 2), (2, 1), and (1, 0) in turn. Each cache mirror pair is composed of chassis across groups, and each cache mirror pair in the input / output group can continue to work even if the entire machine is powered off.

[0059] For example, the number of chassis in the input / output group can be 2, the number sequence corresponding to the plurality of first controllers can be {0, 2}, and the number sequence corresponding to the plurality of second controllers can be {3, 5}. The numbers of the node identifiers of the same input / output group are not continuous.

[0060] The number sequence corresponding to the plurality of first controllers can be {0, 2}, and the number sequence corresponding to the plurality of second controllers can be {3, 5}. The numbers of the node identifiers of the same input / output group are not continuous.

[0061] The minimum value 0 can be determined from the node identifiers of the plurality of first controllers. The first controller with the node identifier 0 is taken as the master node of the first cache mirror pair. The target node identifier 3 with the minimum difference from the value 0 is determined from the node identifiers of the plurality of second controllers, and the target second controller corresponding to the target node identifier 3 is taken as the backup node. In the case where the target second controller is taken as the master node, the first controller with the node identifier 2 is taken as the backup node of the second cache mirror pair.

[0062] The master node of the first cache mirror pair can be the first controller with the node identifier 2. The backup node identifier 5 is determined according to the minimum difference described above, and the second controller corresponding to the backup node identifier is taken as the backup node. In the case where the second controller is taken as the master node, the first controller with the node identifier 0 is taken as the backup node of the second cache mirror pair. The cache mirror pairs obtained by the embodiment are (0, 3), (3, 2), (2, 5), and (5, 0), respectively.

[0063] The embodiment is also that each cache mirror pair is composed across the frames, so that each cache mirror pair in the input / output group can continue to work even if the whole machine is powered off.

[0064] According to the embodiment of the present application, the first frame and the second frame are connected with the shared memory, respectively, so that the plurality of controllers are composed into cache mirror pairs across the frames. Even if the whole machine is powered off, the controllers of another frame can continue to provide services for users. Specifically, the target first controller in the plurality of first controllers is taken as the master node, and the target second controller in the plurality of second controllers is determined as the backup node according to the node identifier of any first controller, so that the resource utilization of the storage system can be improved. Meanwhile, the target second controller is taken as the master node, and the alternative first controller is taken as the backup node, the alternative first controller being any first controller in the plurality of first controllers except the target first controller. Compared with the two controllers in the same frame being composed into a cache mirror pair, the cache mirror pairs are composed across the frames, so that each cache mirror pair in the input / output group can continue to work even if the whole machine is powered off, and the stability of the storage system is maintained.

[0065] According to the embodiment of the present application, the node identifiers of the plurality of first controllers and the node identifiers of the plurality of second controllers are determined according to the order in which the corresponding frames are added to the input / output group. The target second controller in the plurality of second controllers is determined as the backup node according to the node identifier of any first controller, including: determining the backup node identifier satisfying a preset order relationship with the node identifier of the first controller. The target second controller corresponding to the backup node identifier is taken as the backup node.

[0066] According to the embodiment of the present application, the node identifier of the controller is determined according to the order in which the chassis is added to the input / output group, and the node identifiers corresponding to the controllers of the same chassis can be arranged in a numerical sequence in ascending or descending order with a preset difference value, so that the chassis where the controller is located and the order in which the chassis is added to the input / output group can be obtained from the node identifier, and when a node fails, the corresponding chassis and input / output group can be accurately locked, and macroscopic regulation and control can be facilitated by using the node identifier, and the allocation of resources can be facilitated.

[0067] According to the embodiment of the present application, the node identifiers of the multiple nodes in the same input / output group are consecutive numbers, and the preset order relationship can include: the node identifier with a preset difference value from the node identifier of the first controller, and the number is greater than the number corresponding to the node identifier of the first controller. The preset difference value can be the minimum difference value between the node identifier of the first controller and the node identifier of the second controller.

[0068] For example, the chassis added to the input / output group first can be assigned node identifiers 0 and 2. The chassis added to the input / output group second can be assigned node identifiers 1 and 3. The preset difference value can be 1, the node identifiers of the first controller are 0 and 2 respectively, and in the case of the first cache mirror pair as the primary node, the standby node identifiers are 1 and 3 respectively, that is, the first cache mirror pair can be (0, 1) and (2, 3).

[0069] In the case of the second controller corresponding to the standby node identifier as the primary node of the second cache mirror pair, the second cache mirror pair (1, 2) can be determined according to the preset difference value, and the standby node corresponding to the node identifier 3 can only be the controller with the node identifier 0, that is, the second cache mirror pair can be (1, 2) and (3, 0).

[0070] According to the embodiment of the present application, by determining the standby node identifier that satisfies the preset order relationship with the node identifier of the first controller, the target second controller corresponding to the standby node identifier can be used as the standby node, and the cache mirror pair across the chassis can be quickly formed according to the node identifier.

[0071] According to the embodiment of the present application, the above method further includes: in the case that the first cache mirror pair has a node failure, at least one first effective node identifier that satisfies the preset order relationship with the failure node identifier of the failure node in the first cache mirror pair is determined from the multiple node identifiers of the input / output group. The first cache mirror pair after reorganization is determined according to the at least one first effective node identifier.

[0072] According to the embodiment of the present application, the first effective node corresponding to the first effective node identifier is a node that has not failed.

[0073] For example, the number of chassis in the input-output group can be 2, the number sequence corresponding to the two first controllers in the first chassis can be {0, 2}, and the number sequence corresponding to the two second controllers in the second chassis can be {1, 3}. The four cache mirror pairs are (0, 1), (1, 2), (2, 3), and (3, 0) respectively.

[0074] The preset difference value can be the minimum difference value between the node identifier of the first controller and the node identifier of the second controller, that is, the preset difference value is 1. The preset order relationship is that the node identifier having the preset difference value with the fault node identifier is greater than the number corresponding to the fault node identifier.

[0075] In the case that node 1 fails, the first effective node satisfying the preset order relationship is node 2. According to node 2, it can be determined that the reorganized mirror pair corresponding to (0, 1) can be (0, 2).

[0076] In the case that node 0 and node 1 fail, the multiple first effective nodes satisfying the preset order relationship are node 2 and node 3. According to node 2 and node 3, the reorganized cache mirror pair can be determined, for example, the reorganized cache mirror pair of (0, 1) can be (2, 3) or (3, 2).

[0077] According to the embodiment of the present application, in the case that the cache mirror pair fails, at least one first effective node identifier satisfying the preset order relationship with the fault node identifier can be determined from the multiple node identifiers of the input-output group. The first reorganized cache mirror pair is determined according to the at least one first effective node identifier, which can improve the reorganization efficiency of the cache mirror pair and maintain the stability of the storage system.

[0078] According to the embodiment of the present application, the above method further comprises: in the case that there is a single node failure in the first cache mirror pair, determining the target effective node in the first cache mirror pair that does not fail as the master node in the reorganized first cache mirror pair.

[0079] For example, the first chassis includes node 0 and node 2, and the second chassis includes node 1 and node 3. The first cache mirror pair can be (0, 1). The fault node is node 1, and the target effective node that does not fail is node 0. In order to maintain the stability of the data of the cache mirror pair, node 0 is taken as the reorganized master node.

[0080] The first cache mirror pair can be (0, 1). The fault node is 0, and the target effective node that does not fail is node 1. In order to maintain the stability of the data of the cache mirror pair, node 1 is taken as the reorganized master node.

[0081] According to the embodiment of the present application, the target effective node which does not fail in the first cache mirror pair is taken as the master node in the reorganized first cache mirror pair, the data stability of the cache mirror pair can be maintained, the number of reorganized nodes can be reduced, and the overall storage performance of the storage system can be improved.

[0082] According to the embodiment of the present application, the reorganized first cache mirror pair is determined according to the at least one first effective node identifier, including: in the case that the first effective node identifier is the same as the target node identifier of the target effective node, determining a second effective node identifier which satisfies the preset order relationship with the target node identifier. The standby node in the reorganized first cache mirror pair is determined according to the second effective node identifier.

[0083] Figure 4 A schematic diagram of the reorganized first cache mirror pair for single node failure is shown according to the embodiment of the present application.

[0084] As shown in Figure 4 , it is assumed that the first rack includes node 0 and node 2, and the second rack includes node 1 and node 3 (the first rack and the second rack are not shown in the figure). The first cache mirror pair can be (1, 2). The failed node is 1, and the first effective node which satisfies the preset order relationship is node 2 in the case that node 1 fails. The target effective node which does not fail in the first cache mirror pair is node 2, and node 2 is taken as the master node of the reorganized first cache mirror pair.

[0085] However, the first effective node identifier is the same as the target node identifier of the target effective node, and it is difficult to determine the standby node in the reorganized first cache mirror pair. Therefore, the second effective node identifier 3 which satisfies the preset order relationship with the target node identifier 2 is determined. Node 3 is taken as the standby node of the reorganized first cache mirror pair. The reorganized first cache mirror pair can be (2, 3).

[0086] According to the embodiment of the present application, since the first effective node identifier is the same as the target node identifier of the target effective node, the standby node in the reorganized first cache mirror pair can be determined according to the second effective node identifier which satisfies the preset order relationship with the target node identifier, and the efficiency of the reorganized cache mirror pair is improved.

[0087] According to the embodiment of the present application, the above method further includes: in the case that the master node and the standby node in the reorganized first cache mirror pair are in the same rack, taking a preset cache device as a transition standby node in the reorganized first cache mirror pair.

[0088] According to the embodiment of the present application, the preset cache device can be a disk in the storage system, and the disk can be taken as the transition standby node in the reorganized first cache mirror pair.

[0089] AsFigure 4 As shown, assume that the first cache mirror pair can be (0, 1). If node 1 fails, the surviving target valid node in the first cache mirror pair is node 0, and node 0 becomes the primary node of the reorganized first cache mirror pair. The first valid node that satisfies the preset order is node 2, and the first valid node becomes the backup node of the reorganized first cache mirror pair. That is, the reorganized first cache mirror pair can be (0, 2). However, this reorganized first cache mirror pair (0, 2) belongs to the same chassis.

[0090] To prevent the entire machine from losing power and the situation where the reorganized first cache mirror pair (0,2) is unable to continue to provide services to users, the preset cache device is used as a transitional standby node in the reorganized first cache mirror pair, which can continue to cache data in the event of a power outage.

[0091] After the failed node resumes normal operation, the cache mirror pairs of the nodes in the input and output groups are reorganized. After the reorganization is completed, the nodes can be switched to the corresponding business, and the data in the preset cache device can also be sent to the corresponding business node to achieve continuity of user service.

[0092] According to an embodiment of the present invention, determining a reorganized first cache mirror pair based on at least one first valid node identifier further includes: determining the number of reorganized first cache mirror pairs in the same input / output group if a dual-node failure occurs in the first cache mirror pair; and performing a master / slave switchover on the primary node and the backup node in the reorganized first cache mirror pair if the number does not meet a preset number.

[0093] According to an embodiment of the present invention, the preset number is half of the total number of cache mirror pairs in the input and output group.

[0094] Figure 5 A schematic diagram of a first cache mirror pair after reorganization in response to a double-node failure according to an embodiment of the present invention is shown.

[0095] like Figure 5 As shown in the figure, assume that the first chassis includes nodes 0 and 2, and the second chassis includes nodes 1 and 3 (the first and second chassis are not shown in the figure). There are four cache mirror pairs: (0, 1), (1, 2), (2, 3), and (3, 0). The preset number is 2. The first cache mirror pair can be (0, 1). A dual-node failure occurs in the first cache mirror pair: both nodes 0 and 1 fail.

[0096] According to the preset order relationship, the failed cache mirror pair is reorganized, and for (0, 1), the reorganized cache mirror pair is (2, 3); for (1, 2), the reorganized cache mirror pair is (2, 3); for (3, 0), the reorganized cache mirror pair is (3, 2). That is, the cache mirror pairs (0, 1), (1, 2), (2, 3) and (3, 0) are reorganized into (2, 3), (2, 3), (2, 3) and (3, 2) respectively.

[0097] In order to maintain the reliability of data, the number of each cache mirror pair is not too large, so in the case that the number of the first cache mirror pair after reorganization in the same input / output group is greater than half of the total number of cache mirror pairs, the master node and the standby node in the first cache mirror pair after reorganization are switched. The final cache mirror pairs are (2, 3), (2, 3), (3, 2) and (3, 2).

[0098] According to an embodiment of the present application, the first cache mirror pair includes at least one of the following working states: a failure state, a reorganization state and a stable state. The method further includes: in the case that the first cache mirror pair is in a reorganization state due to the online of a new node, determining a to-be-updated node in the first cache mirror pair according to the node identifier of the new node, so that the new node caches the data of the to-be-updated node in the first cache mirror pair in the reorganization state. The to-be-updated node in the first cache mirror pair is updated to the new node to obtain an intermediate cache mirror pair. According to the node type of the new node in the first cache mirror pair, the master node and the standby node in the intermediate cache mirror pair are switched to obtain the first cache mirror pair after reorganization.

[0099] For example, the first cache mirror pair can be (0, 1), but node 1 fails. The first cache mirror pair is converted from a stable state to a reorganization state. The reorganization state can have three nodes, retaining the original nodes while taking the first effective node 2 as the third node of the reorganization state, that is, the reorganization state of the first cache mirror pair is (0, 1, 2). The first failed node 1 is updated to node 2 to obtain the first cache mirror pair after reorganization (0, 2). Since node 0 and node 2 are in the same machine frame, a preset cache device is added to the first cache mirror pair after reorganization (0, 2) to obtain the first cache mirror pair in a stable state again.

[0100] In the case that node 1 recovers normally, the first cache mirror pair (0, 2) in a stable state is in a reorganization state again due to the online of the new node 1. Since each node in different machine frames is in a normal or failure state, the corresponding mirror pair is stored, so the cache mirror pairs corresponding to different nodes in the same input / output group can be established. Therefore, the to-be-updated node can be determined to be node 2 according to the new node 1. Node 2 is updated back to node 1.

[0101] Exemplarily, four cache mirror pairs are (0, 1), (1, 2), (2, 3) and (3, 0). Node 0 fails, and the cache mirror pairs after the first reorganization are (1, 2), (1, 2), (2, 3) and (3, 1) respectively.

[0102] When node 0 is back online, in the process, the cache mirror pairs in the reorganization state are (1, 2, 0), (1, 2), (2, 3) and (3, 1, 0) respectively. Since (1, 2, 0) updates the to-be-updated node 2 to the new node 0, an intermediate cache mirror node (1, 0) is obtained. However, the new node 0 is the primary node in the cache mirror pair (0, 1) in the stable state, so the primary and backup nodes in the intermediate cache mirror pair are switched to obtain the cache mirror pair (0, 1) in the stable state.

[0103] Since (3, 1, 0) updates the to-be-updated node 1 to the new node 0, an intermediate cache mirror node (3, 0) is obtained. The new node 0 is the backup node in the cache mirror pair (3, 0) in the stable state, so no primary and backup switching is needed.

[0104] Therefore, the final cache mirror pairs in the stable state after node 0 is online are (0, 1), (1, 2), (2, 3) and (3, 0) respectively.

[0105] According to the embodiment of the application, in the case that the first cache mirror pair is in a reorganization state due to the online of a new node, the to-be-updated node in the first cache mirror pair is determined according to the node identifier of the new node. The to-be-updated node in the first cache mirror pair is updated to the new node, and then the primary and backup nodes in the intermediate cache mirror pair are switched according to the node type of the new node in the first cache mirror pair, so that the different cache mirror pairs in the same input and output group are sequentially converted from the reorganization state to the stable state, and the node control is realized in a macroscopic manner.

[0106] According to the embodiment of the application, the method further includes: in the case that the first cache mirror pair after reorganization meets a preset effective node relationship, switching the reorganization state of the cache mirror pair to the stable state.

[0107] According to the embodiment of the application, the preset effective node relationship includes a preset order relationship and a preset number.

[0108] According to the embodiment of the application, in the case that the first cache mirror pair after reorganization meets a preset effective node relationship, it indicates that the reorganization process of the cache mirror pair meets the reorganization requirement, so the reorganization state of the cache mirror pair is switched to the stable state, which can enable the reorganized mirror pair to sequentially cache data and improve the node control performance of the storage system.

[0109] Figure 6 A flowchart of a recombination method for a first cache mirror pair due to online of a new node according to an embodiment of the present application is shown.

[0110] In operation S610, in the case that the first cache mirror pair is in a recombination state due to online of a new node, a node to be updated in the first cache mirror pair is determined according to a node identifier of the new node.

[0111] In operation S620, the node to be updated in the first cache mirror pair is updated to the new node, and an intermediate cache mirror pair is obtained.

[0112] In operation S630, according to a node type of the new node in the first cache mirror pair, a master-standby switching is performed on the master node and the standby node in the intermediate cache mirror pair, and a recombined first cache mirror pair is obtained.

[0113] It should be noted that the process of recombining the cache mirror pair is also a process of recombining services managed by the controllers in the input-output group.

[0114] In operation S640, it is judged whether the recombined first cache mirror pair satisfies a preset effective node relationship, if yes, operation S650 is performed, and if no, operation S660 is performed.

[0115] According to an embodiment of the present application, the preset effective node relationship can include a preset order relationship and a preset number. In order to facilitate verification, various recombination conditions of each cache mirror pair can be respectively cached in a mapping table. For example, in the mapping table, the recombination state of each cache mirror pair in the case that node 1 fails or is online, and the stable state of each cache mirror pair.

[0116] In operation S650, the recombination state of the cache mirror pair is switched to the stable state.

[0117] In operation S660, the node to be updated is replaced.

[0118] Exemplarily, the storage system includes a processor, a control module and a service module. The control module is configured to send a notification of online of a node to the processor. The service module can be a module (such as a controller in the input-output group) for processing a service request of the input-output group. There are two frames in the same input-output group, and there are two service modules (controllers) in each frame. The service modules are taken as nodes, the service modules of the first frame are node 0 and node 2 respectively, and the service modules of the second frame are node 1 and node 3 respectively.

[0119] When both node 0 and node 2 are online, the control module will inform each service to process the online of node 0, and let each service module (controller) initiate reorganization. When all service modules are reorganized, the control module will initiate a check on the queuing mode of each module, and if all are reorganized according to the established queuing mode, the current input-output group cache mirror pair state will be changed to a stable state. Then, the online of node 2 will be processed again, and each service module will initiate reorganization again. Finally, the cache mirror pair state will be changed to a stable state after the cache mirror pair management module confirms that the reorganization results of each service module are correct. At this time, node 0 and node 2 are both valid nodes in the input-output group, and are not mirror pairs of each other. If it is found during the check by the cache mirror pair management module that the queuing mode fed back by a service module does not match the queuing mode recorded in the mapping table, a reorganization signal will be initiated to the corresponding service module until the results returned by all service modules are consistent with the queuing mode in the mapping table.

[0120] When a new node is online or a faulty node is offline, the control module will again inform each service module to reorganize, and initiate a check after reorganization. For example, when node 0, node 2, node 1, and node 3 are online, two reorganizations will be initiated. After the control module confirms that each service module is reorganized and correct, the combination of the cache mirror pair of the input-output group will be changed.

[0121] During reorganization, taking the second cache mirror pair as an example, the state will be two-node stable state (1, 3), reorganization state (1, 3, 2), and recovery stable state (1, 2). When one of the nodes is offline, the control module will adjust the queuing mode of the mirror pair members according to the record in the mapping table based on the current online nodes, that is, start reorganization and inform each service module to process. After different nodes are offline, the control module can quickly and flexibly adjust to the best and unique mirror pair queuing mode, greatly improving resource utilization.

[0122] Figure 7 A schematic diagram of state transition of a first cache mirror pair according to an embodiment of the application is shown.

[0123] As shown in Figure 7 , in the case where the nodes of the same input-output group are online, the cache mirror pair in the stable state 701 can be determined based on the cache mirror determination method. The cache mirror pair in the stable state 701 can provide service and the data has reliability.

[0124] In the case where a node is online / offline, the cache mirror pair is converted from the stable state 701 to the reorganization state 702. In the case where a node is offline, the valid nodes will be re-assigned; in the case where a node is online, the node to be updated in the cache mirror pair will be determined. The reorganization state 702 can ensure data validity.

[0125] The last valid node in the cache mirror pair in the stable state 701 is offline, and the cache mirror pair is switched from the stable state 701 to the failure state 703.

[0126] The last valid node in the cache mirror pair in the reorganization state 702 is also offline, and the cache mirror pair is in the failure state 703. The failed node can be waited to be online again, and then it is determined whether to reorganize.

[0127] The node in the cache mirror pair in the failure state 703 is online again, and the node can also meet the reorganization condition, and the cache mirror pair is switched from the failure state 703 to the reorganization state 702.

[0128] After the reorganization is completed, the reorganized cache mirror pair is consistent with the mapping table, and the cache mirror pair is switched from the reorganization state 702 to the stable state 701.

[0129] The cache mirror pair has the stable state 701, the reorganization state 702 and the failure state 703, so as to ensure the stability of the storage system and the reasonable allocation of resources.

[0130] Figure 8 A flowchart of processing of node offline according to an embodiment of the present application is shown.

[0131] In operation S801, there is a node offline in the cache mirror pair in the stable state.

[0132] In operation S802, it is determined whether the offline node is the last valid node in the cache mirror pair, if yes, operation S803 is performed, and if no, operation S806 is performed.

[0133] In operation S803, the cache mirror pair is switched to the failure state.

[0134] In operation S804, the node is waited to be online again.

[0135] In operation S805, it is determined whether there is a valid node in the four cache mirror pairs in the input / output group, if yes, operation S806 is performed, and if no, operation S807 is performed.

[0136] In operation S806, the cache mirror pair is reorganized.

[0137] In operation S807, the failure state is maintained.

[0138] In operation S808, it is determined whether the reorganized cache mirror pair corresponds to the mapping table, if yes, operation S809 is performed, and if no, operation S806 is performed.

[0139] In operation S809, the stable state is updated.

[0140] Figure 9 A structural block diagram of a storage system according to an embodiment of the present application is shown.

[0141] As shown in Figure 9 , the storage system 900 of this embodiment includes a first chassis 110, a shared storage 120 and a second chassis 130.

[0142] The first chassis 110 includes a plurality of first controllers 111.

[0143] The second chassis 130 includes a plurality of second controllers 131, and the first chassis 110 and the second chassis 130 belong to the same input / output group 910, so that the plurality of first controllers 111 and the plurality of second controllers 131 cooperatively process data storage requests, and the first chassis 110 and the second chassis 130 are respectively connected with the shared storage 120 to facilitate the first controllers 111 and the second controllers 131 to form a cache mirror pair across the chassis, and the cache mirror pair is obtained by using the above-mentioned cache mirror determination method.

[0144] Figure 10 A structural block diagram of a cache mirror determination apparatus according to an embodiment of the present application is shown.

[0145] As shown in Figure 10 , the cache mirror determination apparatus 1000 of this embodiment includes a first determination module 1010 and a second determination module 1020.

[0146] The first determination module 1010 is configured to determine a first cache mirror pair, a target first controller in the plurality of first controllers as a master node, and a target second controller in the plurality of second controllers determined according to the node identifier of any first controller as a backup node, the plurality of first controllers are arranged in a first chassis, the plurality of second controllers are arranged in a second chassis, the first chassis and the second chassis are respectively connected with a shared storage, and the first chassis and the second chassis belong to the same input / output group, so that the plurality of first controllers and the plurality of second controllers cooperatively process data storage requests. In an embodiment, the first determination module 1010 can be configured to perform the operation S210 described above, and details are not repeated here.

[0147] The second determination module 1020 is configured to determine a second cache mirror pair, wherein the target second controller is a master node, and an alternative first controller is a backup node, and the alternative first controller is any first controller in the plurality of first controllers except the target first controller. In an embodiment, the second determination module 1020 can be configured to perform the operation S220 described above, and details are not repeated here.

[0148] According to an embodiment of the present application, the node identifiers of the first plurality of controllers and the node identifiers of the second plurality of controllers are determined according to the order in which the corresponding chassis are added to the input / output group. The second determining module 1020 includes a first determining sub-module and a second determining sub-module. The first determining sub-module is configured to determine a backup node identifier that satisfies a preset order relationship with the node identifier of the first controller. The second determining sub-module is configured to determine a target second controller corresponding to the backup node identifier as a backup node.

[0149] According to an embodiment of the present application, the cache mirror determining apparatus 1000 further includes a third determining module and a fourth determining module. The third determining module is configured to, in the case that the first cache mirror pair has a node fault, determine at least one first valid node identifier that satisfies a preset order relationship with the fault node identifier of the fault node in the first cache mirror pair from the plurality of node identifiers of the input / output group according to the fault node identifier. The fourth determining module is configured to determine a reorganized first cache mirror pair according to the at least one first valid node identifier.

[0150] According to an embodiment of the present application, the cache mirror determining apparatus 1000 further includes a fifth determining module. The fifth determining module is configured to, in the case that there is a single node fault in the first cache mirror pair, determine a target valid node that has no fault in the first cache mirror pair as a master node in the reorganized first cache mirror pair.

[0151] According to an embodiment of the present application, the fourth determining module includes a third determining sub-module and a fourth determining sub-module. The third determining sub-module is configured to, in the case that the first valid node identifier is the same as a target node identifier of the target valid node, determine a second valid node identifier that satisfies a preset order relationship with the target node identifier. The fourth determining sub-module is configured to determine a backup node in the reorganized first cache mirror pair according to the second valid node identifier.

[0152] According to an embodiment of the present application, the fourth determining module further includes a fifth determining sub-module and a master-backup switching sub-module. The fifth determining sub-module is configured to, in the case that there is a double node fault in the first cache mirror pair, determine the number of the reorganized first cache mirror pairs in the same input / output group. The master-backup switching sub-module is configured to, in the case that the number does not satisfy a preset number, perform master-backup switching on the master node and the backup node in the reorganized first cache mirror pair.

[0153] According to an embodiment of the present application, the cache mirror determining apparatus 1000 further includes a sixth determining module. The sixth determining module is configured to, in the case that the master node and the backup node in the reorganized first cache mirror pair are in the same chassis, determine a preset cache device as a transition backup node in the reorganized first cache mirror pair.

[0154] According to an embodiment of the present application, the first cache mirror pair comprises at least one of the following working states: a fault state, a reorganization state, and a stable state. The device further comprises a seventh determining module, an updating module, and a master-slave switching module. The seventh determining module is configured to determine a to-be-updated node in the first cache mirror pair according to a node identifier of the added node when the first cache mirror pair is in the reorganization state due to the added node being online, so that the added node caches data of the to-be-updated node in the first cache mirror pair in the reorganization state. The updating module is configured to update the to-be-updated node in the first cache mirror pair to the added node, to obtain an intermediate cache mirror pair. The master-slave switching module is configured to perform master-slave switching on a master node and a slave node in the intermediate cache mirror pair according to a node type of the added node in the first cache mirror pair, to obtain a reorganized first cache mirror pair.

[0155] According to an embodiment of the present application, the cache mirror determining device 1000 further comprises a state switching module. The state switching module is configured to switch the reorganization state of the cache mirror pair to a stable state when the reorganized first cache mirror pair satisfies a preset effective node relationship.

[0156] According to an embodiment of the present application, any of the first determining module 1010 and the second determining module 1020 can be combined in one module for implementation, or any of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of the modules can be combined with at least part of the functions of other modules, and implemented in one module. According to an embodiment of the present application, at least one of the first determining module 1010 and the second determining module 1020 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application specific integrated circuit (ASIC), or any other reasonable manner of integrating or packaging a circuit, etc. hardware or firmware, or in any one of software, hardware, and firmware implementation or in a proper combination of any of them. Alternatively, at least one of the first determining module 1010 and the second determining module 1020 can be at least partially implemented as a computer program module that can perform corresponding functions when the computer program module is run.

[0157] Figure 11 A block diagram of an electronic device suitable for implementing the cache mirror determining method according to an embodiment of the present application is shown.

[0158] As Figure 11As shown, the electronic device 1100 according to an embodiment of the present application includes a processor 1101 which can perform various appropriate actions and processes in accordance with a program stored in a read only memory (ROM) 1102 or a program loaded into a random access memory (RAM) 1103 from a storage section 1108. The processor 1101 can include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor, and / or a related chip set, and / or a dedicated microprocessor (e.g., an application specific integrated circuit (ASIC)), and so on. The processor 1101 can also include an on-board memory for cache use. The processor 1101 can include a single processing unit or multiple processing units to perform the various actions of the method processes according to embodiments of the present application.

[0159] In the RAM 1103, various programs and data required for the operation of the electronic device 1100 are stored. The processor 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. The processor 1101 performs various operations of the method processes according to embodiments of the present application by executing the programs in the ROM 1102 and / or the RAM 1103. Note that the programs can also be stored in one or more memories other than the ROM 1102 and the RAM 1103. The processor 1101 can also perform various operations of the method processes according to embodiments of the present application by executing the programs stored in the one or more memories.

[0160] According to an embodiment of the present application, the electronic device 1100 can also include an input / output (I / O) interface 1105 which is also connected to the bus 1104. The electronic device 1100 can also include one or more of the following components connected to the input / output (I / O) interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the input / output (I / O) interface 1105 as necessary. A removable recording medium 1111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1110 as necessary, so that a computer program read therefrom is installed into the storage section 1108 as necessary.

[0161] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the present invention.

[0162] According to an embodiment of the present invention, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present invention, a computer-readable storage medium may include ROM 1102 and / or RAM 1103 described above, and / or one or more memories other than ROM 1102 and RAM 1103.

[0163] Embodiments of the present invention also include a computer program product comprising a computer program containing program code for executing the method shown in the flowchart. When the computer program product is executed in a computer system, the program code is used to cause the computer system to implement the cache mirror determination method provided in an embodiment of the present invention.

[0164] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when executed by the processor 1101. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0165] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 1109, and / or installed from removable media 1111. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0166] In such embodiments, the computer program can be downloaded and installed from the network through the communication part 1109, and / or installed from the detachable medium 1111. When the computer program is executed by the processor 1101, the above-described functions defined in the system of the embodiments of the present application are executed. According to the embodiments of the present application, the system, the apparatus, the device, the module, the unit, and the like described above can be realized by the computer program modules.

[0167] According to the embodiments of the present application, the program code for executing the computer program provided by the embodiments of the present application can be written in any combination of one or more programming languages, and specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming language, and / or assembly / machine language. The programming language includes, but is not limited to, such as Java, C++, python, "C" language, or similar programming language. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or storage system. In the case involving a remote computing device, the remote computing device can be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, connected through the Internet by using an Internet service provider).

[0168] The flowcharts and block diagrams in the drawings illustrate the possible architectural, functional, and operational scenarios of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a program segment, or a portion of code that contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders than those noted in the figures. For example, two blocks noted in succession can actually be executed substantially concurrently, or they can sometimes be executed in reverse order, depending on the functionality involved. It should also be noted that each block in the flowcharts or block diagrams, and combinations of blocks in the flowcharts or block diagrams, can be implemented by dedicated hardware-based systems that perform the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0169] Those skilled in the art can understand that the features described in various embodiments of the present application can be combined and / or integrated in various combinations and / or integrations, even if such combinations or integrations are not explicitly described in the present application. In particular, the features described in various embodiments of the present application can be combined and / or integrated in various combinations and / or integrations without departing from the spirit and teachings of the present application. All such combinations and / or integrations fall within the scope of the present application.

[0170] The above described embodiments of the application have been described. However, these embodiments are merely meant to be illustrative of the present application and not meant to limit the scope of the present application. Although each of the above described embodiments have been described separately, this does not mean that measures from the various embodiments cannot be used advantageously in combination. Numerous alternatives and modifications will be apparent to those skilled in the art without departing from the scope of the present application, which is defined in the following claims.

Claims

1. A cache image determination method, characterized in that: The method comprises: Determining a first cache mirror pair, wherein a target first controller among the plurality of first controllers serves as a master node, and a target second controller among the plurality of second controllers determined based on a node identifier of any of the first controllers serves as a backup node, the plurality of first controllers being disposed in a first chassis, the plurality of second controllers being disposed in a second chassis, the first chassis and the second chassis being respectively connected to a shared memory, and the first chassis and the second chassis belonging to the same input / output group, so that the plurality of first controllers and the plurality of second controllers collaboratively process data storage requests; A second cache mirror pair is determined, wherein the target second controller serves as a master node and the candidate first controller serves as a standby node, wherein the candidate first controller is any first controller among the plurality of first controllers except the target first controller.

2. The method according to claim 1, characterized in that The node identifiers of the plurality of first controllers and the node identifiers of the plurality of second controllers are determined according to the order in which the corresponding chassis are added to the input and output group; The determining, according to the node identifier of any one of the first controllers, a target second controller among the multiple second controllers as a standby node includes: Determining a standby node identifier that satisfies a preset sequence relationship with the node identifier of the first controller; The target second controller corresponding to the standby node identifier is used as the standby node.

3. The method according to claim 2, characterized in that The method further comprises: In the case where a node failure occurs in the first cache mirror pair, determining, based on the faulty node identifier of the faulty node in the first cache mirror pair, at least one first valid node identifier that satisfies the preset order relationship with the faulty node identifier from the plurality of node identifiers for the input-output group; A reorganized first cache mirror pair is determined according to at least one of the first valid node identifiers.

4. The method according to claim 3, characterized in that The method further comprises: In the case that a single node failure occurs in the first cache mirror pair, a target valid node that has not failed in the first cache mirror pair is determined as the master node in the reorganized first cache mirror pair.

5. The method according to claim 4, characterized in that The determining the reorganized first cache mirror pair according to at least one of the first valid node identifiers includes: When the first valid node identifier is the same as the target node identifier of the target valid node, determining a second valid node identifier that satisfies the preset sequence relationship with the target node identifier; The backup node in the reorganized first cache mirror pair is determined according to the second valid node identifier.

6. The method according to claim 3, characterized in that The determining of the reorganized first cache mirror pair according to at least one of the first valid node identifiers further includes: In the event that a double-node failure occurs in the first cache mirror pair, determining the number of the reorganized first cache mirror pairs in the same input and output group; When the number does not meet the preset number, a master-slave switch is performed on the master node and the backup node in the reorganized first cache image.

7. The method according to claim 6, characterized in that The method further comprises: In a case where the primary node and the backup node in the reorganized first cache mirror pair are located in the same chassis, the preset cache device is used as a transition backup node in the reorganized first cache mirror pair.

8. The method according to claim 2, characterized in that The first cache mirror pair includes at least one of the following working states: a fault state, a reorganization state, and a stable state; The method further comprises: When the first cache mirror pair is in a reorganization state due to a newly added node coming online, determining a node to be updated in the first cache mirror pair according to a node identifier of the newly added node, so that the newly added node caches data of the node to be updated when the first cache mirror is in the reorganization state; Updating the node to be updated in the first cache mirror pair to the newly added node to obtain an intermediate cache mirror pair; According to the node type of the newly added node in the first cache mirror pair, the master node and the backup node in the intermediate cache mirror pair are switched to obtain the reorganized first cache mirror pair.

9. The method according to claim 8, characterized in that The method further comprises: In a case where the reorganized first cache mirror pair satisfies a preset valid node relationship, the reorganization state of the cache mirror pair is switched to the stable state.

10. A storage system, characterized in that: The system comprises: A first chassis includes a plurality of first controllers; The second chassis includes multiple second controllers, the first chassis and the second chassis belong to the same input and output group, so that the multiple first controllers and the multiple second controllers collaboratively process data storage requests, the first chassis and the second chassis are respectively connected to a shared memory so that the first controller and the second controller form a cache mirror pair across the chassis, and the cache mirror pair is obtained using the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and system for implementing cache data backup of distributed storage system

    CN107329708A

  • Cache data processing method and system under four-control storage device fault

    CN115237683A

  • RAID verification write protection method and system based on four-control storage system

    CN115268784A

  • Data caching method and device, equipment and storage medium

    CN115563028A

  • Mirroring method and device for cache data, equipment and medium

    CN115630003A