A data reading method, controller, computer device and storage medium

By introducing a shared memory mechanism into the storage system, conflicts in data reading and metadata synchronization between controllers are resolved, improving the efficiency and accuracy of global deduplication and ensuring the performance and reliability of the storage system.

CN119759284BActive Publication Date: 2025-12-09INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411891547.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-12-09
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

In a global deduplication scenario, conflicts arise between data read operations and metadata synchronization between controllers in the storage system, resulting in low data read efficiency and poor accuracy, which affects the performance and reliability of the storage system.

Method used

By introducing a shared memory mechanism, the initialization, verification synchronization, and reconstruction metadata in shared memory are used to determine the status of the target stripe and read the data from the disk after it has completed initialization or reconstruction, thus avoiding conflicts between controllers.

Benefits of technology

It improves the data reading efficiency and accuracy of the storage system in global deduplication scenarios, ensuring the performance and reliability of the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759284B_ABST
    Figure CN119759284B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data storage, and discloses a data reading method, a controller, computer equipment and a storage medium, which are applied to a first controller. The method comprises the following steps: receiving a reading request sent from a host, wherein the reading request carries a stripe identifier; determining whether a target stripe corresponding to the stripe identifier belongs to the first controller according to the stripe identifier; if not, obtaining initialization metadata corresponding to a target controller to which the target stripe belongs from a shared memory, wherein the initialization metadata is used for indicating whether the target stripe is completed initialization; in the case that the initialization metadata indicates that the target stripe is completed initialization, reading target data from at least one disk corresponding to the target stripe, and returning the target data to the host. The application can solve the problems that the data reading efficiency from a storage system is low and the accuracy is poor in a global deduplication scene, the global deduplication efficiency is low and the accuracy is poor, and the performance and reliability of the whole storage system are affected.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data storage, and in particular to a data reading method, a controller, computer equipment and a storage medium. BACKGROUND

[0002] In the current big data era, with the continuous growth of data volume, data storage has become an important issue in various fields. In the data storage process, in order to avoid occupying too much storage resources and reduce the space occupation and cost of data storage, the host usually reduces the repeated data in the storage system through the data deduplication (DDP) technology, that is, performs global deduplication on the storage system. For high-end storage systems (four controllers and above storage systems) of all-flash storage arrays (AFA), if the metadata of each controller is completely consistent, the synchronization overhead between multiple controllers will inevitably increase, which seriously affects the performance, so generally the metadata is synchronized between two controllers, and the metadata includes the mapping relationship of deduplication and the background task of RAID, etc.

[0003] Therefore, the host directly issues data read requests from all controllers to query deduplication metadata and read operations, which will cause serious conflicts between read operations and metadata synchronization from four controllers. For example, the conflicts are: in the initialization scenario, when reading data in the stripe where the data to be read is located, the other controllers are performing initialization processing on the stripe. These conflicts will cause low efficiency and poor accuracy in reading data from the storage system in the global deduplication scenario, and further cause low efficiency and poor accuracy in global deduplication, which affects the performance and reliability of the entire storage system. SUMMARY

[0004] Therefore, the present application provides a data reading method, a controller, computer equipment and a storage medium to solve the problem of low efficiency and poor accuracy in reading data from the storage system in the global deduplication scenario, which causes low efficiency and poor accuracy in global deduplication, and affects the performance and reliability of the entire storage system.

[0005] In a first aspect, the present application provides a data reading method applied to a first controller, the method comprising: receiving a read request sent from a host, the read request carrying a stripe identifier, the stripe identifier being used to indicate a stripe where target data corresponding to the read request is located; determining whether the target stripe corresponding to the stripe identifier belongs to the first controller according to the stripe identifier; if not, obtaining initialization metadata corresponding to a target controller to which the target stripe belongs from a shared memory, the initialization metadata being used to indicate whether the target stripe is initialized; and in the case that the initialization metadata indicates that the target stripe is initialized, reading the target data from at least one disk corresponding to the target stripe and returning the target data to the host.

[0006] Based on the first aspect, when the first controller receives the read request sent from the host, it can determine whether the target stripe corresponding to the stripe identifier belongs to the first controller according to the stripe identifier carried by the read request; and in the case that the target stripe does not belong to the first controller, it can obtain initialization metadata corresponding to the target controller to which the target stripe belongs from the shared memory to determine whether the target stripe is initialized, and in the case that the target stripe is initialized, it can read the target data from at least one disk corresponding to the target stripe and return the target data to the host.

[0007] Since the shared memory is shared by all controllers, when the first controller receives the read request and the target stripe does not belong to the first controller, it can obtain initialization metadata of the target controller corresponding to the target stripe from the shared memory; and then it can determine whether the target stripe is initialized, and after the target stripe is initialized, it can read the target data from at least one disk corresponding to the target stripe, so as to avoid the conflict that in the initialization scenario, other controllers are performing initialization on the stripe where the data to be read is located, thereby improving the efficiency and accuracy of reading data from the storage system, improving the efficiency and accuracy of global deduplication, and ensuring the performance and reliability of the entire storage system.

[0008] In an optional implementation, each disk comprises a check block and a data block, the data block storing data, and the check block storing check information for recovering the data stored in the data block; before obtaining the initialization metadata corresponding to the target controller from the shared memory, the method further comprises: obtaining check synchronization metadata corresponding to the target controller from the shared memory, the check synchronization metadata being used to indicate whether the target stripe is marked as having a problem in the readability of the check block; and if the check synchronization metadata indicates that the target stripe is not marked as having a problem in the readability of the check block, it is determined that all check blocks of the at least one disk do not have a fault.

[0009] In the embodiment of the present application, since the shared memory is shared by all controllers, the first controller can obtain the check synchronization metadata corresponding to the target controller from the shared memory, and then determine whether the target stripe is marked as having a problem of readability of the check block, so as to facilitate the first controller to determine whether the target data can be read from the at least one disk.

[0010] In an optional embodiment, the method further comprises: if the check synchronization metadata indicates that the target stripe is marked as having a problem of read ability of the check block, determining that there is a first disk in the at least one disk, and that the first check block of the first disk has a fault; obtaining a first disk state of the first disk, the first disk state being used to indicate whether the data block of the first disk has a fault; and if the first disk state indicates that the data block of the first disk does not have a fault, reading the target data from the at least one disk.

[0011] In the embodiment of the present application, the first controller can mark the target stripe as having a problem of readability of the check block, determine that there is a first disk having a problem of readability of the check block in the at least one disk, and further determine whether the data block of the first disk has a fault, so that even if the first disk has a problem of readability of the check block, the data of the data block of the first disk can be read, and the problem that the data in the data block corresponding to the check block is not read due to the unavailability of the check block because of the controller marking the fault block or the bad block in the disk fault scenario is avoided, the efficiency and accuracy of reading data from the storage system are improved, and the efficiency and accuracy of global deduplication are improved, and the performance and reliability of the entire storage system are guaranteed.

[0012] In an optional embodiment, the method further comprises: if the first disk state indicates that the data block of the first disk has a fault, determining and recording that the first disk cannot perform data reconstruction.

[0013] In the embodiment of the present application, when the first check block of the first disk has a fault and the first data block has a fault, it can be determined and recorded that the first disk cannot perform data reconstruction, so as to avoid the scenario that the first controller attempts to perform data reconstruction on the first disk, and the performance of the storage system is improved.

[0014] In an optional embodiment, the method further comprises: if the target stripe belongs to the first controller, obtaining at least one disk state, each disk state being used to indicate whether the data block of each disk has a fault; if the data block of the at least one disk does not have a fault, and the target stripe is completed initialization, reading the target data from the at least one disk, and returning the target data to the host.

[0015] In the embodiment of the present application, the target data can be directly read and returned to the host when the target stripe belongs to the first controller management, the at least one disk corresponding to the target stripe does not exist fault, and the target stripe is completed initialization, so that the host can perform global deduplication based on the read target data.

[0016] In an optional embodiment, the method further comprises: if the target stripe does not belong to the first controller management, obtaining the reconstruction metadata corresponding to the target controller from the shared memory, the reconstruction metadata being used to indicate whether the target stripe is completed data reconstruction; in the case that the reconstruction metadata indicates that the target stripe is completed data reconstruction, reading the target data from the at least one disk and returning the target data to the host.

[0017] In the embodiment of the present application, the reconstruction metadata of the target controller can be obtained from the shared memory, and then it can be judged whether the target stripe is completed data reconstruction, and the target data can be read from the at least one disk corresponding to the target stripe after the target stripe is completed data reconstruction, so that the conflict that the data in the stripe where the data to be read is located is read while the data in the stripe is reconstructed by the other controller in the data reconstruction scenario can be avoided, and the efficiency and accuracy of reading data from the storage system are improved, and the efficiency and accuracy of global deduplication are improved, and the performance and reliability of the entire storage system are guaranteed.

[0018] In an optional embodiment, the method further comprises: in the case that the reconstruction metadata indicates that the target stripe is not completed data reconstruction, obtaining the second disk state of the second disk which is not completed data reconstruction, the second disk state being used to indicate whether the data block of the second disk exists fault; if the second disk state indicates that the data block of the second disk does not exist fault, reading the target data from the at least one disk and returning the target data to the host; if the second disk state indicates that the data block of the second disk exists fault, performing data reconstruction on the data block of the second disk based on the check block of the second disk until the data reconstruction is completed, reading the target data from the at least one disk and returning the target data to the host.

[0019] In the embodiment of the present application, in the case that the target stripe is not completed data reconstruction, it can be judged whether the data block of the second disk exists fault, so that even if the data block of the second disk exists fault, the data reconstruction on the data block of the second disk based on the check block of the second disk can be performed, and then the target data is read, the problem that the data in the data block of the second disk is not read due to the fault of the data block of the second disk when the target stripe is not completed data reconstruction is avoided, the efficiency and accuracy of reading data from the storage system are improved, and the efficiency and accuracy of global deduplication are improved, and the performance and reliability of the entire storage system are guaranteed.

[0020] In a second aspect, the present application provides a controller, comprising: a transceiving module configured to receive a read request sent from a host, the read request carrying a stripe identifier, the stripe identifier being used to indicate a stripe where target data corresponding to the read request is located; a processing module configured to determine whether the target stripe corresponding to the stripe identifier belongs to the first controller according to the stripe identifier; and the transceiving module is further configured to obtain initialization metadata corresponding to a target controller to which the target stripe belongs from a shared memory if the target stripe does not belong to the first controller, the initialization metadata being used to indicate whether the target stripe is initialized; and the processing module is further configured to read the target data from at least one disk corresponding to the target stripe and return the target data to the host if the initialization metadata indicates that the target stripe is initialized.

[0021] In a third aspect, the present application provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected with each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the data reading method of the first aspect or any of the corresponding embodiments thereof.

[0022] In a fourth aspect, the present application provides a computer readable storage medium, the computer readable storage medium storing computer instructions, the computer instructions being used to make a computer perform the data reading method of the first aspect or any of the corresponding embodiments thereof.

[0023] In a fifth aspect, the present application provides a computer program product, comprising computer instructions, the computer instructions being used to make a computer perform the data reading method of the first aspect or any of the corresponding embodiments thereof. BRIEF DESCRIPTION OF DRAWINGS

[0024] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the drawings needed in the specific embodiments or the prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0025] Figure 1 is a schematic diagram of a four-controller storage system of an embodiment of the present application performing stripe locking;

[0026] Figure 2 is a schematic diagram of a controller and a stripe binding in a storage system of an embodiment of the present application;

[0027] Figure 3 is a topology diagram of a data reading system of an embodiment of the present application;

[0028] Figure 4This is a flowchart illustrating a data reading method according to an embodiment of the present invention;

[0029] Figure 5 This is a structural block diagram of the controller according to an embodiment of the present invention;

[0030] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

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

[0032] This invention applies to scenarios where the host performs data deduplication on the storage system. Data deduplication technology (DDP) is a core technology that can reduce data storage space, especially in AFA storage systems where storage space costs are high, DDP has become an essential feature.

[0033] Global deduplication at the storage system level is undoubtedly the foundation for ensuring deduplication rates. However, global deduplication requires supporting data synchronization and mutual exclusion for concurrent access from each controller in the storage system. Synchronizing metadata between controllers, however, presents a challenge, as it directly impacts storage system performance. To ensure storage system performance and improve global deduplication efficiency, the following two methods are typically employed.

[0034] Method 1: For example Figure 1 As shown, Figure 1 This is a schematic diagram of a four-controller storage system using striplock according to an embodiment of the present invention; in Figure 1 In a global deduplication scenario, when a controller processes stripe 1, it needs to notify the other three controllers and obtain authorization from them before performing I / O processing. This prevents mutual exclusion issues caused by multiple stripes processing the same stripe simultaneously. In this approach, controllers have no binding relationship to stripes, and each controller can process a stripe, thus resolving the issue of all four controllers issuing deduplication read requests. The drawback is that the four controllers synchronize and mutually exclude each other, resulting in significant performance overhead. Furthermore, this approach significantly increases the number of locked messages and the lock cycle on four-controller or even eight-controller storage systems, greatly impacting performance and lacking scalability.

[0035] Method 2: For example Figure 2 As shown,Figure 2 is a schematic diagram of controller and stripe binding in a storage system of an embodiment of the present application; in Figure 2 In the above two ways, the conflicts between the read operations and the metadata synchronization among the controllers in the storage system cannot be effectively solved, which further leads to low efficiency and poor accuracy in reading data from the storage system in the global deduplication scenario, and further leads to low efficiency and poor accuracy in global deduplication, thereby affecting the performance and reliability of the entire storage system.

[0036] In the above two ways, the conflicts between the read operations and the metadata synchronization among the controllers in the storage system cannot be effectively solved, which further leads to low efficiency and poor accuracy in reading data from the storage system in the global deduplication scenario, and further leads to low efficiency and poor accuracy in global deduplication, thereby affecting the performance and reliability of the entire storage system.

[0037] To solve the above technical problems, an embodiment of the present application provides a data reading method, which adds shared memory to solve the conflict problem caused by the data synchronization exclusion between the global deduplication and multiple controllers, so as to improve the efficiency and accuracy of reading data from the storage system in the global deduplication scenario, and further improve the efficiency and accuracy of global deduplication, thereby guaranteeing the performance and reliability of the entire storage system.

[0038] The following will take the data reading system 300 shown in FIG. 3 as an example to describe the method provided by the embodiment of the present application. Figure 3 The above is only a schematic diagram and does not constitute a limitation on the applicable scenarios of the technical solutions provided by the present application. Figure 3 The above is only a schematic diagram and does not constitute a limitation on the applicable scenarios of the technical solutions provided by the present application.

[0039] As shown in FIG. 3, Figure 3 As shown in FIG. 3, Figure 3 is a topology diagram of the data reading system of an embodiment of the present application. Figure 3 In the above two ways, the conflicts between the read operations and the metadata synchronization among the controllers in the storage system cannot be effectively solved, which further leads to low efficiency and poor accuracy in reading data from the storage system in the global deduplication scenario, and further leads to low efficiency and poor accuracy in global deduplication, thereby affecting the performance and reliability of the entire storage system.

[0040] The host 301 in the embodiment of the present application can be any kind of device with computing and communication capabilities, for example, a server, a virtual machine, etc.

[0041] The first controller 302, the second controller 303, the third controller 304 or the fourth controller 305 in the embodiment of the application can be any one of the controllers in the storage system. Each controller corresponds to manage at least one stripe; the data of each stripe is distributed on at least one disk.

[0042] The shared memory 306 in the embodiment of the application can be any kind of memory device visible to all controllers and sharable. For example, the shared memory 306 can be a Compute Express Link Intel (CXL) memory which is an open industry standard for high bandwidth and low latency device interconnection cache coherence interconnection protocol. The CXL memory can be used to connect central processing units and accelerators, memory buffers (Memory Buffer) and smart network interface cards (Smart NIC) and other types of devices. The CXL memory can increase the memory capacity and bandwidth of the server, and its latency is slightly higher than that of the local memory. For all controllers, the CXL memory is a piece of memory of itself, but is shared with other controllers. The CXL memory serves as the upper level cache of the controller metadata, and records the metadata of each controller.

[0043] The first disk 307, the second disk 308, the third disk 309 or the fourth disk 310 in the embodiment of the application can be any type of disk. The data stored in the first disk 307, the second disk 308, the third disk 309 and the fourth disk 310 constitutes all the data corresponding to one stripe.

[0044] Figure 3 The data reading system 300 shown is only used for example and is not used to limit the technical solutions of the application. Those skilled in the art should understand that in the specific implementation process, the data reading system 300 can also include other devices, and the number of controllers and disks can also be determined according to specific needs, and is not limited.

[0045] According to the embodiment of the application, a data reading method embodiment is provided. It should be noted that the steps shown in the flowchart of the drawing can be executed in a computer system such as a group of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.

[0046] In the embodiment, a data reading method is provided, which can be used for the first controller, Figure 4 is a flowchart of the data reading method according to the embodiment of the application, as Figure 4 shown, the flow includes the following steps:

[0047] S401: receiving a read request sent from a host.

[0048] The read request carries a stripe identifier. The stripe identifier is used to indicate a stripe where target data corresponding to the read request is located.

[0049] For example, the host sends a read request to the first controller. The first controller receives the read request.

[0050] S402: According to the stripe identifier, it is determined whether the target stripe corresponding to the stripe identifier belongs to the first controller.

[0051] The target stripe corresponds to at least one disk. Each disk includes a data block and a check block. The data block stores data. The check block stores check information for recovering the data stored in the data block.

[0052] In an example, after receiving the read request, the first controller determines a target stripe corresponding to the stripe identifier carried in the read request according to the stripe identifier, and determines whether the target stripe belongs to the first controller according to the correspondence relationship between the target stripe and the corresponding relationship.

[0053] The correspondence relationship is the correspondence relationship between each controller and at least one stripe managed by each controller.

[0054] It can be understood that if the target stripe belongs to the first controller, the first controller can be referred to as the owner node of the target stripe.

[0055] S403: If not, the initialization metadata corresponding to the target controller to which the target stripe belongs is obtained from the shared memory.

[0056] S404: In the case where the initialization metadata indicates that the target stripe is completed initialization, the target data is read from at least one disk corresponding to the target stripe, and the target data is returned to the host.

[0057] The target controller is one of the plurality of controllers of the storage system.

[0058] In the embodiment of the application, the initialization metadata is used to indicate whether the target stripe is completed initialization.

[0059] It can be understood that since the shared memory can be shared by all controllers, the initialization metadata of the target controller can also be obtained from the shared memory when the first controller is not the owner node corresponding to the target node.

[0060] Optionally, if the target stripe belongs to the first controller, the first controller obtains the state of at least one disk; if the data blocks of the at least one disk do not exist fault, and the target stripe is completed initialization, the target data is read from the at least one disk, and the target data is returned to the host.

[0061] wherein each disk status is used to indicate whether a data block of each disk has a failure.

[0062] In an example, the first controller obtains the check synchronization metadata corresponding to the target controller from the shared memory before obtaining the initialization metadata corresponding to the target controller from the shared memory; and if the check synchronization metadata indicates that the target stripe is not marked as having a problem of check block readability, the first controller determines that all check blocks of the at least one disk do not have a failure.

[0063] wherein the check synchronization metadata is used to indicate whether the target stripe is marked as having a problem of check block readability.

[0064] It can be understood that the fact that all check blocks of the at least one disk do not have a failure indicates that all data blocks in the at least one disk corresponding to the target stripe can be reconstructed by the check blocks, even if there is a failed data block, to restore the failed data block to a normal data block, and then read the data.

[0065] In some optional embodiments, if the check synchronization metadata indicates that the target stripe is marked as having a problem of check block readability, the first controller determines that there is a first disk in the at least one disk; obtains a first disk status of the first disk; and if the first disk status indicates that a data block of the first disk does not have a failure, the first controller reads the target data from the at least one disk.

[0066] wherein a first check block of the first disk has a failure. The first disk status is used to indicate whether a data block of the first disk has a failure.

[0067] Optionally, if the first disk status indicates that the data block of the first disk has a failure, the first controller determines and records that the first disk cannot perform data reconstruction.

[0068] In addition to the initialization metadata and the check synchronization metadata of the target stripe, the shared memory also stores reconstruction metadata. The reconstruction metadata is used to indicate whether the target stripe has completed data reconstruction.

[0069] In some optional embodiments, if the target stripe does not belong to the first controller, the first controller obtains the reconstruction metadata corresponding to the target controller from the shared memory; and in a case where the reconstruction metadata indicates that the target stripe has completed data reconstruction, the first controller reads the target data from the at least one disk and returns the target data to the host.

[0070] It can be understood that the fact that the reconstruction metadata indicates that the target stripe has completed data reconstruction indicates that no other controller is performing data reconstruction on the target stripe in addition to the first controller, and therefore, there is no conflict between controllers.

[0071] In some optional embodiments, in the case that the reconstruction metadata indicates that the target stripe is not completed with data reconstruction, a second disk state of the second disk which is not completed with data reconstruction is acquired; if the second disk state indicates that the data block of the second disk does not have a fault, the target data is read from the at least one disk, and the target data is returned to the host; if the second disk state indicates that the data block of the second disk has a fault, data reconstruction is performed on the data block of the second disk based on the check block of the second disk until the data reconstruction is completed, the target data is read from the at least one disk, and the target data is returned to the host.

[0072] The second disk state is used to indicate whether the data block of the second disk has a fault.

[0073] It can be understood that, even if the data block of the second disk has a fault, data reconstruction can be performed on the data block of the second disk based on the check block of the second disk, and then the target data is read, thereby avoiding the problem that, when the target stripe is not completed with data reconstruction, the data in the data block of the second disk is not read due to the fault of the data block of the second disk.

[0074] In some optional embodiments, when the first controller determines that the target stripe corresponding to the stripe identifier does not belong to the first controller, the first controller first acquires the check synchronization metadata corresponding to the target controller from the shared memory; if the check synchronization metadata indicates that the target stripe is not marked as having a problem of check block readability, the first controller then acquires the initialization metadata corresponding to the target controller to which the target stripe belongs from the shared memory; if the initialization metadata indicates that the target stripe is completed with initialization, the first controller acquires the reconstruction metadata corresponding to the target controller from the shared memory; in the case that the reconstruction metadata indicates that the target stripe is completed with data reconstruction, the first controller reads the target data from the at least one disk corresponding to the target stripe, and returns the target data to the host.

[0075] It can be understood that, since the shared memory is the shared memory of all controllers, when the target stripe does not belong to the first controller, the first controller can acquire the check synchronization metadata, the initialization metadata and the reconstruction metadata of the target controller from the shared memory; then, the first controller can sequentially determine whether the target stripe is marked as having a problem of check block readability, whether the target stripe is completed with initialization, and whether the target stripe is being reconstructed, thereby avoiding the problem that, when the data in the stripe to be read is read, the data in the data block corresponding to the check block of the other controller is not read due to the unavailability of the check block of the other controller, the conflict that the other controller is performing initialization on the stripe, and the conflict that the other controller is performing data reconstruction on the stripe.

[0076] Based on the above Figure 4The method is as follows: when the first controller receives a read request sent from a host, the first controller determines whether a target stripe corresponding to a stripe identifier carried by the read request belongs to the first controller management based on the stripe identifier, and obtains initialization metadata corresponding to a target controller to which the target stripe belongs from the shared memory to determine whether the target stripe is initialized when the target stripe does not belong to the first controller management, and reads target data from at least one disk corresponding to the target stripe and returns the target data to the host when the target stripe is initialized.

[0077] Since the shared memory is shared by all controllers, the first controller can obtain initialization metadata of the target controller corresponding to the target stripe from the shared memory when the first controller receives the read request and the target stripe does not belong to the first controller management. Then, the first controller can determine whether the target stripe is initialized, and reads the target data from at least one disk corresponding to the target stripe after the target stripe is initialized. Therefore, the conflict that the other controller is initializing the stripe where the read data is located when the read data is read can be avoided, and the efficiency and accuracy of reading data from the storage system are improved, and the efficiency and accuracy of global deduplication are improved, and the performance and reliability of the entire storage system are ensured.

[0078] In the embodiment, a controller is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and details are not repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.

[0079] The embodiment provides a controller, as shown in Figure 5 , Figure 5 is a structural block diagram of the controller according to the embodiment of the application; the controller comprises:

[0080] The transceiver module 501 is configured to receive a read request sent from a host, the read request carrying a stripe identifier, the stripe identifier being used to indicate a target stripe where target data corresponding to the read request is located.

[0081] The processing module 502 is configured to determine whether the target stripe corresponding to the stripe identifier belongs to the first controller management according to the stripe identifier.

[0082] The transceiver module 501 is further configured to obtain initialization metadata corresponding to a target controller to which the target stripe belongs from the shared memory if the target stripe does not belong to the first controller management, the initialization metadata being used to indicate whether the target stripe is initialized.

[0083] The processing module 502 is further configured to read the target data from the at least one disk corresponding to the target stripe and return the target data to the host, in the case where the initialization metadata indicates that the target stripe is completed with initialization.

[0084] In some optional embodiments, each disk includes a data block and a check block, the data block stores data, and the check block stores check information for recovering the data stored in the data block. Before obtaining the initialization metadata corresponding to the target controller from the shared memory, the transceiver 501 is further configured to obtain check synchronization metadata corresponding to the target controller from the shared memory, the check synchronization metadata being used to indicate whether the target stripe is marked as having a problem in check block readability. The processing module 502 is further configured to determine that all check blocks of the at least one disk do not have a fault, in the case where the check synchronization metadata indicates that the target stripe is not marked as having the problem in check block readability.

[0085] In some optional embodiments, the processing module 502 is further configured to determine that there is a first disk in the at least one disk and a first check block of the first disk has a fault, in the case where the check synchronization metadata indicates that the target stripe is marked as having the problem in check block readability. The transceiver 501 is further configured to obtain a first disk state of the first disk, the first disk state being used to indicate whether a data block of the first disk has a fault. The processing module 502 is further configured to read the target data from the at least one disk, in the case where the first disk state indicates that the data block of the first disk does not have a fault.

[0086] In some optional embodiments, the processing module 502 is further configured to determine and record that the first disk cannot perform data reconstruction, in the case where the first disk state indicates that the data block of the first disk has a fault.

[0087] In some optional embodiments, the transceiver 501 is further configured to obtain at least one disk state, in the case where the target stripe belongs to the first controller, each disk state being used to indicate whether a data block of each disk has a fault. The processing module 502 is further configured to read the target data from the at least one disk and return the target data to the host, in the case where the data blocks of the at least one disk do not have a fault and the target stripe is completed with initialization.

[0088] In some optional embodiments, the transceiver 501 is further configured to obtain reconstruction metadata corresponding to the target controller from the shared memory, in the case where the target stripe does not belong to the first controller, the reconstruction metadata being used to indicate whether the target stripe is completed with data reconstruction. The processing module 502 is further configured to read the target data from the at least one disk and return the target data to the host, in the case where the reconstruction metadata indicates that the target stripe is completed with data reconstruction.

[0089] In some optional implementations, the transceiver module 501 is further configured to obtain the second disk status of the second disk that has not completed data reconstruction when the reconstruction metadata indicates that the target stripe has not completed data reconstruction. The second disk status is used to indicate whether there is a fault in the data blocks of the second disk. The processing module 502 is further configured to read the target data from at least one disk and return the target data to the host if the second disk status indicates that there is no fault in the data blocks of the second disk. The processing module 502 is further configured to perform data reconstruction on the data blocks of the second disk based on the check block of the second disk if the second disk status indicates that there is a fault in the data blocks of the second disk, until the data reconstruction is completed, read the target data from at least one disk, and return the target data to the host.

[0090] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0091] In this embodiment, the controller is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0092] This invention also provides a computer device having the above-described features. Figure 5 The controller shown.

[0093] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 6 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take a processor 10 as an example.

[0094] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further include hardware chips. The hardware chips can be application specific integrated circuits, programmable logic devices, or a combination thereof. The programmable logic devices can be complex programmable logic devices, field programmable logic gate arrays, general array logic, or any combination thereof.

[0095] The memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods illustrated in the above embodiments.

[0096] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system, application programs required by at least one function, and the like. The data storage area can store data created according to the use of the computer device, and the like. In addition, the memory 20 can include a high-speed random access memory, and can further include a non-transitory memory such as at least one disk storage device, a flash memory device, or other non-transitory solid state memory device. In some alternative embodiments, the memory 20 can optionally include a memory disposed remotely from the processor 10, which can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0097] The memory 20 can include a volatile memory such as a random access memory, and can also include a non-volatile memory such as a flash memory, a hard disk, or a solid state disk. The memory 20 can further include a combination of the above-mentioned types of memories.

[0098] The computer device further includes a communication interface 30 for communication of the computer device with other devices or communication networks.

[0099] The embodiments of the present application also provide a computer readable storage medium. The above-mentioned methods according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded to a local storage medium through network downloading, so that the methods described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can further include a combination of the above-mentioned types of memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods illustrated in the above embodiments are implemented.

[0100] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, can invoke or provide methods and / or technical solutions according to the present application. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible by the computer.

[0101] Although the embodiments of the present application are described in conjunction with the drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.

Claims

1. A data reading method, characterized in that, Applied to a first controller; the method includes: Receive a read request sent from the host, the read request carrying a stripe identifier, the stripe identifier being used to indicate the stripe in which the target data to be read is located; Based on the strip identifier, determine whether the target strip corresponding to the strip identifier belongs to the management of the first controller; If not, the initialization metadata corresponding to the target controller to which the target stripe belongs is obtained from the shared memory. The initialization metadata is used to indicate whether the target stripe has completed initialization. If the initialization metadata indicates that the target stripe has completed initialization, the target data is read from at least one disk corresponding to the target stripe and the target data is returned to the host; The method further includes: If the target stripe belongs to the management of the first controller, then at least one disk status is obtained, and each disk status is used to indicate whether there is a fault in the data block of each disk; If none of the data blocks on the at least one disk are fault-free and the target stripe has been initialized, then the target data is read from the at least one disk and returned to the host.

2. The method according to claim 1, characterized in that, Each of the disks includes a check block and a data block, the data block storing data, and the check block storing check information for recovering the data stored in the data block; Before retrieving the initialization metadata corresponding to the target controller from the shared memory, the method further includes: The verification synchronization metadata corresponding to the target controller is obtained from the shared memory. The verification synchronization metadata is used to indicate whether the target stripe is marked as having a problem with the readability of the verification block. If the verification synchronization metadata indicates that the target stripe is not marked as having a problem with the readability of the verification block, then it is determined that all verification blocks of the at least one disk are not faulty.

3. The method according to claim 2, characterized in that, The method further includes: If the verification synchronization metadata indicates that the target stripe is marked as having a problem with the readability of the verification block, then it is determined that there is a first disk among the at least one disks, and the first verification block of the first disk is faulty; Obtain the first disk status of the first disk, which is used to indicate whether there is a fault in the data blocks of the first disk; If the first disk status indicates that there is no fault in the data blocks of the first disk, then the target data is read from the at least one disk.

4. The method according to claim 3, characterized in that, The method further includes: If the status of the first disk indicates that there is a fault in the data blocks of the first disk, then it is determined and recorded that the first disk cannot be reconstructed.

5. The method according to claim 1, characterized in that, The method further includes: If the target stripe is not managed by the first controller, the reconstruction metadata corresponding to the target controller is obtained from the shared memory. The reconstruction metadata is used to indicate whether the target stripe has completed data reconstruction. If the reconstruction metadata indicates that the target stripe has completed the data reconstruction, the target data is read from the at least one disk and returned to the host.

6. The method according to claim 5, characterized in that, The method further includes: If the reconstruction metadata indicates that the target stripe has not completed the data reconstruction, the second disk status of the second disk that has not completed the data reconstruction is obtained, and the second disk status is used to indicate whether there is a fault in the data blocks of the second disk; If the status of the second disk indicates that there is no fault in the data blocks of the second disk, then the target data is read from the at least one disk and the target data is returned to the host; If the status of the second disk indicates that there is a fault in the data block of the second disk, then the data block of the second disk is reconstructed based on the check block of the second disk until the data reconstruction is completed, the target data is read from the at least one disk, and the target data is returned to the host.

7. A controller, characterized in that, The controller includes: The transceiver module is used to receive read requests sent from the host. The read request carries a stripe identifier, which is used to indicate the stripe in which the target data to be read is located. The processing module is used to determine, based on the strip identifier, whether the target strip corresponding to the strip identifier belongs to the controller for management; The transceiver module is further configured to, if not, obtain the initialization metadata corresponding to the target controller to which the target stripe belongs from the shared memory, wherein the initialization metadata is used to indicate whether the target stripe has completed initialization; The processing module is further configured to, when the initialization metadata indicates that the target stripe has completed initialization, read the target data from at least one disk corresponding to the target stripe and return the target data to the host; Also includes: If the target stripe belongs to the controller, then at least one disk status is obtained, and each disk status is used to indicate whether there is a fault in the data block of each disk; If none of the data blocks on the at least one disk are fault-free and the target stripe has been initialized, then the target data is read from the at least one disk and returned to the host.

8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the data reading method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the data reading method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method, device and equipment for recovering metadata by RAID (Redundant Array of Independent Disk) controller and medium

    CN115543692A

  • Data writing method, device and equipment for redundant disk array

    CN118585138A