Data storage method and device, equipment and medium

By detecting controller failures and performing data mirroring reconfiguration in a multi-controller storage system, the problem of business balance and data availability in a multi-controller storage system is solved, and efficient data access and business distribution under fault conditions are achieved.

CN119356952APending Publication Date: 2025-01-24INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411376172.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In a multi-controller storage system, how to achieve balanced allocation of each controller's services, make full use of the performance of each controller, and ensure that the host can accurately interact with each controller, especially how to maintain data in the event of a controller failure usability.

Method used

By detecting controller faults in a multi-controller storage system, determine the mirror location of stored data, perform a re-mirror operation, store data backup in other controller nodes, and update the data ownership information of the host to ensure that access requests can be Distributed to available controller nodes.

Benefits of technology

The data availability and business balanced distribution when the controller fails, ensure that the host can accurately access the storage data, and improve the work efficiency and user experience of the controller cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356952A_ABST
    Figure CN119356952A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data storage method and device, equipment and a medium, and relates to the field of data storage. The method comprises the steps that when it is detected that a first controller node in the multi-controller storage system breaks down, a second controller node storing a first mirror image of first data in the first controller node is determined, and the first mirror image is re-mirrored to a third controller node of the multi-controller storage system, and sending the information that the first data belong to the second controller node and the third controller node to the host, so that the host distributes an access request for the first data to the second controller node or the third controller node. When the controller nodes fail, the controller nodes are adjusted in real time and notified to the host, and the host can accurately access the controller nodes storing the required data, so that the working efficiency of the controller cluster is improved, and the use requirements of users are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data storage, and in particular to a data storage method, device, equipment and medium. Background Art

[0002] In a SAN storage network, in a storage system multi-controller scenario, storage-side volumes generally have owned volumes. Volumes are automatically allocated to different controllers to ensure load balancing of volumes mapped to front-end host volumes. This is the Alua method, which is a method to balance the load of the back-end storage SAN network from another aspect.

[0003] In addition, volumes generally use dual controllers as read-write IO groups (IOgroups), and the volume cache is placed on two controllers. Under multiple controllers, once two controllers in an IO group fail, the volume will be offline and the IO service will be interrupted.

[0004] Another solution is multi-controller cache mirroring of volumes, but it can only ensure that the front-end volume load is balanced when all multi-controller nodes are normal. After a node failure (when 4 nodes fail and 1 node fails), the volume is not absolutely balanced between the controller nodes, and the business IO traffic load processing ratio is roughly 2:1:1. The read and write requests sent by users to the storage through the front-end multi-path software host cannot be absolutely guaranteed to be sent to the appropriate controller, and the business is balanced between the controllers. Make full use of the bandwidth of multiple links to improve the overall throughput of the system.

[0005] Therefore, how to balance the services of each controller in a multi-controller storage system, fully utilize the performance of each controller, and enable the host to accurately interact with each controller needs to be solved urgently. Summary of the invention

[0006] Based on the above technical problems, the embodiments of the present application provide a data storage method, apparatus, device and medium, aiming at how to evenly distribute the controllers of a multi-controller storage system and interact with the host.

[0007] A first aspect of an embodiment of the present application provides a data storage method, which is applied to a multi-controller storage system, and the method includes:

[0008] Applicable to multi-controller storage systems, including:

[0009] When a first controller node in a multi-controller storage system is detected to have failed, determining a second controller node in the multi-controller storage system that stores a first mirror of first data in the first controller node;

[0010] re-image the first image in the second controller node to a third controller node of the multi-controller storage system;

[0011] Information that the first data belongs to the second controller node and the third controller node is sent to a host, so that the host distributes access requests for the first data to the second controller node or the third controller node.

[0012] Optionally, the method further comprises:

[0013] When it is detected that the first controller node has recovered to normal, re-image the first image in the second controller node to the first controller node;

[0014] Information that the first data belongs to the first controller node and the second controller node is sent to a host, so that the host distributes access requests for the first data to the first controller node or the second controller node.

[0015] Optionally, when a failure of a first controller node in a multi-controller storage system is detected, the method further includes:

[0016] Determine, from the multi-controller storage system, a fourth controller node storing a second mirror of the second data in the first controller node;

[0017] re-imaging the second image in the fourth controller node to the second controller node of the multi-controller storage system;

[0018] Information that the second data belongs to the second controller node and the fourth controller node is sent to a host, so that the host distributes access requests for the second data to the second controller node or the fourth controller node.

[0019] Optionally, when it is detected that the first controller node recovers to normal, re-imaging the first image in the second controller node to the first controller node includes:

[0020] During the process of re-imaging the first image in the second controller node to the first controller node, retaining the first image in the third controller node, so that when the host detects that the second controller node fails, the host distributes the access request for the first data to the third controller node;

[0021] After determining that all of the first images in the second controller node are reimaged to the first controller node, the first image in the third controller node is deleted.

[0022] Optionally, after detecting that a first controller node in the multi-controller storage system fails, the method further includes:

[0023] When it is detected that the first controller node recovers to normal, re-image the first image in the second controller node to the first controller node, and re-image the second image in the fourth controller node to the first controller node;

[0024] Deleting the second image in the second controller node, and deleting the first image in the third controller node;

[0025] The information that the first data belongs to the first controller node and the second controller node is sent to the host, so that the host distributes the access request for the first data to the first controller node or the second controller node, and the information that the second data belongs to the first controller node and the fourth controller node is sent to the host, so that the host distributes the access request for the second data to the first controller node or the fourth controller node.

[0026] Optionally, re-imaging the first image in the second controller node to a third controller node of the multi-controller storage system includes:

[0027] The second controller node applies for a lock for the first image;

[0028] The second controller node sends an insert request to the third controller node;

[0029] The third controller node migrates the first mirror in the second controller node to the cache of the third controller node;

[0030] The third controller node sends an insert response to the second controller node;

[0031] After receiving the insert response, the second controller node releases the lock on the first image.

[0032] Optionally, the method further comprises:

[0033] The first controller node receives and stores first data belonging to the first controller node distributed by the host, and the second controller node receives and stores second data belonging to the second controller node distributed by the host; the first data and the second data are obtained by the host dividing the data to be stored into segments;

[0034] storing a first image obtained by mirroring the first data to the second controller node, and storing a second image obtained by mirroring the second data to the third controller node;

[0035] The information that the first data belongs to the first controller node and the second controller node is sent to the host so that the host distributes the access request for the first data to the first controller node or the second controller node, and the information that the second data belongs to the second controller node and the third controller node is sent to the host so that the host distributes the access request for the second data to the second controller node or the third controller node.

[0036] A second aspect of an embodiment of the present application provides a data storage device, the device comprising:

[0037] a fault detection module, configured to, when detecting that a first controller node in a multi-controller storage system fails, determine a second controller node in the multi-controller storage system that stores a first mirror of first data in the first controller node;

[0038] a re-imaging module, used for re-imaging the first image in the second controller node to a third controller node of the multi-controller storage system;

[0039] The belonging information sending module is used to send information that the first data belongs to the second controller node and the third controller node to the host, so that the host distributes the access request for the first data to the second controller node or the third controller node.

[0040] Optionally, the data storage device further includes:

[0041] A re-imaging module, configured to re-image the first image in the second controller node to the first controller node when detecting that the first controller node has returned to normal;

[0042] The belonging information sending module is used to send information that the first data belongs to the first controller node and the second controller node to the host, so that the host distributes the access request for the first data to the first controller node or the second controller node.

[0043] Optionally, the fault detection module includes:

[0044] An image determination submodule, configured to determine, from the multi-controller storage system, a fourth controller node storing a second image of second data in the first controller node;

[0045] a re-imaging submodule, used for re-imaging the second image in the fourth controller node to the second controller node of the multi-controller storage system;

[0046] The belonging information sending submodule is used to send information that the second data belongs to the second controller node and the fourth controller node to the host, so that the host distributes the access request for the second data to the second controller node or the fourth controller node.

[0047] Optionally, the re-imaging module further includes:

[0048] an image reservation submodule, configured to reserve the first image in the third controller node during the period of re-imaging the first image in the second controller node to the first controller node, so that the host can distribute the access request for the first data to the third controller node when detecting that the second controller node fails;

[0049] The image deletion submodule is used to delete the first image in the third controller node after determining that the first image in the second controller node is completely reimaged to the first controller node.

[0050] Optionally, the fault detection module includes:

[0051] a re-imaging submodule, configured to re-image the first image in the second controller node to the first controller node, and re-image the second image in the fourth controller node to the first controller node when detecting that the first controller node has recovered to normal;

[0052] An image deletion submodule, used for deleting the second image in the second controller node, and deleting the first image in the third controller node;

[0053] The attribution information sending submodule is used to send information that the first data belongs to the first controller node and the second controller node to the host, so that the host distributes access requests for the first data to the first controller node or the second controller node, and to send information that the second data belongs to the first controller node and the fourth controller node to the host, so that the host distributes access requests for the second data to the first controller node or the fourth controller node.

[0054] Optionally, the re-imaging module further includes:

[0055] A locking submodule, used for the second controller node to apply for a lock for the first image;

[0056] An insertion request submodule, configured for the second controller node to send an insertion request to the third controller node;

[0057] A migration submodule, used for the third controller node to migrate the first mirror in the second controller node to the cache of the third controller node;

[0058] An insert response submodule, configured for the third controller node to send an insert response to the second controller node;

[0059] The unlocking submodule is used for the second controller node to release the lock for the first image after receiving the insertion response.

[0060] Optionally, the data storage device further includes:

[0061] A data partitioning submodule, configured for the first controller node to receive and store first data belonging to the first controller node and distributed by the host, and for the second controller node to receive and store second data belonging to the second controller node and distributed by the host; the first data and the second data are obtained by the host dividing the data to be stored according to segments;

[0062] a data storage submodule, configured to store a first image obtained by mirroring the first data to the second controller node, and to store a second image obtained by mirroring the second data to the third controller node;

[0063] The attribution information sending submodule is used to send information that the first data belongs to the first controller node and the second controller node, so that the host distributes access requests for the first data to the first controller node or the second controller node, and to send information that the second data belongs to the second controller node and the third controller node to the host, so that the host distributes access requests for the second data to the second controller node or the third controller node.

[0064] A third aspect of an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the data storage method of the first aspect of the embodiment of the present application is implemented.

[0065] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the data storage method of the first aspect of the embodiment of the present application is implemented.

[0066] The data storage method of the embodiment of the present application is applied to a multi-controller storage system. When a failure of a first controller node in the multi-controller storage system is detected, a second controller node storing a first mirror of first data in the first controller node is determined from the multi-controller storage system; the first mirror in the second controller node is re-mirrored to a third controller node of the multi-controller storage system; and information that the first data belongs to the second controller node and the third controller node is sent to a host, so that the host distributes access requests for the first data to the second controller node or the third controller node.

[0067] In this embodiment, by evenly distributing the storage content in the controller cluster, and using at least two controller nodes for backup storage of each storage data, it is ensured that the storage data allocated by the host can be evenly stored in each controller node in the controller cluster, and by using the self-developed multipath software proposed in this application, it is ensured that the host accurately accesses the corresponding controller node storing the required data, and by re-mirroring the backup storage content of a certain controller node when a certain controller node fails, the stored data will not be lost even if the controller is hot restarted or crashes, and the data distribution method of the controller nodes in the controller cluster can be adjusted to maintain the balance of the stored data. In this way, not only can the storage business of each controller in the multi-controller storage system be balanced, and the performance of each controller can be fully utilized, and when a controller node fails, a secondary adjustment for the purpose of storage balance can be achieved, and the host can accurately access the controller node storing the required data, which greatly improves the work efficiency of the controller cluster, meets the user's usage requirements, and improves the user's usage experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0069] Figure 1 is a flow chart of a data storage method proposed in one embodiment of the present application;

[0070] Figure 2 is a schematic diagram of data storage provided by an embodiment of the present application;

[0071] Figure 3 is a schematic diagram of a re-imaging process provided by an embodiment of the present application;

[0072] Figure 4 is a structural block diagram of a data storage device provided by an embodiment of the present application;

[0073] Figure 5 It is a schematic diagram of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0074] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0075] In the drawings, the size of the constituent elements, the thickness of the layer or the area may be exaggerated for the sake of clarity. Therefore, any implementation of the present application is not necessarily limited to the size shown in the drawings, and the shape and size of the components in the drawings do not reflect the true proportion. In addition, the drawings schematically show ideal examples, and any implementation of the present application is not limited to the shape or value shown in the drawings.

[0076] Please refer to Figure 1 , Figure 1 This is a flow chart of a data storage method of the present application. Figure 1 As shown, the method may include steps S101 to S103:

[0077] Step S101: when a first controller node in a multi-controller storage system is detected to have failed, determining a second controller node storing a first mirror of first data in the first controller node from the multi-controller storage system;

[0078] Step S102: re-image the first image in the second controller node to a third controller node of the multi-controller storage system;

[0079] Step S103: Send information that the first data belongs to the second controller node and the third controller node to the host, so that the host distributes access requests for the first data to the second controller node or the third controller node.

[0080] In the prior art, a multi-controller storage system generally includes multiple controllers and multiple volumes, but usually these volumes used to store data are belonging volumes, that is, they are controlled by a certain controller alone, and read and write operations are performed on the controller; another method is to use volume multi-controller cache mirroring, which can be composed of multiple controllers to form a controller cluster, and the controller cluster as a whole provides read and write IO data input and output to the outside. In the controller cluster, the storage space of each controller is added to the pool, and logical volumes of different areas are divided according to capacity or business, and mapped to the upper host. However, in the prior art, the storage method of volume multi-controller cache mirroring can only maintain load balancing of each node when all controller nodes are in normal operation. Once a node fails, its business will be transferred to a normal controller for processing, resulting in an imbalance of system controllers, and the processing efficiency of multiple controllers cannot be fully utilized.

[0081] Therefore, the present application proposes a data storage method, that is, in a multi-controller storage system, the stored data are backed up and stored in at least two controller nodes, the working status of each controller is detected in real time, and once a controller node is found to be faulty, another normal controller node that backs up the stored data is determined, and the data therein is backed up again on other controllers by re-imaging to ensure that the stored data are backed up and stored in at least two controller nodes. After the re-imaging is completed, the new ownership information of the storage data involved is reported to the host to ensure that the host can correctly access the storage space corresponding to the data. This not only ensures that the stored data has backup storage in at least two controllers, but also can evenly distribute the storage resources of the controllers to avoid the situation where one storage device processes too much data while other controllers are idle.

[0082] Step S101: when a failure of a first controller node in a multi-controller storage system is detected, a second controller node storing a first mirror of first data in the first controller node is determined from the multi-controller storage system.

[0083] In the embodiment of the present application, the multi-controller storage system includes multiple controllers, each controller evenly distributes the content stored in the volume, and at least two controllers have backup storage data. Therefore, when a failure of the first controller node in the multi-controller storage system is detected, the first data stored in the first controller node is first determined, and after the content of the first data is determined, the location where the first mirror of the first data is stored is determined, that is, the second controller node.

[0084] Step S102: re-image the first image in the second controller node to a third controller node of the multi-controller storage system.

[0085] In the embodiment of the present application, since the stored data needs to be backed up and stored in at least two controllers, after determining the second controller node storing the first mirror of the first data, since the other controller node storing the first data, i.e., the first controller node, has failed, it is necessary to back up and store this part of the stored data again to prevent the second controller from failing before the first controller is repaired, resulting in data loss. Therefore, it is necessary to perform a re-imaging operation in the controller cluster to back up and store the first mirror of the first data in another controller node, i.e., the third controller node.

[0086] Step S103: Send information that the first data belongs to the second controller node and the third controller node to the host, so that the host distributes access requests for the first data to the second controller node or the third controller node.

[0087] In the embodiment of the present application, before the controller node fails, the first data is backed up and stored in the first controller node and the second controller node at the same time, and the storage information is also saved in the host. When the host needs to call the content in the first data, it will send a request to the controller cluster to call the first data stored in the first controller node or the second controller node. However, in the case of failure of the first controller node, if the host needs to call the first data, according to the request sent under normal circumstances, it is no longer possible to access the first controller node that has failed. Therefore, after completing the backup of the first data again in the above step S102, it is necessary to inform the host of the latest storage status of the first data in the controller cluster, that is, the first data is now stored in the second controller node and the third controller node. When the host needs to use the data stored in the first data later, it will send an access request to the controller cluster for the second controller node or the third controller node.

[0088] In combination with the above embodiments, in one implementation, the present application further provides a data storage method, which is applied to a multi-controller storage system. The method includes the following contents:

[0089] Firstly, when it is detected that the first controller node recovers to normal, the first image in the second controller node is re-imaged to the first controller node.

[0090] In an embodiment of the present application, after a failed or faulty controller node in a controller cluster resumes normal working status, it still needs to undertake corresponding work tasks. Therefore, as mentioned above, after the fault of the first controller node with the failure problem is repaired, the original first data should be restored and stored in the first controller node. Therefore, it is necessary to perform a re-image operation on the first image of the first data in the second controller node, and restore the re-imaged first data to the first controller node.

[0091] Then, information that the first data belongs to the first controller node and the second controller node is sent to the host, so that the host distributes access requests for the first data to the first controller node or the second controller node.

[0092] After restoring the first data to the recovered first controller node, the host still needs to be informed, that is, in the controller cluster, the storage location of the first data has been restored to the first controller node and the second controller node. When the host needs to call the first data, it needs to send an access request for the first controller node or the second controller node to the controller cluster.

[0093] In combination with the above embodiments, in one implementation, the present application further provides a data storage method. In the method, in the above step S101, when a failure of a first controller node in a multi-controller storage system is detected, the method further includes the following contents:

[0094] First, a fourth controller node storing a second mirror of the second data in the first controller node is determined from the multi-controller storage system.

[0095] In the embodiment of the present application, the controller nodes in the controller cluster store multiple data of different volumes, so when a controller node in the controller cluster fails, the stored data contained therein will be lost. In the above content, the present application introduces a processing method for a certain piece of data, that is, the first image of the first data is re-imaged from the second controller node to the third controller node. However, since the data stored in the first controller node is not only the first data, it is also necessary to discuss the processing of other data.

[0096] Here, the second data is taken as an example. Under normal circumstances, the second data is backed up and stored in the first controller node and the fourth controller node at the same time. When the first controller node fails, it is necessary to first confirm the fourth controller node storing the second data.

[0097] Then, the second image in the fourth controller node is re-imaged to the second controller node of the multi-controller storage system.

[0098] In an embodiment of the present application, since the first controller node has failed, the second data is only stored in the fourth controller node, and therefore it is necessary to re-image the second image of the second data in the fourth controller node. In the content described above, the first image of the first data has been re-imaged to the third controller node. If the second data is re-imaged to the third controller node again here, it will cause uneven storage between the controller nodes. Therefore, the second image of the second data is backed up and stored in the second controller node through re-imaging.

[0099] Finally, information that the second data belongs to the second controller node and the fourth controller node is sent to the host, so that the host distributes access requests for the second data to the second controller node or the fourth controller node.

[0100] After the re-imaging operation is completed, it is also necessary to inform the host of the new ownership of the second data to ensure that the host can access the second controller node or the fourth controller node in a targeted manner when calling the second data.

[0101] In combination with the above embodiments, in one implementation, the present application further provides a data storage method, in which, when it is detected that the first controller node has recovered to normal, the first image in the second controller node is re-imaged to the first controller node, and specifically includes the following contents:

[0102] First, while re-mirroring the first mirror in the second controller node to the first controller node, the first mirror in the third controller node is retained so that when the host detects that the second controller node fails, it will distribute access requests for the first data to the third controller node.

[0103] In the embodiment of the present application, since the number of controller nodes is limited, if the backup storage data is too much, it will cause the storage space in the controller cluster to be over-occupied. Therefore, under normal circumstances, a certain copy of data is only backed up and stored in two controller nodes, which not only ensures the reliability when problems occur in the controller nodes, but also guarantees the storage space in the controller cluster.

[0104] According to the above content, after the first controller node with a failure problem is restored, the first data originally stored in the first controller node needs to be re-imaged by the second controller node and restored to the first controller node. After the data in the first controller node is restored, the first data is simultaneously saved in the first controller node, the second controller node and the third controller node. Therefore, it is necessary to delete redundant data to free up space, that is, restore the state before the failure occurs, and delete the first image of the first data stored in the third controller node.

[0105] However, there is also a situation where, during the re-imaging process, if the second controller node fails and the first data has not been completely re-imaged to the first controller node, if the host needs to call the first data at this time, it is necessary to send an access request for the first data to the third controller node, and based on the first image of the first data in the third controller node, re-image is performed in other controller nodes, such as the repaired first controller node, to ensure that the first data is backed up and stored in at least two controller nodes in the controller cluster.

[0106] Then, after determining that all of the first images in the second controller node are reimaged to the first controller node, the first image in the third controller node is deleted.

[0107] In an embodiment of the present application, if no problem occurs during the re-imaging process, the first image of the first data in the second controller node is re-imaged to the first controller node. Then, as mentioned above, the first data in the controller cluster is now stored in the first controller node, the second controller node, and the third controller node at the same time. Therefore, in order to make better use of the storage space in the controller cluster, the first image of the first data in the third controller node is released.

[0108] In combination with the above embodiments, in one implementation, the present application further provides a data storage method. In the method, in the above step S101, when a failure of a first controller node in a multi-controller storage system is detected, the method further includes the following contents:

[0109] First, when it is detected that the first controller node recovers to normal, the first image in the second controller node is re-imaged to the first controller node, and the second image in the fourth controller node is re-imaged to the first controller node.

[0110] In the embodiment of the present application, when the first controller node originally stores multiple data, taking the first data and the second data as an example, after the failure problem of the first controller is eliminated and restored to normal, the first image of the first data in the second controller is re-imaged to the first controller node, and the second image of the second data in the fourth controller node is re-imaged to the first controller node. So far, the storage status of each data is as follows:

[0111] First data: backup is stored in the first controller node, the second controller node, and the third controller node;

[0112] Second data: backup is stored in the first controller node, the second controller node, and the fourth controller node.

[0113] Therefore, in order to restore to the original storage balance state, it is necessary to delete the second mirror in the second controller node and delete the first mirror in the third controller node.

[0114] Furthermore, information that the first data belongs to the first controller node and the second controller node is sent to the host, so that the host distributes access requests for the first data to the first controller node or the second controller node, and information that the second data belongs to the first controller node and the fourth controller node is sent to the host, so that the host distributes access requests for the second data to the first controller node or the fourth controller node.

[0115] When the host needs to call the first data, it will specifically access the first controller node or the second controller node; when the host needs to call the second data, it will specifically access the first controller node or the fourth controller node.

[0116] In the embodiment of the present application, the specific process of the above-mentioned storage data processing can be found in Figure 2 , Figure 2 This is a schematic diagram of data storage provided by an embodiment of the present application, as shown in the figure:

[0117] In this embodiment, the controller cluster includes 4 controllers, wherein the data stored in the first controller node are the first data and the second data, the data stored in the second controller node are the first data and the third data, the data stored in the third controller node are the third data and the fourth data, and the data stored in the fourth controller node are the second data and the fourth data.

[0118] When the first controller node fails, the first image of the first data in the second controller node is re-imaged to the third controller node, and the second image of the second data in the fourth controller node is re-imaged to the second controller node. At this time, the data stored in the second controller node are the first data, the second data, and the third data, the data stored in the third controller node are the first data, the third data, and the fourth data, and the data stored in the fourth controller node are the second data and the fourth data. In this way, the data backup storage in each of the remaining three available controller nodes is achieved while performing balanced distribution processing.

[0119] After the first controller node is restored, the first image of the first data in the second controller node is reimaged to the first controller node, and the second image of the second data in the fourth controller node is reimaged to the first controller node. After the data is completely restored, the backup data reimaged in the previous step, i.e., the first image of the first data in the third controller node and the second image of the second data in the second controller node, are deleted. At this point, the data storage state in the controller cluster is restored to the original balanced state.

[0120] In combination with the above embodiments, in one implementation, the present application further provides a data storage method, in which, in the above step S102, the first image in the second controller node is re-imaged to the third controller node of the multi-controller storage system, and specifically also includes the following contents:

[0121] First, the second controller node applies for a lock for the first image;

[0122] Secondly, the second controller node sends an insert request to the third controller node;

[0123] Then, the third controller node migrates the first mirror in the second controller node to the cache of the third controller node;

[0124] Next, the third controller node sends an insert response to the second controller node;

[0125] Finally, after receiving the insert response, the second controller node releases the lock on the first image.

[0126] In the embodiment of the present application, the specific process of the above-mentioned re-imaging can be found in Figure 3 , Figure 3 This is a schematic diagram of a re-imaging process provided by an embodiment of the present application, as shown in the figure:

[0127] First, it is necessary to operate on the source of the re-imaged data, that is, to lock the first image of the first data in the second controller to ensure that the data content will not change during the re-image process, so as to make the data abnormal before and after the re-image; then the corresponding node in the second controller needs to send a request to insert data to the target re-imaged controller node, that is, the third controller node; after the third controller node responds to the insertion request, the data migration operation can be performed to copy and migrate the first image of the first data in the second controller node to the corresponding position of the third controller node; after completing the data migration process, the third controller node should also send an insertion response to the second controller node, that is, to confirm that the first image of the first data migrated by the second controller node has been completely copied and migrated to the third controller node; finally, after the second controller node receives the insertion response sent by the third controller node, it releases the lock on the first image of the first data in the second controller node, and the subsequent host can call the first data by accessing the second controller node or the third controller node.

[0128] In combination with the above embodiments, in one implementation, the present application further provides a data storage method, in which the method specifically includes the following contents:

[0129] First, the first controller node receives and stores first data belonging to the first controller node distributed by the host, and the second controller node receives and stores second data belonging to the second controller node distributed by the host; the first data and the second data are obtained by the host dividing the data to be stored into segments.

[0130] In an embodiment of the present application, the host accesses each controller node in the controller cluster through the self-developed multi-path software for the controller cluster provided in the present application, and calls the data therein in a targeted manner. When the host distributes data to the controller cluster, since the controller cluster contains multiple controller nodes, the data is evenly distributed to each controller node. The data allocated by the host is divided into multiple data blocks such as first data and second data according to certain division rules, so as to achieve balanced distribution and storage of data in a volume to multiple controller nodes in the controller cluster.

[0131] Then, a first image obtained by mirroring the first data is stored in the second controller node, and a second image obtained by mirroring the second data is stored in the third controller node.

[0132] As described above in this application, data needs to be backed up and stored in the controller cluster to improve the reliability of the entire storage cluster. Therefore, the first image of the first data needs to be backed up and stored in the second controller node at the same time, and the second image of the second data needs to be backed up and stored in the third controller node at the same time.

[0133] Finally, information that the first data belongs to the first controller node and the second controller node is sent to the host, so that the host distributes access requests for the first data to the first controller node or the second controller node, and information that the second data belongs to the second controller node and the third controller node is sent to the host, so that the host distributes access requests for the second data to the second controller node or the third controller node.

[0134] Based on the same design concept, an embodiment of the present application provides a data storage device. Figure 5 , Figure 5 is a structural block diagram of a data storage device provided by an embodiment of the present application. Figure 5 As shown, the device comprises:

[0135] a fault detection module, configured to, when detecting that a first controller node in a multi-controller storage system fails, determine a second controller node in the multi-controller storage system that stores a first mirror of first data in the first controller node;

[0136] a re-imaging module, used for re-imaging the first image in the second controller node to a third controller node of the multi-controller storage system;

[0137] The belonging information sending module is used to send information that the first data belongs to the second controller node and the third controller node to the host, so that the host distributes the access request for the first data to the second controller node or the third controller node.

[0138] Optionally, the data storage device further includes:

[0139] A re-imaging module, configured to re-image the first image in the second controller node to the first controller node when detecting that the first controller node has returned to normal;

[0140] The belonging information sending module is used to send information that the first data belongs to the first controller node and the second controller node to the host, so that the host distributes the access request for the first data to the first controller node or the second controller node.

[0141] Optionally, the fault detection module includes:

[0142] An image determination submodule, configured to determine, from the multi-controller storage system, a fourth controller node storing a second image of second data in the first controller node;

[0143] a re-imaging submodule, used for re-imaging the second image in the fourth controller node to the second controller node of the multi-controller storage system;

[0144] The belonging information sending submodule is used to send information that the second data belongs to the second controller node and the fourth controller node to the host, so that the host distributes the access request for the second data to the second controller node or the fourth controller node.

[0145] Optionally, the re-imaging module further includes:

[0146] an image reservation submodule, configured to reserve the first image in the third controller node during the period of re-imaging the first image in the second controller node to the first controller node, so that the host can distribute the access request for the first data to the third controller node when detecting that the second controller node fails;

[0147] The image deletion submodule is used to delete the first image in the third controller node after determining that the first image in the second controller node is completely reimaged to the first controller node.

[0148] Optionally, the fault detection module includes:

[0149] a re-imaging submodule, configured to re-image the first image in the second controller node to the first controller node, and re-image the second image in the fourth controller node to the first controller node when detecting that the first controller node has recovered to normal;

[0150] An image deletion submodule, used for deleting the second image in the second controller node, and deleting the first image in the third controller node;

[0151] The attribution information sending submodule is used to send information that the first data belongs to the first controller node and the second controller node to the host, so that the host distributes access requests for the first data to the first controller node or the second controller node, and to send information that the second data belongs to the first controller node and the fourth controller node to the host, so that the host distributes access requests for the second data to the first controller node or the fourth controller node.

[0152] Optionally, the re-imaging module further includes:

[0153] A locking submodule, used for the second controller node to apply for a lock for the first image;

[0154] An insertion request submodule, configured for the second controller node to send an insertion request to the third controller node;

[0155] A migration submodule, used for the third controller node to migrate the first mirror in the second controller node to the cache of the third controller node;

[0156] An insert response submodule, configured for the third controller node to send an insert response to the second controller node;

[0157] The unlocking submodule is used for the second controller node to release the lock for the first image after receiving the insertion response.

[0158] Optionally, the data storage device further includes:

[0159] A data partitioning submodule, configured for the first controller node to receive and store first data belonging to the first controller node and distributed by the host, and for the second controller node to receive and store second data belonging to the second controller node and distributed by the host; the first data and the second data are obtained by the host dividing the data to be stored according to segments;

[0160] a data storage submodule, configured to store a first image obtained by mirroring the first data to the second controller node, and to store a second image obtained by mirroring the second data to the third controller node;

[0161] The attribution information sending submodule is used to send information that the first data belongs to the first controller node and the second controller node, so that the host distributes access requests for the first data to the first controller node or the second controller node, and to send information that the second data belongs to the second controller node and the third controller node to the host, so that the host distributes access requests for the second data to the second controller node or the third controller node.

[0162] Based on the same design concept, another embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the data storage method described in any of the above embodiments of the present application are implemented.

[0163] Based on the same design concept, another embodiment of the present application provides an electronic device, such as Figure 5 shown. Figure 5 1 is a schematic diagram of an electronic device shown in an embodiment of the present application. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the data storage method described in any of the above embodiments of the present application when executing the computer program.

[0164] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0165] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0166] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0167] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0168] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0169] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0170] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

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

[0172] The above is a detailed introduction to a data storage method, device, equipment and medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data storage method, characterized in that: Applicable to multi-controller storage systems, including: When a first controller node in a multi-controller storage system is detected to have failed, determining a second controller node in the multi-controller storage system that stores a first mirror of first data in the first controller node; re-image the first image in the second controller node to a third controller node of the multi-controller storage system; Information that the first data belongs to the second controller node and the third controller node is sent to a host, so that the host distributes access requests for the first data to the second controller node or the third controller node.

2. A data storage method according to claim 1, characterized in that: Applied to a multi-controller storage system, the method further includes: When it is detected that the first controller node has recovered to normal, re-image the first image in the second controller node to the first controller node; Information that the first data belongs to the first controller node and the second controller node is sent to a host, so that the host distributes access requests for the first data to the first controller node or the second controller node.

3. A data storage method according to claim 1, characterized in that: When a failure of a first controller node in a multi-controller storage system is detected, the method further includes: Determine, from the multi-controller storage system, a fourth controller node storing a second mirror of the second data in the first controller node; re-imaging the second image in the fourth controller node to the second controller node of the multi-controller storage system; Information that the second data belongs to the second controller node and the fourth controller node is sent to a host, so that the host distributes access requests for the second data to the second controller node or the fourth controller node.

4. A data storage method according to claim 2, characterized in that: When it is detected that the first controller node recovers to normal, re-imaging the first image in the second controller node to the first controller node includes: During the process of re-imaging the first image in the second controller node to the first controller node, retaining the first image in the third controller node, so that when the host detects that the second controller node fails, the host distributes the access request for the first data to the third controller node; After determining that all of the first images in the second controller node are reimaged to the first controller node, the first image in the third controller node is deleted.

5. A data storage method according to claim 3, characterized in that: After detecting that a first controller node in a multi-controller storage system fails, the method further includes: When it is detected that the first controller node recovers to normal, re-image the first image in the second controller node to the first controller node, and re-image the second image in the fourth controller node to the first controller node; Deleting the second image in the second controller node, and deleting the first image in the third controller node; The information that the first data belongs to the first controller node and the second controller node is sent to the host, so that the host distributes the access request for the first data to the first controller node or the second controller node, and the information that the second data belongs to the first controller node and the fourth controller node is sent to the host, so that the host distributes the access request for the second data to the first controller node or the fourth controller node.

6. A data storage method according to claim 1, characterized in that: Re-imaging the first image in the second controller node to a third controller node of the multi-controller storage system includes: The second controller node applies for a lock for the first image; The second controller node sends an insert request to the third controller node; The third controller node migrates the first mirror in the second controller node to the cache of the third controller node; The third controller node sends an insert response to the second controller node; After receiving the insert response, the second controller node releases the lock on the first image.

7. A data storage method according to claim 1, characterized in that: Applied to a multi-controller storage system, the method further includes: The first controller node receives and stores first data belonging to the first controller node distributed by the host, and the second controller node receives and stores second data belonging to the second controller node distributed by the host; the first data and the second data are obtained by the host dividing the data to be stored into segments; storing a first image obtained by mirroring the first data to the second controller node, and storing a second image obtained by mirroring the second data to the third controller node; The information that the first data belongs to the first controller node and the second controller node is sent to the host so that the host distributes the access request for the first data to the first controller node or the second controller node, and the information that the second data belongs to the second controller node and the third controller node is sent to the host so that the host distributes the access request for the second data to the second controller node or the third controller node.

8. A data storage device, characterized in that: Applied to a multi-controller storage system, the device comprises: a fault detection module, configured to, when detecting that a first controller node in a multi-controller storage system fails, determine a second controller node in the multi-controller storage system that stores a first mirror of first data in the first controller node; a re-imaging module, used for re-imaging the first image in the second controller node to a third controller node of the multi-controller storage system; The belonging information sending module is used to send information that the first data belongs to the second controller node and the third controller node to the host, so that the host distributes the access request for the first data to the second controller node or the third controller node.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the computer program is executed by the processor, the data storage method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data storage method according to any one of claims 1 to 7 is implemented.