Data storage method and device of multi-control storage system, controller and medium

By storing business data in a larger memory area and backing up verification data in a smaller memory area in a multi-controller storage system, the problem of each controller needing more than twice the memory in existing technologies is solved, thereby reducing data storage costs and saving hardware costs.

CN122240003APending Publication Date: 2026-06-19ZHEJIANG UNIVIEW TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG UNIVIEW TECH CO LTD
Filing Date
2024-12-13
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing multi-controller storage systems, the cache area of ​​each controller needs to be configured to be more than twice the size required for business data storage in order to achieve backup, resulting in high data storage costs.

Method used

Business data is stored in the larger memory area of ​​this controller, while verification data is stored in the smaller memory area of ​​another controller for backup. Data backup is achieved through XOR verification, reducing the memory occupied by backup data on each controller.

Benefits of technology

It reduces data storage costs, saves hardware costs, and ensures data redundancy and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240003A_ABST
    Figure CN122240003A_ABST
Patent Text Reader

Abstract

This invention provides a data storage method, apparatus, controller, and medium for a multi-controller storage system. The method includes: acquiring business data sent from the business layer; determining a first cache block and a first identifier corresponding to the business data in the cache area of ​​a first controller; performing an XOR check between the business data and existing data in the first cache block to determine check data; determining a second identifier of a second cache block and the number of the second controller receiving the check data based on the first identifier; writing the business data into the first cache block; and sending the check data and the second identifier to the second controller. The second controller is used to perform an XOR check between the check data and the data in its own cache block with the second identifier before writing the data back up the business data. The cache area of ​​the controller includes a first area and a second area, with the second area occupying less memory than the first area. Using this invention can reduce data storage costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data storage technology, and in particular to a data storage method, apparatus, controller, and medium for a multi-controller storage system. Background Technology

[0002] A multi-controller storage system is a storage system that uses multiple controllers to achieve centralized management and efficient access to storage resources. Each controller has a cache area for caching data. Data in the cache area may be lost due to controller or storage device failures. To address this, cache mirroring technology has been proposed. This technology simultaneously stores cached data across multiple controllers. During operation, the multi-controller storage system automatically backs up data to other controllers, ensuring cache consistency across controllers and preventing cached data loss.

[0003] In related technologies, the cache mirroring solution for multi-controller storage systems generally involves storing all cached data from each controller's cache area into the cache area of ​​another controller. In other words, each controller's cache area generally needs to be configured to be at least twice the size required for business data storage, thus enabling the backup of cached data from other controllers' cache areas.

[0004] However, the aforementioned technologies require a large amount of memory per controller, resulting in high data storage costs. Summary of the Invention

[0005] This invention provides a data storage method, apparatus, controller, and medium for a multi-controller storage system. It addresses the shortcomings of existing technologies where each controller's cache area typically requires at least twice the size of the business data storage area to back up the cached data of other controllers, resulting in high data storage costs. By storing the business data in a larger memory area of ​​the current controller and storing the corresponding verification data in a smaller memory area of ​​another controller for backup, the memory occupied by the backup data is reduced, thereby lowering data storage costs.

[0006] This invention provides a data storage method for a multi-controller storage system, comprising: The first controller obtains business data sent by the business layer; In the cache area of ​​the first controller, determine the first cache block corresponding to the business data and the first identifier corresponding to the first cache block; Perform an XOR check between the business data and the original data in the first cache block to determine the check data, and determine the second identifier corresponding to the second cache block and the number of the second controller receiving the check data based on the first identifier, and write the business data into the first cache block. The verification data and the second identifier are sent to the second controller; the second controller is used to perform an XOR verification between the verification data and the data in the second cache block corresponding to the second identifier in its own cache area, and write the XOR verified data into the second cache block corresponding to the second identifier in its own cache area. The verification data is used to back up the business data. Each controller's cache area includes a first area and a second area. Both the first and second areas include at least one cache block. The cache block in the first area is used to store business data, and the cache block in the second area is used to store verification data. The memory occupied by the second area is less than that occupied by the first area.

[0007] According to a data storage method for a multi-controller storage system provided by the present invention, the method for determining the second identifier corresponding to the second cache block and the number of the second controller receiving the verification data based on the first identifier includes: Use the first identifier as the second identifier corresponding to the second cache block; The number of the second controller receiving the verification data is determined based on the second identifier and the total number of controllers included in the multi-controller storage system.

[0008] According to a data storage method for a multi-controller storage system provided by the present invention, the method further includes: The cache block management information corresponding to the first controller is obtained from the first controller; the cache block management information of the first controller includes the correspondence between the cache blocks in the first controller and the logical disk location; After writing business data to the first cache block, the cache block management information of the first controller is updated according to the first identifier of the first cache block, and the updated cache block management information of the first controller is synchronized to the takeover controller corresponding to the first controller. Each controller stores its own cache block management information and backs up the cache block management information of the controllers it manages.

[0009] According to a data storage method for a multi-controller storage system provided by the present invention, if a third controller corresponding to a first controller fails, the first controller is a takeover controller corresponding to the third controller. Before determining the first cache block corresponding to the business data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller, the method further includes: Obtain the target logical disk location where the business data is written, and determine whether the target logical disk location belongs to the resource location corresponding to the third controller; If the target logical disk location belongs to the resource location corresponding to the third controller, then the cache block management information of the third controller backed up in the first controller is used to determine whether the business data hits the cache block in the third controller. If the business data hits a cache block in the third controller, the business data and the third identifier corresponding to the hit cache block are sent to the target controller, and a first data acquisition request is sent to other controllers in the multi-controller storage system. The first data acquisition request includes a third identifier, which is used to instruct other controllers to send the cached data in their own cache blocks corresponding to their third identifiers to the target controller. The target controller performs an XOR check on the cached data and business data sent by other controllers, and writes the XOR-checked data into the cache block corresponding to the third identifier in its own cache area.

[0010] According to a data storage method for a multi-controller storage system provided by the present invention, the method further includes: If the target logical disk location does not belong to the resource location corresponding to the third controller, then the service data is determined to hit the cache block in the first controller based on the cache block management information corresponding to itself stored in the first controller. If the service data hits the first cache block in the first controller, then return to the above steps of determining the first cache block corresponding to the service data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller, and writing the service data into the first cache block; Determine whether the second controller is a faulty controller, and based on the determination result, determine whether to perform the above steps of XOR verification between the business data and the original data in the first cache block, and determine the verification data.

[0011] According to a data storage method for a multi-controller storage system provided by the present invention, the method further includes: If the business data does not hit the first cache block in the first controller, the business data is directly written to the resource corresponding to the target logical disk location. Alternatively, if the business data does not hit the first cache block in the first controller, a free third cache block is obtained again in the cache area of ​​the first controller, and the third cache block is used as the new first cache block. Then, the above steps are performed to determine the first cache block corresponding to the business data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller, and write the business data into the first cache block.

[0012] According to a data storage method for a multi-controller storage system provided by the present invention, if the first controller is a fault controller, the method further includes: After the first controller recovers, obtain the takeover controller corresponding to the first controller, and obtain the cache block management information corresponding to the first controller from the takeover controller of the first controller; The system requests a cache block based on the cache block management information of the first controller, obtains the fourth identifier corresponding to the requested cache block, and sends a second data acquisition request to a non-first controller in the multi-controller storage system; the second data acquisition request includes the fourth identifier. The system receives cached data from the cache block corresponding to its own fourth identifier returned by a non-first controller based on a second data acquisition request, performs XOR verification on the cached data, and writes the XOR-verified data into the cache block corresponding to the fourth identifier of the aforementioned first controller.

[0013] The present invention also provides a data storage device for a multi-controller storage system, comprising the following modules: The data acquisition module is used by the first controller to acquire business data sent from the business layer; The cache block determination module is used to determine the first cache block corresponding to the business data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller; The verification controller determination module is used to perform XOR verification on the service data and the original data in the first cache block to determine the verification data, and determine the second identifier corresponding to the second cache block and the number of the second controller receiving the verification data according to the first identifier, and write the service data into the first cache block. The sending module is used to send the verification data and the second identifier to the second controller; the second controller is used to perform XOR verification between the verification data and the data in the second cache block corresponding to the second identifier in its own cache area, and write the XOR verified data into the second cache block corresponding to the second identifier in its own cache area. The verification data is used to back up the business data. Each controller's cache area includes a first area and a second area. Both the first and second areas include at least one cache block. The cache block in the first area is used to store business data, and the cache block in the second area is used to store verification data. The memory occupied by the second area is less than that occupied by the first area.

[0014] The present invention also provides a controller, 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 implement the data storage method of any of the multi-controller storage systems described above.

[0015] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data storage method of any of the multi-controller storage systems described above.

[0016] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements a data storage method for any of the multi-controller storage systems described above.

[0017] The present invention provides a data storage method, apparatus, controller, and medium for a multi-controller storage system. The method involves a first controller acquiring service data from the service layer, determining a first cache block corresponding to the service data and a first identifier corresponding to the first cache block within the first controller's cache area, performing an XOR check between the service data and existing data in the first cache block to determine check data, determining a second identifier corresponding to a second cache block and the number of the second controller receiving the check data based on the first identifier, writing the service data into the first cache block, and then sending the check data and the second identifier to the second controller. The second controller then performs an XOR check between the check data and the data in the second cache block corresponding to the second identifier in its own cache area, and writes the XOR-checked data into the second cache block corresponding to the second identifier in its own cache area. This check data is used for backing up the service data. Each controller's cache area includes a first area and a second area, each including at least one cache block. The cache block in the first area stores service data, and the cache block in the second area stores check data. The memory occupied by the second area is less than that occupied by the first area. In this method, since the business data can be stored in the first area with a larger memory in the controller, and the verification data of the business data and the original data can be stored in the second area with a smaller memory in another controller for backup, it can be seen that the memory occupied by the backup data in each controller is small. This eliminates the need to configure more than twice the memory for each controller, thereby reducing data storage costs and saving hardware costs. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 This is one of the flowcharts illustrating the data storage method of the multi-controller storage system provided in this embodiment of the invention.

[0020] Figure 2 This is a schematic diagram showing the arrangement of data cache blocks and check cache blocks in memory in each controller cache provided in the embodiments of the present invention.

[0021] Figure 3 This is the second flowchart illustrating the data storage method of the multi-controller storage system provided in this embodiment of the invention.

[0022] Figure 4This is a schematic diagram illustrating the principle of a fixed image of cache block management information provided in an embodiment of the present invention.

[0023] Figure 5 This is the third flowchart illustrating the data storage method of the multi-controller storage system provided in this embodiment of the invention.

[0024] Figure 6 This is the fourth flowchart illustrating the data storage method of the multi-controller storage system provided in this embodiment of the invention.

[0025] Figure 7 This is a schematic diagram of the data storage device of the multi-controller storage system provided in an embodiment of the present invention.

[0026] Figure 8 This is a schematic diagram of the controller provided in an embodiment of the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0028] A multi-controller storage system is a data storage solution that uses multiple controllers to achieve centralized management and efficient access to storage resources. Compared to traditional single-controller storage systems, multi-controller storage systems offer higher performance, flexibility, and reliability. Multiple controllers can process storage requests in parallel, enabling higher data transfer rates and lower latency. Storage nodes can be added or removed as needed, making it easily scalable. Even if one controller fails, other controllers can take over its tasks to ensure continuous system operation, thereby improving data reliability and security.

[0029] Cache mirroring technology is a solution designed to address the potential loss of cached data when storage devices (such as multi-controller storage systems) fail. It primarily involves storing cached data on multiple controllers simultaneously, and automatically backing it up to other controllers during system operation. This technology is a commonly used cache protection technique in multi-controller storage systems, typically by establishing a cache mirror on each controller to ensure cache consistency across multiple controllers.

[0030] Currently, cache mirroring in multi-controller storage systems typically involves mirroring data from one or more other controllers (either as fixed mirror pairs or distributed mirroring) to ensure redundancy and data consistency. This method requires that cached data be backed up at least once on the caches of other controllers. This necessitates that the memory hardware configuration of the multi-controller system be at least twice the business requirements. For all-flash arrays, a large amount of memory is often required, frequently in the terabyte range, resulting in very high data storage costs. In other words, current mirrored storage methods consume a significant amount of memory, leading to high hardware costs. Therefore, this invention provides a data storage method, apparatus, controller, and medium for a multi-controller storage system, which can solve the aforementioned technical problems.

[0031] The following is combined Figures 1-6 This invention describes a data storage method for a multi-controller storage system according to an embodiment of the present invention.

[0032] First, let me explain a multi-controller storage system, which can include multiple controllers that can communicate with each other to transmit data or signaling.

[0033] Secondly, it should be noted that the execution subject of the embodiments of the present invention can be a multi-controller storage system, a data storage device of a multi-controller storage system, a controller in a multi-controller storage system, or other devices or equipment. No specific limitation is made here. The following embodiments will use the controller as the execution subject for illustration.

[0034] Figure 1 This is one of the flowcharts illustrating the data storage method of the multi-controller storage system provided by the present invention, such as... Figure 1 As shown, the method includes the following steps: Step 102: The first controller obtains the business data sent by the business layer.

[0035] In this step, the multi-controller storage system includes multiple controllers. When the service layer sends service data to one of the controllers in the multi-controller storage system, it can obtain the controller to which the service data needs to be sent in advance (for example, obtain the number of the controller to which it needs to be sent). This controller can be designated as the first controller. Then, the service data can be sent to the first controller, which can then receive the service data. Optionally, the service data may include the target logical disk location on the logical hard disk where the service data is stored.

[0036] Step 104: Determine the first cache block corresponding to the service data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller.

[0037] This step first describes the configuration of the multi-controller storage system. In this embodiment, the multi-controller storage system includes multiple controllers, each of which is configured with a corresponding cache area. The size of the cache area for each controller needs to be configured to be consistent / identical beforehand. Simultaneously, the cache area of ​​each controller is divided into cache blocks, with each controller having the same number of cache blocks and a uniform size for each cache block.

[0038] As an optional embodiment, each controller's cache area includes a first area and a second area. Both the first and second areas include at least one cache block. The cache block in the first area is used to store business data, and the cache block in the second area is used to store verification data. The second area occupies less memory than the first area. In other words, after dividing each controller's cache area into cache blocks, a portion of the cache blocks can be designated as the first area to store its own business data, while the other portion can be designated as the second area to store verification data for other controllers. This verification data is used to back up the business data of other controllers. Since the memory occupied by the verification data area in each controller's cache area is less than the memory occupied by the business data area, data storage costs can be saved while still backing up the controller's business data.

[0039] Based on the above configuration of the cache areas of each controller in the multi-controller system, the cache areas of each controller can be initialized uniformly before the multi-controller storage system is used. Specifically, the memory space corresponding to the cache area of ​​each controller can be cleared to 0. At the same time, each controller needs to be assigned a fixed number. For example, in a four-controller storage system, the four controllers are numbered 0, 1, 2, and 3 respectively. In an eight-controller storage system, the eight controllers are numbered from 0 to 7.

[0040] Additionally, as mentioned above, a portion of the cache blocks in each controller are used to store business data, while another portion is used to store verification data. During the initialization of each controller, it is necessary to determine, based on the controller number, which cache blocks store business data (referred to as data cache blocks) and which cache blocks store verification data (referred to as verification cache blocks). For specific determination, taking a four-controller storage system as an example, please refer to [link to relevant documentation]. Figure 2The diagram shows the arrangement of data cache blocks and parity cache blocks in memory for each controller. The numbers in the squares represent the identifiers of the cache blocks (such as the offset address of the cache block in memory). In a multi-controller storage system, for the same identifier of each controller, there is only one cache block that stores the parity data. For example, among the four cache blocks with the same identifier 1 in controllers 0 to 3, only cache block 1 of controller 3 stores the parity data, while the other three cache blocks with the same identifier 1 store business data. Taking controller 0 as an example, the regions corresponding to cache blocks identified as 1~3, 5~7, etc. can be recorded as the first region, and the regions corresponding to cache blocks identified as 4 and 8, etc., can be recorded as the second region. It can be seen that the memory occupied by the second region is much smaller than that occupied by the first region. Assuming that the memory required for data backup in related technologies is M, while the technical solution of this embodiment requires only M / N for data backup, where N is the total number of controllers, which is generally greater than 1, that is, M / N is less than M. Moreover, the larger the total number of controllers, the less memory M / N is required for data backup. That is, the technical solution of this embodiment can save a lot of memory when backing up data, which saves more hardware costs for data storage.

[0041] Alternatively, the attributes of the cache block (i.e., whether the cache block is a data cache block) can be determined based on the controller number and the cache block identifier. For example, it can be determined using the following formula 1: Formula 1: Verify cache block = ((cache block identifier + current controller number) % total number of controllers == 0).

[0042] Here, % represents the modulo operation, and the current controller number is the controller number where the currently computed cache block is located.

[0043] For example, see Figure 2 For each controller shown, assuming the current controller is controller number 0, and the cache block identifier is 3 (i.e., for cache block 3 in controller 0), and the total number of controllers is 4, we can calculate whether cache block 3 in controller 0 is a check block. (3+0)%4=3≠0, so it can be seen that cache block 3 in controller 0 is not a check block.

[0044] For example, suppose the current controller is controller number 1, and the cache block identifier is 3 (i.e., cache block 3 in controller 1). The total number of controllers is 4. We can calculate whether cache block 3 in controller 1 is a check block. (3+1)%4=0==0. Therefore, it can be seen that cache block 3 in controller 1 is a check block.

[0045] Specifically, after obtaining the business data, the first controller can retrieve a cache block containing the business data from its cache area based on the size of the business data. This retrieved cache block can be designated as the first cache block, and its corresponding identifier can be designated as the first identifier. The first cache block may be a newly requested cache block containing all zeros (i.e., no data is stored there), or it may be a cache block containing existing data, which can be designated as the original data.

[0046] Step 106: Perform an XOR check between the business data and the original data in the first cache block to determine the check data, and determine the second identifier corresponding to the second cache block and the number of the second controller receiving the check data according to the first identifier, and write the business data into the first cache block.

[0047] In this step, if the first cache block is a newly allocated cache block containing only 0s, then the business data does not need to be XORed with the existing data; it can be directly used as the verification data. If the first cache block includes existing data, then after obtaining the business data, it can first be XORed with the existing data in the first cache block to obtain the verification data. This XOR verification can be performed by converting both the business data and the existing data into binary data before performing the XOR verification.

[0048] After obtaining the verification data as described above, the controller to which the verification data needs to be sent can be determined. As an optional embodiment, the first identifier can be used as the second identifier corresponding to the second cache block; based on the second identifier and the total number of controllers included in the multi-controller storage system, the number of the second controller receiving the verification data is determined.

[0049] Specifically, the number of the second controller receiving the verification data can be determined according to the following formula 2: Formula 2: Verification cache block identifier = current cache block identifier, the controller number where the verification block is located = total number of controllers - (current cache block identifier % total number of controllers).

[0050] The current cache block identifier is the first identifier of the first cache block, the verification cache block identifier is the second identifier of the second cache block, and the controller number where the verification block is located is the number of the second controller.

[0051] For example, see Figure 2 Assuming the check block identifier is 3, the current check block identifier is 3. The total number of controllers is 4. The controller number where the check block is located is 4 - (3%4) = 4 - 3 = 1. This means that the controller number where the check block is located is 1, that is, check block 3 is in controller 1.

[0052] Formula 2 above allows for the quick and accurate calculation of the second controller number to be sent for the verification data, thereby improving the efficiency and accuracy of data storage. It can be understood that the aforementioned second cache block is the cache block where the verification data is stored.

[0053] In addition, after performing an XOR check between the business data and the original data in the first cache block, the business data can be stored in the first cache block of the first controller. This way, writing data after the XOR check can avoid the problem that writing data into the cache block first will overwrite the original data in the cache block and prevent the XOR check from being performed.

[0054] Step 108: Send the verification data and the second identifier to the second controller; The second controller is used to perform XOR verification between the verification data and the data in the second cache block corresponding to the second identifier in its own cache area, and write the XOR verified data into the second cache block corresponding to the second identifier in its own cache area. The verification data is used to back up the business data.

[0055] After obtaining the verification data and the second identifier of the cache block storing the verification data, the verification data and the second identifier can be directly packaged and sent to the second controller; or the second controller can be checked first to determine whether it is faulty. If the second controller is not faulty, the verification data and the second identifier can be packaged and sent to the second controller to improve the data transmission success rate.

[0056] After receiving the verification data sent by the first controller and the second identifier of the cache block storing the verification data, the second controller can find the cache block corresponding to the second identifier in the second area of ​​its own cache area. Then, it can perform an XOR verification between the verification data and the existing data in the found cache block, and store the XOR verified data in the found cache block, thereby realizing the backup storage of the business data of the first controller.

[0057] As described above, this embodiment ensures redundancy and data consistency in the multi-controller storage system by synchronizing the verification data corresponding to the business data of this controller in other controllers. Furthermore, since the verification data occupies less memory than the business data, memory usage is significantly reduced. Although this embodiment adds some computational overhead for verification, multi-controller storage systems like all-flash arrays inherently require significant hash operations and are typically equipped with GPUs (Graphics Processing Units). Therefore, utilizing the GPU for verification processing can compensate for performance loss and improve the usability of the technical solution in this embodiment.

[0058] In this embodiment, the first controller obtains the service data sent by the service layer, and determines the first cache block corresponding to the service data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller. Then, the service data and the original data in the first cache block are XORed to determine the verification data. The second identifier corresponding to the second cache block and the number of the second controller receiving the verification data are determined according to the first identifier. The service data is written into the first cache block. Then, the verification data and the second identifier are sent to the second controller, so that the second controller XORs the verification data with the data in the second cache block corresponding to the second identifier in its own cache area, and writes the XORed data into the second cache block corresponding to the second identifier in its own cache area. The verification data is used to back up the service data. Each controller's cache area includes a first area and a second area. Both areas include at least one cache block. The cache block in the first area is used to store service data, and the cache block in the second area is used to store verification data. The memory occupied by the second area is less than that occupied by the first area. In this method, since the business data can be stored in the first area with a larger memory in the controller, and the verification data of the business data and the original data can be stored in the second area with a smaller memory in another controller for backup, it can be seen that the memory occupied by the backup data in each controller is small. This eliminates the need to configure more than twice the memory for each controller, thereby reducing data storage costs and saving hardware costs.

[0059] To facilitate the management of the cache of each controller, this embodiment of the invention proposes a technical solution that allows setting management information and image management information for management. The following embodiments illustrate this technical solution.

[0060] Figure 3 This is a second schematic flowchart of the data storage method for the multi-controller storage system provided by the present invention, as shown below. Figure 3 As shown, the method also includes the following steps: Step 202: Obtain the cache block management information corresponding to the first controller in the first controller; the cache block management information of the first controller includes the correspondence between the cache blocks in the first controller and the logical disk location.

[0061] In this step, a cache block management information can be set for each controller. This cache block management information mainly records the correspondence between the cache blocks in the controller's cache area and the logical disk location, as well as whether data has been stored in each cache block. That is, the data stored / saved in each cache block belongs to which logical disk location. Here, the logical disk location can be the LUN resource location (Logical Unit Number) and its LBA (Logical Block Address) location.

[0062] Furthermore, to ensure read and write operations can continue even after a controller fails, redundant backups can be performed on the cache block management information for each controller. This means each controller stores its own cache block management information as well as a backup of the cache block management information of the controller it takes over. The controller that each controller takes over can be called the takeover controller, and the takeover controller can redundantly back up the cache block management information of that controller. One method for redundant backup of cache block management information is a fixed mirroring approach. Specifically, the cache block management information of each controller is mirrored to the next controller (specifically, to the cache block mirror memory of the next controller), and the cache block management information of the last controller is mirrored to the first controller, forming a loop. See [example provided]. Figure 4 The diagram shown illustrates the principle of fixed mirroring of cache block management information. Here, the local end represents the cache block management information stored by the controller itself, while the mirror end represents the cache block management information of the controller that preceded it, i.e., the mirror end cache block information.

[0063] It should be noted that the amount of data corresponding to the above cache block management information occupies a small amount of memory, so it will not affect the memory corresponding to the controller's cache area.

[0064] Based on the above description, the first controller can obtain its own cache block management information in its own memory.

[0065] Step 204: After writing the business data to the first cache block, update the cache block management information of the first controller according to the first identifier of the first cache block, and synchronize the updated cache block management information of the first controller to the corresponding takeover controller.

[0066] In this step, after the first controller writes the business data into the first cache block corresponding to its own first identifier, the first controller can update the cache block management information of the first controller that it saves. Specifically, it can add the identifier of the stored data to the first cache block in the cache block management information, and then synchronize the updated cache block management information to the mirror end, that is, to its takeover controller. This can ensure that the cache block management information of the first controller saved in the first controller and its takeover controller is consistent.

[0067] In this embodiment, after each controller updates its cache block management information, it can be synchronized to the takeover controller for redundant backup. This ensures that even if a controller fails, read and write services can still be processed normally based on the cache block management information in its takeover controller.

[0068] In the use of a multi-controller storage system, it is inevitable that one of the controllers will fail. If the third controller corresponding to the first controller fails, the first controller becomes the takeover controller corresponding to the third controller. For example, if controller 0 fails, then controller 1 becomes the takeover controller. In this case, how to perform read and write operations is explained in the following embodiments.

[0069] Figure 5 This is the third flowchart illustrating the data storage method of the multi-controller storage system provided by the present invention, as shown below. Figure 5 As shown, before determining the first cache block corresponding to the service data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller in step 104, the method further includes the following steps: Step 302: Obtain the target logical disk location where the business data is written, and determine whether the target logical disk location belongs to the resource location corresponding to the third controller.

[0070] In a multi-controller storage system, when one of the controllers fails, the failed controller becomes inaccessible. Therefore, the cached data in the cache area corresponding to the failed controller can be considered to be completely lost, and the resources belonging to the failed controller (i.e., the logical disk location for writing data corresponding to that controller) will be taken over by other controllers.

[0071] Specifically, if the controller that caused the aforementioned failure is the third controller, that is, if the third controller fails, its takeover controller (i.e. the first controller) can take over the resources corresponding to the third controller. As mentioned above, when the first controller receives business data, it can also obtain the target logical disk location corresponding to the business data to be written. Then, based on the preset resource location (i.e. logical disk location) that each controller can write data to, it can determine whether the target logical disk location belongs to the resource location corresponding to the third controller.

[0072] Optionally, if the resource location for which the third controller can write data includes the target logical disk location, it means that the target logical disk location belongs to the resource location corresponding to the third controller. Since the business data sent to each normal controller generally includes its own business data or the business data of the faulty controller it manages, when it is determined that the target logical disk location corresponding to the business data does not belong to the resource location corresponding to the third controller, it can be obtained that the business data received by the first controller is not the data of the faulty third controller, but the data of the first controller itself. Therefore, it can be determined that the target logical disk location corresponding to the business data belongs to the resource location corresponding to the first controller itself.

[0073] Optionally, if the target logical disk location does not belong to the resource location corresponding to the third controller (i.e., it belongs to the resource location corresponding to the first controller itself), then based on the cache block management information corresponding to itself stored in the first controller, it is determined whether the service data hits the cache block in the first controller; if the service data hits the first cache block in the first controller, then return to the above steps of determining the first cache block corresponding to the service data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller, and writing the service data into the first cache block.

[0074] In other words, when the target logical disk location belongs to the resource location corresponding to the first controller itself, the first controller can search in the correspondence between the cache block and the logical disk location in its own cache block management information to determine whether the target logical disk location exists. If it exists, it is determined that the business data hits the cache block in the first controller. Then, it can return to execute the above step 104 to determine the first cache block corresponding to the business data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller. That is, the cache block corresponding to the target logical disk location can be obtained in the correspondence, which is recorded as the first cache block, and the first identifier corresponding to the first cache block can be obtained at the same time.

[0075] Then, the number of the second controller sending the verification data can be determined using the first identifier. Next, it is determined whether the second controller is a faulty controller. Based on the determination result, it is decided whether to perform the above-mentioned XOR verification between the service data and the original data in the first cache block to determine the verification data. Specifically, the fault determination method can be to compare the number of the second controller with the number of the faulty controller (which is known after the fault). If they match, it indicates that the second controller is a faulty controller. In this case, the second controller cannot function normally and cannot receive verification data. Therefore, it is not necessary to perform the XOR verification between the service data and the original data in the first cache block to determine the verification data and send the verification data; the service data can be directly written into the first cache block of the first controller. However, if the number of the second controller does not match the number of the faulty controller, it indicates that the second controller is not a faulty controller and is functioning normally. In this case, the steps of XOR verification between the service data and the original data in the first cache block to determine the verification data and send the verification data can be performed normally to achieve backup of the service data.

[0076] When searching for the target logical disk location in the cache block management information of the first controller, if the target logical disk location is not found, it means that the business data has not hit the first cache block in the first controller. Optionally, if the business data has not hit the first cache block in the first controller, the business data is directly written to the resource corresponding to the target logical disk location and is not stored in the cache area. Alternatively, the cache area can continue to be used for data storage. If the business data misses the first cache block in the first controller, a free third cache block (i.e., a cache block without stored data, denoted as the third cache block) is re-acquired in the cache area of ​​the first controller, and the third cache block is used as the new first cache block. The steps described above, which determine the first cache block corresponding to the business data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller, and write the business data into the first cache block, are then executed. In other words, based on the identifier of the new first cache block and the total number of controllers, the identifier of the new second cache block and the number of the new second controller can be calculated using the formula 2 above. It is then determined whether the new second controller is a faulty controller. If it is a faulty controller, the business data can be directly written into the new first cache block. If the new second controller is not a faulty controller, the steps of performing an XOR check between the business data and the original data in the first cache block, determining the check data, and sending the check data can be performed normally to achieve backup of the business data.

[0077] The above describes the data writing process of the takeover controller for the faulty controller. For non-takeover controllers (for example, if controller 0 fails, then controller 1 is the takeover controller, and controllers 2 and 3 are non-takeover controllers), data is also written according to the data writing process of the takeover controller. That is, the target logical disk location does not belong to the resource location corresponding to the faulty controller, but to the resource location corresponding to the normal controller (i.e., the takeover controller and the non-takeover controller).

[0078] Step 304: If the target logical disk location belongs to the resource location corresponding to the third controller, then determine whether the business data hits the cache block in the third controller based on the cache block management information of the third controller backed up in the first controller.

[0079] In this step, if the resource location for which the third controller can write data includes the target logical disk location, it means that the target logical disk location belongs to the resource location corresponding to the third controller, i.e., it belongs to the resource location of the fault controller. At this time, the cache block management information of the backup / mirrorized third controller can be obtained from the first controller. Then, a search is performed in the correspondence between cache blocks and logical disk locations in the cache block management information to determine whether the target logical disk location exists. If it exists, it is determined that the business data hits the cache block in the third controller; otherwise, it means that the business data does not hit the cache block in the third controller. Here, the cache block can be a cache block in the first region or a cache block in the second region of the third controller's cache area.

[0080] Step 306: If the business data hits the cache block in the third controller, the business data and the third identifier corresponding to the hit cache block are sent to the target controller, and a first data acquisition request is sent to other controllers in the multi-controller storage system; wherein, the first data acquisition request includes the third identifier, which is used to instruct other controllers to send the cached data in the cache block corresponding to their own third identifier to the target controller. The target controller is used to perform XOR verification on the cached data and business data sent by other controllers, and write the XOR verified data into the cache block corresponding to the third identifier in its own cache area.

[0081] In this step, if the business data does not hit the cache block in the third controller, the business data is directly written to the resource corresponding to the target logical disk location and is not stored in the cache area.

[0082] If the service data hits a cache block in the third controller, the identifier of the hit cache block is obtained from the cache block management information of the third controller and recorded as the third identifier. Then, the number of the second controller receiving the verification data can be calculated using the third identifier as the new first identifier and Formula 2 above. Here, the second controller can be recorded as the target controller. Then, the service data and the third identifier can be packaged and sent to the target controller. At the same time, the first controller can also send a first data acquisition request to all other controllers except the first controller and the third controller. The first data acquisition request can carry the third identifier and the number of the target controller to instruct other controllers to send the cached data in the cache block corresponding to the third identifier in their own cache area to the target controller.

[0083] After receiving the packaged service data and third identifier sent by the first controller, as well as the cached data in the cache block corresponding to the third identifier sent by other controllers, the target controller can perform XOR verification on all the received data to obtain verification data, and then store the verification data in the cache block corresponding to its own third identifier.

[0084] In this embodiment, when the resource location corresponding to the business data belongs to the resource location of the faulty controller and the business data hits the cache block in the faulty controller, the business data can be sent to another normal controller for data storage. This ensures that business read and write operations can still be performed normally when the controller fails. Furthermore, when the resource location corresponding to the business data belongs to the resource location of the normal controller and the business data hits the cache block in the normal controller, business data writing and backup processing can be performed normally. This ensures that the failure of the normal controller does not affect the normal business read and write operations of the normal controller. Further, when the resource location corresponding to the business data belongs to the resource location of the normal controller but the business data does not hit the cache block in the normal controller, the business data can be directly written to the corresponding logical disk location to ensure normal business read and write operations, or a new cache can be requested to store the business data, thus improving data storage efficiency.

[0085] In actual business processing, a controller in a multi-controller storage system may be repaired after a failure, that is, the failed controller will return to normal. So how to restore the cached data in the failed controller after it returns to normal? The following embodiment takes the first controller as the failed controller as an example to illustrate the data recovery process after the failed controller returns to normal.

[0086] Figure 6 This is the fourth flowchart illustrating the data storage method of the multi-controller storage system provided by the present invention, as shown below. Figure 6 As shown, if the first controller is a faulty controller, the method further includes the following steps: Step 402: After the first controller returns to normal, obtain the takeover controller corresponding to the first controller, and obtain the cache block management information corresponding to the first controller from the takeover controller of the first controller.

[0087] As mentioned above, each controller can have a corresponding takeover controller, which can store the cache block management information of that controller. So, after the first controller recovers from the failure, the takeover controller corresponding to the first controller (i.e., the controller with the next number after the first controller) can be found in each controller according to the fixed mirror relationship between the cache block management information of each controller established above. Then, the first controller can send a request to the takeover controller to obtain the backed-up cache block management information corresponding to the first controller from the takeover controller.

[0088] Meanwhile, the first controller can also find the controller with the previous number corresponding to the first controller in each controller through the above fixed mirror relationship. That is, the first controller is the takeover controller of the controller with the previous number. Then, it can send a request to the controller with the previous number to obtain the cache block management information corresponding to the controller with the previous number, so as to restore the cache block management information of the controller with the previous number backed up in the first controller.

[0089] Step 404: Request a cache block according to the cache block management information of the first controller, obtain the fourth identifier corresponding to the requested cache block, and send a second data acquisition request to a non-first controller in the multi-controller storage system; the second data acquisition request includes the fourth identifier.

[0090] In this step, after the first controller obtains its own cache block management information from its takeover controller, it can request a cache block with the corresponding identifier based on the identifier of the cache block containing the stored data in the cache block management information. Here, the identifier of the requested cache block can be recorded as the fourth identifier. Then, a second data acquisition request can be sent to all other first controllers (i.e., non-first controllers) except the first controller. The second data acquisition request can carry the fourth identifier and the number of the first controller, which is used to instruct the non-first controllers to send the cached data in the cache block corresponding to the fourth identifier in their own cache area to the first controller.

[0091] Step 406: Receive cached data from the cache block corresponding to its own fourth identifier returned by the non-first controller based on the second data acquisition request, perform XOR verification on the cached data, and write the XOR verified data into the cache block corresponding to the fourth identifier of the aforementioned first controller.

[0092] In this step, after receiving cached data from other non-first controllers sent from the cache block corresponding to its own fourth identifier, the first controller can perform XOR verification on all the received data to obtain verification data, and then store the verification data in the cache block corresponding to its own fourth identifier.

[0093] Afterwards, the first controller can cycle through all the cache blocks containing stored data in its own cache block management information to restore the data until the cache blocks are traversed, and finally restore the cached data in the cache area of ​​the first controller.

[0094] In this embodiment, after the fault controller recovers to normal, the cache block can be re-requested through the cache block management information of the first controller backed up in the controller that takes over, and the cache data of the fault controller can be restored by combining the cache data backed up in other controllers. Thus, the cache data of the fault controller can be restored quickly and accurately after the fault controller recovers to normal.

[0095] The data storage device of the multi-controller storage system provided by the present invention is described below. The data storage device of the multi-controller storage system described below can be referred to in correspondence with the data storage method of the multi-controller storage system described above.

[0096] Figure 7 This is a schematic diagram of the data storage device of the multi-controller storage system provided in an embodiment of the present invention. See also: Figure 7 As shown, the device may include: Data acquisition module 510 is used by the first controller to acquire business data sent by the business layer; The cache block determination module 520 is used to determine the first cache block corresponding to the business data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller; The verification controller determination module 530 is used to perform XOR verification on the service data and the original data in the first cache block, determine the verification data, determine the second identifier corresponding to the second cache block and the number of the second controller receiving the verification data according to the first identifier, and write the service data into the first cache block. The sending module 540 is used to send the verification data and the second identifier to the second controller; the second controller is used to perform XOR verification between the verification data and the data in the second cache block corresponding to the second identifier in its own cache area, and write the XOR verified data into the second cache block corresponding to the second identifier in its own cache area. The verification data is used to back up the business data. Each controller's cache area includes a first area and a second area. Both the first and second areas include at least one cache block. The cache block in the first area is used to store business data, and the cache block in the second area is used to store verification data. The memory occupied by the second area is less than that occupied by the first area.

[0097] In some embodiments, the above-described verification controller determination module 530 is specifically used to use the first identifier as the second identifier corresponding to the second cache block; and to determine the number of the second controller receiving the verification data based on the second identifier and the total number of controllers included in the multi-controller storage system.

[0098] In some embodiments, the above apparatus further includes: a cache block determination module 520. The management information update module is used to obtain the cache block management information corresponding to the first controller in the first controller; the cache block management information of the first controller includes the correspondence between the cache blocks in the first controller and the logical disk location; after writing business data to the first cache block, the cache block management information of the first controller is updated according to the first identifier of the first cache block, and the updated cache block management information of the first controller is synchronized to the takeover controller corresponding to the first controller; wherein, each controller saves its own cache block management information and backs up the cache block management information corresponding to the controller it takes over.

[0099] In some embodiments, if the third controller corresponding to the first controller fails, the first controller is a takeover controller corresponding to the third controller. Before the cache block determination module 520 determines the first cache block corresponding to the service data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller, the device further includes: The resource location determination module is used to obtain the target logical disk location where the business data is written, and to determine whether the target logical disk location belongs to the resource location corresponding to the third controller. The data hit determination module is used to determine whether the business data hits the cache block in the third controller if the target logical disk location belongs to the resource location corresponding to the third controller, based on the cache block management information of the third controller backed up in the first controller. The execution module is configured to send the business data and the third identifier corresponding to the cache block to the target controller if the business data hits the cache block in the third controller, and to send a first data acquisition request to other controllers in the multi-controller storage system; wherein the first data acquisition request includes a third identifier, which is used to instruct other controllers to send the cached data in the cache block corresponding to their own third identifier to the target controller, and the target controller is configured to perform XOR verification on the cached data and business data sent by other controllers, and write the XOR verified data into the cache block corresponding to the third identifier in its own cache area.

[0100] Optionally, the aforementioned data hit determination module is further configured to, if the target logical disk location does not belong to the resource location corresponding to the third controller, determine whether the business data hits the cache block in the first controller based on the cache block management information stored in the first controller; if the business data hits the first cache block in the first controller, return to the above steps of determining the first cache block corresponding to the business data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller, and writing the business data into the first cache block; determine whether the second controller is a faulty controller, and determine whether to perform the above steps of XOR verification between the business data and the original data in the first cache block to determine the verification data based on the judgment result.

[0101] Optionally, the execution module is further configured to: if the business data does not hit the first cache block in the first controller, directly write the business data to the resource corresponding to the target logical disk location; or, if the business data does not hit the first cache block in the first controller, re-acquire a free third cache block in the cache area of ​​the first controller, use the third cache block as the new first cache block, and return to execute the steps described above of determining the first cache block corresponding to the business data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller, and writing the business data into the first cache block.

[0102] In some embodiments, if the first controller is a fault controller, the above-described apparatus further includes: The data recovery module is used to, after the first controller recovers to normal, obtain the takeover controller corresponding to the first controller, and obtain the cache block management information corresponding to the first controller from the takeover controller of the first controller; apply for a cache block according to the cache block management information of the first controller, obtain the fourth identifier corresponding to the applied cache block, and send a second data acquisition request to the non-first controller in the multi-controller storage system; the second data acquisition request includes the fourth identifier; receive the cached data in the cache block corresponding to its own fourth identifier returned by the non-first controller based on the second data acquisition request, perform XOR verification on the cached data, and write the XOR verified data into the cache block corresponding to the fourth identifier of the first controller.

[0103] It should be noted that the apparatus provided in this embodiment of the invention can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.

[0104] Figure 8 An example of a schematic diagram of the physical structure of a controller is shown, such as... Figure 8 As shown, the controller may include a processor 610, a communications interface 620, a memory 630, and a communications bus 640, wherein the processor 610, the communications interface 620, and the memory 630 communicate with each other through the communications bus 640. The processor 610 can call logical instructions in the memory 630 to execute a data storage method of a multi-controller storage system. This method includes: a first controller acquiring service data sent from the service layer; determining a first cache block corresponding to the service data and a first identifier corresponding to the first cache block in the cache area of ​​the first controller; performing an XOR check between the service data and existing data in the first cache block to determine check data; determining a second identifier corresponding to a second cache block and the number of the second controller receiving the check data based on the first identifier; and writing the service data into the first cache block; sending the check data and the second identifier to the second controller; the second controller performs an XOR check between the check data and the data in the second cache block corresponding to the second identifier in its own cache area, and writes the XOR-checked data into the second cache block corresponding to the second identifier in its own cache area. The check data is used to back up the service data. Each controller's cache area includes a first area and a second area, each including at least one cache block. The cache block in the first area stores service data, and the cache block in the second area stores check data. The memory occupied by the second area is less than that occupied by the first area.

[0105] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0106] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the data storage method of the multi-controller storage system provided by the above methods. The method includes: a first controller acquiring service data sent by the service layer; determining a first cache block corresponding to the service data and a first identifier corresponding to the first cache block in the cache area of ​​the first controller; performing an XOR check between the service data and the original data in the first cache block to determine check data; and determining a second identifier corresponding to a second cache block and a second controller receiving the check data based on the first identifier. The system assigns a number and writes business data into a first cache block; it sends verification data and a second identifier to a second controller; the second controller performs an XOR check on the verification data and the data in the second cache block corresponding to the second identifier in its own cache area, and writes the XOR-checked data into the second cache block corresponding to the second identifier in its own cache area. The verification data is used to back up the business data; wherein, each controller's cache area includes a first area and a second area, and each of the first and second areas includes at least one cache block. The cache block in the first area is used to store business data, and the cache block in the second area is used to store verification data, and the memory occupied by the second area is less than that occupied by the first area.

[0107] In another aspect, the present invention also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a data storage method for a multi-controller storage system provided by the above methods. The method includes: a first controller acquiring service data sent from the service layer; determining a first cache block corresponding to the service data and a first identifier corresponding to the first cache block in the cache area of ​​the first controller; performing an XOR check between the service data and existing data in the first cache block to determine check data; determining a second identifier corresponding to a second cache block and the number of the second controller receiving the check data based on the first identifier; and writing the service data into the first cache block; and sending the check data and the second identifier to the second controller. The second controller is used to perform an XOR check between the check data and the data in the second cache block corresponding to the second identifier in its own cache area, and write the XOR-checked data into the second cache block corresponding to the second identifier in its own cache area. The check data is used to back up the service data. Each controller's cache area includes a first area and a second area. Both the first and second areas include at least one cache block. The cache block in the first area is used to store service data, and the cache block in the second area is used to store check data. The memory occupied by the second area is less than that occupied by the first area.

[0108] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0109] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data storage method for a multi-controller storage system, characterized in that, include: The first controller obtains business data sent by the business layer; In the cache area of ​​the first controller, a first cache block corresponding to the service data and a first identifier corresponding to the first cache block are determined; The service data is XORed with the original data in the first cache block to determine the verification data. The second identifier corresponding to the second cache block and the number of the second controller receiving the verification data are determined according to the first identifier. The service data is then written into the first cache block. The verification data and the second identifier are sent to the second controller; the second controller is used to perform an XOR verification between the verification data and the data in the second cache block corresponding to the second identifier in its own cache area, and write the XOR verified data into the second cache block corresponding to the second identifier in its own cache area, and the verification data is used to back up the business data; Each controller's cache area includes a first area and a second area. Both the first area and the second area include at least one cache block. The cache block in the first area is used to store business data, and the cache block in the second area is used to store verification data. The memory occupied by the second area is less than that occupied by the first area.

2. The data storage method of the multi-controller storage system according to claim 1, characterized in that, The step of determining the second identifier corresponding to the second cache block and the number of the second controller receiving the verification data based on the first identifier includes: Use the first identifier as the second identifier corresponding to the second cache block; The number of the second controller receiving the verification data is determined based on the second identifier and the total number of controllers included in the multi-controller storage system.

3. The data storage method of the multi-controller storage system according to claim 1, characterized in that, The method further includes: The cache block management information corresponding to the first controller is obtained from the first controller; the cache block management information of the first controller includes the correspondence between the cache blocks in the first controller and the logical disk location; After the business data is written to the first cache block, the cache block management information of the first controller is updated according to the first identifier of the first cache block, and the updated cache block management information of the first controller is synchronized to the takeover controller corresponding to the first controller. Each controller stores its own cache block management information and backs up the cache block management information of the controllers it manages.

4. The data storage method of the multi-controller storage system according to claim 3, characterized in that, If the third controller corresponding to the first controller fails, and the first controller becomes the takeover controller corresponding to the third controller, the method further includes the following steps before determining the first cache block corresponding to the service data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller: Obtain the target logical disk location corresponding to the business data being written, and determine whether the target logical disk location belongs to the resource location corresponding to the third controller; If the target logical disk location belongs to the resource location corresponding to the third controller, then based on the cache block management information of the third controller backed up in the first controller, it is determined whether the service data hits the cache block in the third controller; If the service data hits a cache block in the third controller, the service data and the third identifier corresponding to the hit cache block are sent to the target controller, and a first data acquisition request is sent to other controllers in the multi-controller storage system. The first data acquisition request includes the third identifier, which is used to instruct the other controllers to send the cached data in their own cache blocks corresponding to the third identifier to the target controller. The target controller performs an XOR check on the cached data sent by the other controllers and the service data, and writes the XOR-checked data into the cache block corresponding to the third identifier in its own cache area.

5. The data storage method of the multi-controller storage system according to claim 4, characterized in that, The method further includes: If the target logical disk location does not belong to the resource location corresponding to the third controller, then the service data is determined to hit the cache block in the first controller based on the cache block management information corresponding to itself stored in the first controller. If the service data matches the first cache block in the first controller, then return to the step of determining the first cache block corresponding to the service data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller, and writing the service data into the first cache block; Determine whether the second controller is a faulty controller, and based on the determination result, determine whether to perform the step of XOR verification between the service data and the original data in the first cache block to determine the verification data.

6. The data storage method of the multi-controller storage system according to claim 5, characterized in that, The method further includes: If the service data does not hit the first cache block in the first controller, the service data is directly written to the resource corresponding to the target logical disk location; Alternatively, if the service data does not hit the first cache block in the first controller, a free third cache block is obtained again in the cache area of ​​the first controller, and the third cache block is used as the new first cache block. Then, the process returns to the step of determining the first cache block corresponding to the service data and the first identifier corresponding to the first cache block in the cache area of ​​the first controller, and writing the service data into the first cache block.

7. The data storage method of the multi-controller storage system according to claim 1, characterized in that, If the first controller is a faulty controller, the method further includes: After the first controller returns to normal, obtain the takeover controller corresponding to the first controller, and obtain the cache block management information corresponding to the first controller from the takeover controller of the first controller; The system requests a cache block based on the cache block management information of the first controller, obtains the fourth identifier corresponding to the requested cache block, and sends a second data acquisition request to a non-first controller in the multi-controller storage system; the second data acquisition request includes the fourth identifier. The system receives cached data from the cache block corresponding to its own fourth identifier returned by the non-first controller based on the second data acquisition request, performs XOR verification on the cached data, and writes the XOR verified data into the cache block corresponding to the fourth identifier of the first controller.

8. A data storage device for a multi-controller storage system, characterized in that, include: The data acquisition module is used by the first controller to acquire business data sent from the business layer; A cache block determination module is used to determine, within the cache area of ​​the first controller, a first cache block corresponding to the service data and a first identifier corresponding to the first cache block; The verification controller determination module is used to perform an XOR verification between the service data and the original data in the first cache block to determine the verification data, and to determine the second identifier corresponding to the second cache block and the number of the second controller receiving the verification data according to the first identifier, and to write the service data into the first cache block. The sending module is used to send the verification data and the second identifier to the second controller; the second controller is used to perform an XOR verification between the verification data and the data in the second cache block corresponding to the second identifier in its own cache area, and write the XOR verified data into the second cache block corresponding to the second identifier in its own cache area, and the verification data is used to back up the business data; Each controller's cache area includes a first area and a second area. Both the first area and the second area include at least one cache block. The cache block in the first area is used to store business data, and the cache block in the second area is used to store verification data. The memory occupied by the second area is less than that occupied by the first area.

9. A controller comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the data storage method of the multi-controller storage system as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the data storage method of the multi-controller storage system as described in any one of claims 1 to 7.