Data recovery method used for EC-replication hybrid redundant storage

The data recovery process of EC copy hybrid redundant storage is simplified through the operation mapping and caching mechanism, which solves the problem of data recovery complexity, improves efficiency and performance, and reduces system complexity.

WO2024212602A1PCT designated stage expired Publication Date: 2024-10-17CHINA TELECOM CLOUD TECH CO LTD

Patent Information

Application Number
PCT/CN2023/142717
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-14
Filing Date
2023-12-28
Publication Date
2024-10-17

AI Technical Summary

Technical Problem

In EC copy hybrid redundant storage, the data recovery process is complicated. It is necessary to determine the source of the data and whether parity block calculation is required, resulting in high system implementation complexity.

Method used

Use operation mapping to separate the repair operation from the data source. Through the steps of Unit repair operation and data source mapping, Strip read operation mapping, IO aggregation and data flushing, strip cache and shard cache are used to improve search efficiency, and IO Aggregator is used to merge small files. IO, simplifying the data recovery process.

Benefits of technology

It reduces the system complexity, improves the efficiency and performance of data recovery, saves EC Decode and IO overhead, has clear logic and is simple to implement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023142717_17102024_PF_FP_ABST
    Figure CN2023142717_17102024_PF_FP_ABST
Patent Text Reader

Abstract

Provided is a data recovery method used for EC-replication hybrid redundant storage, which belongs to the technical field of data processing. The method comprises the following steps: S1, unit repair operation and data source mapping: firstly, binding a data operation and a data source required for repairing a specific unit, inputting same as a unit-to-be-repaired, and outputting as a repair_mapping; S2, strip read operation mapping: reading data in the repair_mapping, mapping same to a shard required for data recovery, and outputting as a strip_mapping. The present invention utilizes a means of operation mapping to separate a repair operation from a data source, coupling and complexity are reduced, and on this basis a strip cache and a shard cache are utilized to improve lookup efficiency, and an IO aggregator is utilized to combine small IOs, improving write efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

A data recovery method for EC replica hybrid redundant storage Technical Field

[0001] The present invention belongs to the technical field of data processing, and in particular relates to a data recovery method for EC replica hybrid redundant storage. Background Art

[0002] Erasure coding (EC) is a data redundancy and error correction technology that improves data reliability and fault tolerance by adding redundant data blocks. It divides the original data into multiple stripes, each stripe into multiple blocks (units), and generates parity data blocks for each stripe, storing them in data shards on different devices. When data is corrupted or lost, the parity data blocks can be used for recovery. However, when data is modified, the parity blocks must be recalculated for the entire unit being modified, resulting in excessive computational overhead.

[0003] Currently, in append-only file systems, a method can avoid excessive computational overhead by using a hybrid redundant storage method called EC and replicas. This method stores data that doesn't fill a stripe in replicas. As data is appended until the stripe is full, parity block calculation is performed, thus reducing computational overhead. Figure 1 shows a hybrid storage architecture using EC4+2 and replicas for a file that is not stripe-aligned. Strips 1 through 5 contain the data in the full stripe. Shards 1 through 4 store the original data units, while shards 5 and 6 store the parity data calculated using EC. Since stripe 6 does not fill the stripe, all units n and m are stored in replicas in shards 5 and 6, respectively.

[0004] Although the hybrid storage of EC and replicas reduces the cost of EC calculations and saves IO times, it will bring greater complexity when recovering data. First, it is necessary to determine whether the data source is directly reading replica data or EC data, or a mixture of the two. It is also necessary to determine whether the written data needs to be calculated by the check block. The process is much more complicated than traditional EC data recovery.

[0005] Summary of the Invention

[0006] The present invention aims to provide a data recovery method for EC replica hybrid redundant storage, aiming to address the increased complexity associated with data recovery in existing technologies. First, it must determine whether the data source is directly read from replica data, EC data, or a mixture of the two. It also requires determining whether the written data requires parity block calculation, among other issues. This process is significantly more complex than traditional EC data recovery.

[0007] To achieve the above object, the present invention provides the following technical solutions:

[0008] A data recovery method for EC replica hybrid redundant storage, comprising:

[0009] Step S1: Unit repair operation and data source mapping:

[0010] First, bind the data source and data operation required to repair a specific unit. The input is the unit to be repaired, and the output is repair_mapping.

[0011] Step S2: Strip read operation mapping:

[0012] Read the data in repair_mapping, map it to the shard required for data recovery, and output it as strip_mapping;

[0013] Step S3: IO aggregation and data flushing:

[0014] According to the data and operation sets mapped in steps S1 and S2, the original shard data is read, and then EC recovery and data flushing are performed.

[0015] As a preferred solution of the present invention, the step S1 includes a tuple of strip_req, repair_op.

[0016] As a preferred solution of the present invention, in step S2, strip_req data in repair_mapping is read.

[0017] As a preferred solution of the present invention, the input in step S2 is strip_req.

[0018] As a preferred solution of the present invention, strip_req in step S1 is the source data strip required to complete the repair operation, and the data of one strip is used to repair one unit; the repair_op data operation in step S1 includes writing raw data WRITE_RAW_DATA and writing verification data WRITE_CODING_DATA.

[0019] As a preferred solution of the present invention, the input in step S2 is strip_req, and the output is strip_mapping, which is a tuple consisting of shard_req and strip_op, wherein

[0020] Shard_req refers to the shard data required to restore strip data. Restoring a strip requires data from multiple shards.

[0021] As a preferred solution of the present invention, the step of repairing Shard is also included, which is as follows:

[0022] Step a: Determine multiple units to be repaired, bind operation data to these units respectively, and aggregate strip_req;

[0023] Step b: Get the strip data from the strip cache. If the cache does not hit, proceed to the next step; otherwise, jump directly to step g.

[0024] Step c: Input the strip_req obtained in the previous step, obtain the shard operation, and aggregate the shard_req;

[0025] Step d: Get shard data from shard_cache. If the cache is not hit, read the shard data and put it into shard_cache. Otherwise, jump to step f.

[0026] Step e: Read Shard data and put it into shard_cache;

[0027] Step f, restore the Strip data and put it into strip_cache;

[0028] Step g: Perform a repair operation and write the data into the IO Aggregator;

[0029] Step h: If the shard has other shards that need to be repaired, skip to step a; otherwise, flush the data in the IO Aggregator.

[0030] As a preferred solution of the present invention, the repair_mapping in step S1 is specifically as follows:

[0031] As a preferred solution of the present invention, the strip_mapping in step S2 is specifically as follows.

[0032] As a preferred solution of the present invention, the strip_op includes recovering from the checksum and reading the original data.

[0033] Yet another embodiment of the present application provides a storage medium storing a computer program, wherein the computer program is configured to implement any of the above methods when executed.

[0034] Yet another embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement any of the above methods.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] 1. This invention uses operation mapping to separate the repair operation from the data source, reduce coupling, and reduce complexity. On this basis, it uses strip cache and shard cache to improve search efficiency, and uses IO Aggregator to merge small IOs to improve write efficiency.

[0037] 2. Compared to existing technologies, this invention uses two mapping operations to map the data to be repaired to the existing data, isolating the complex data distribution across shards encountered during EC file repair. This approach offers clear logic and simple implementation, reducing system implementation complexity. Furthermore, the mapping relationships between target units and logical strips, and between logical strips and target shards, output from these two mapping operations, facilitate cache design. When multiple shards of a file need to be repaired, this approach reduces EC decoding and I / O overhead, improving overall performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0039] FIG1 is a schematic diagram of a system for hybrid storage of EC4+2 and replicas in a data recovery method for hybrid redundant storage of EC replicas according to the present invention;

[0040] FIG2 is a schematic diagram A of a data structure in a data recovery method for EC replica hybrid redundant storage according to the present invention;

[0041] FIG3 is a schematic diagram B of a data structure in a data recovery method for EC replica hybrid redundant storage according to the present invention;

[0042] FIG4 is a flowchart of a data recovery method for EC replica hybrid redundant storage according to the present invention. DETAILED DESCRIPTION

[0043] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0044] Example 1

[0045] Please refer to Figures 1 to 4. The present invention provides the following technical solutions:

[0046] A data recovery method for EC replica hybrid redundant storage, comprising:

[0047] Step S1: Unit repair operation and data source mapping:

[0048] First, bind the data source and data operation required to repair a specific unit. The input is the unit to be repaired, and the output is repair_mapping.

[0049] Step S2: Strip read operation mapping:

[0050] Read the data in repair_mapping, map it to the shard required for data recovery, and output it as strip_mapping;

[0051] Step S3: IO aggregation and data flushing:

[0052] According to the data and operation sets mapped in steps S1 and S2, the original shard data is read, and then EC recovery and data flushing are performed.

[0053] In a specific embodiment of the present invention, compared to existing technologies, two mapping operations are performed to map the data to be repaired to the existing data, isolating the complex data distribution of each shard encountered during the EC file repair process. This approach offers clear logic and simple implementation, reducing system implementation complexity. Furthermore, the mapping relationships between the target unit and the logical strip, and between the logical strip and the target shard, output from the two mapping operations, facilitate cache design. When multiple shards of a file need to be repaired, EC decoding and I / O overhead can be reduced, improving overall performance.

[0054] A unit repair operation refers to the repair or replacement of a unit (or module), a common hardware maintenance method. Data source mapping refers to the process of mapping data from one form or structure to another, which typically involves data conversion or data processing. In a unit repair operation, data source mapping may involve backing up or copying the data of the failed unit to a spare unit, or obtaining data from other normally operating units and using it to replace the failed unit. This mapping process ensures data integrity and consistency, avoiding data loss or data inconsistencies during the repair process. When performing a unit repair operation, it is recommended to refer to relevant operating guidelines and procedures to ensure the correctness and security of the operation. At the same time, for unit repair operations involving data source mapping, it is recommended to back up data before execution and ensure data integrity and consistency.

[0055] In electrical engineering and computer science, the term "strip" is often used to refer to data or signals that have had certain elements or characteristics removed. In file reading operations, stripping is often used to remove whitespace or specific characters from both ends of a string. For example, Python's strip() function can be used to remove leading and trailing whitespace from a string. Data mapping operations involve "stripping" or "trimming" data or signals to remove unwanted elements or characteristics. This involves multiple steps, including reading, parsing, filtering, and transforming data.

[0056] I / O aggregation and data flushing are two concepts in the field of computer storage:

[0057] I / O aggregation essentially combines multiple input / output (IO) requests into a single request, thereby reducing the number of accesses to storage devices. In computer systems, IO requests typically refer to read and write operations on storage devices (such as hard drives, solid-state drives, and memory). These operations typically require mechanical or electronic movement of the storage device, making them time-consuming and prone to causing performance bottlenecks. By aggregating multiple IO requests into a single request, the number of storage device accesses can be reduced, improving overall system performance.

[0058] Data flushing refers to writing data from the cache to a disk or SSD. In computer systems, cache refers to an area of ​​memory that allows for rapid data storage and retrieval. Once data is written to the cache, the system writes it from the cache to the disk or SSD based on a specific policy. This process is called data flushing. During data flushing, the system determines the order and frequency of flushing based on factors such as data access frequency and importance to ensure data reliability and performance.

[0059] In WPS AI, the concepts of IO aggregation and data flushing may involve its internal processing mechanisms and storage device optimization. For example, WPS AI may aggregate multiple IO requests to reduce the number of storage device accesses, thereby improving overall performance. Furthermore, after data is written to the cache, WPS AI may flush this data to the disk or SSD based on specific policies to ensure data reliability and performance.

[0060] Specifically, the data recovery method for EC replica hybrid redundant storage mainly includes:

[0061] Unit repair operation and data source mapping

[0062] This step binds the data source and data operation required to repair a specific unit. The input is the unit to be repaired, and the output is repair_mapping, which contains a tuple of (strip_req, repair_op).

[0063] Strip read operation mapping

[0064] This step maps the strip_req in repair_mapping to the shard required to recover the data. The output is strip_mapping, which is a tuple consisting of (shard_req[n], strip_op).

[0065] IO aggregation and data flushing

[0066] This step reads the original shard data, performs EC recovery, and flushes data based on the data-operation set mapped in 1 and 2. This involves updating each cache and IO aggregation.

[0067] In this embodiment, the present invention uses an operation-bound data source approach to split the complex repair logic process into several independent logic processes, making each independent logic as simple and reliable as possible. Because the logical mapping decouples the repair write operation from the repair data source acquisition, it can more conveniently perform read and write IO aggregation and process data caching. The repair process is performed for each unit. Specifically, there are the following sub-processes:

[0068] Sub-process 1: Unit repair operation and data source mapping

[0069] This step binds the data source and data operation required to repair a specific unit. The input is the unit to be repaired, and the output is repair_mapping, which contains a tuple of (strip_req, repair_op). Its structure is shown in Table 1 below:

[0070] Table 1

[0071] The strip_req parameter represents the source data strip required to complete the repair operation. Repairing a unit requires data from at most one strip. The repair_op parameter has two types of data operations: write raw data (WRITE_RAW_DATA) and write coding data (WRITE_CODING_DATA). This parameter only associates the unit to be repaired with a logical strip and does not address how the strip data is obtained.

[0072] As shown in Figure 2:

[0073] If the repair target is unitA, the repair_mapping obtained by the process mapping is shown in Table 2 below:

[0074] Table 2

[0075] If the repair target is unit B, the repair_mapping obtained by the process mapping is shown in Table 3 below:

[0076] Table 3

[0077] Sub-process 2: Strip read operation mapping

[0078] The strip_req bound in sub-process 1 relies on the original Strip data. However, in practice, Strip data may be incomplete and may need to be restored. Therefore, obtaining Strip data also uses the operation and data binding method. Its input is strip_req, and its output is strip_mapping, which is a two-tuple consisting of (shard_req[n], strip_op). Its structure is shown in Table 4 below:

[0079] Table 4

[0080] The shard_req parameter specifies the shard data required to recover strip data. Since recovering a strip typically requires data from multiple shards, the shard_req parameter is in array form. The strip_op parameter includes the following two types: recovering from a checksum (EC_DECODE) and reading raw data (READ_RAW_DATA).

[0081] As shown in Figure 3:

[0082] If strip_req is 4KB to 8KB of data from strip 6, it can be directly read from the replica data stored in shard 6. The resulting mapping is shown in Table 5. If strip_req is 4KB to 12KB of data from strip 5, and EC recovery is required due to a missing strip 5, the resulting mapping is shown in Table 6.

[0083] Table 5

[0084] Table 6

[0085] It should be noted that: in this embodiment, the default size of each unit is 4k

[0086] Specifically, it also includes the steps for repairing Shard, as follows:

[0087] Step a: Determine multiple units to be repaired, bind operation data to these units respectively, and aggregate strip_req;

[0088] Step b: Get the strip data from the strip cache. If the cache does not hit, proceed to the next step; otherwise, jump directly to step g.

[0089] Step c: Input the strip_req obtained in the previous step, obtain the shard operation, and aggregate the shard_req;

[0090] Step d: Get shard data from shard_cache. If the cache is not hit, read the shard data and put it into shard_cache. Otherwise, jump to step f.

[0091] Step e: Read Shard data and put it into shard_cache;

[0092] Step f, restore the Strip data and put it into strip_cache;

[0093] Step g: Perform a repair operation and write the data into the IO Aggregator;

[0094] Step h: If the shard has other shards that need to be repaired, skip to step a; otherwise, flush the data in the IO Aggregator.

[0095] In this embodiment: Repair overall process

[0096] In the present invention, the main process of Shard repair is performed as described below:

[0097] Step 1: Determine multiple units to be repaired, execute sub-process 1 on each of these units to perform data binding, and aggregate strip_req;

[0098] The second step is to get the strip data from the strip cache. If the cache does not hit, it will execute the next step, otherwise it will jump to the seventh step.

[0099] The third step calls sub-process 2, inputs the strip_req obtained in the previous step, obtains the shard operation, and aggregates the shard_req;

[0100] The fourth step is to obtain shard data from shard_cache. If the cache is not hit, proceed to the next step, otherwise jump to step 6;

[0101] Step 5: Read Shard data and put it into shard_cache;

[0102] Step 6: Restore the Strip data and put it into strip_cache;

[0103] Step 7: Perform the repair operation and write the data into the IO Aggregator;

[0104] Step 8: If the shard has other shards that need to be repaired, skip to step 1. Otherwise, flush the data in the IO Aggregator.

[0105] Compared to existing technologies, this invention uses two mapping operations to map the data to be repaired to the existing data, isolating the complex data distribution across shards encountered during EC file repair. This approach offers clear logic and simple implementation, reducing system implementation complexity. Furthermore, the mapping relationships between target units and logical strips, and between logical strips and target shards, output from these two mapping operations, facilitate cache design. When multiple shards of a file need to be repaired, this approach can reduce EC decoding and I / O overhead, improving overall performance.

[0106] In Elasticsearch, a mapping defines how documents are indexed and searched. It allows you to specify which fields are indexed, how they should be analyzed, and whether they should be stored for full-text search.

[0107] Basic operations of Mapping:

[0108] 1. Create a Mapping: To create an index, you need to define a Mapping. For example, the following code creates an index named "customer" with two fields: "name" (which will be analyzed and stored for full-text search) and "age" (which will only be stored and not analyzed):

[0109] 2. Update Mapping: If you need to update an existing Mapping, you can use the PUT method. For example, the following code adds a new field named "email" to the Mapping of the existing "customer" index:

[0110] ```bash

[0111] PUT / customer / _mapping{"properties":{"email":{"type":"text"}}}

[0112] ```

[0113] 3. Batch query: You can use curl to batch query all mappings. For example, the following code can query the mappings of all indexes:

[0114] ```bash

[0115] curl-X GET"localhost:9200 / _mapping"

[0116] ```

[0117] If you need to query a specific index and its mapping, you can specify the index in the curl command. For example, the following code can query the mapping of the index named "customer":

[0118] ```bash

[0119] curl-X GET"localhost:9200 / customer / _mapping"

[0120] ```

[0121] The method of the present invention has been used in the Lava storage engine to implement EC replica hybrid redundant Chunk repair in a distributed system. The main process is executed on one node, and data is exchanged between nodes through RPC. It plays a core role in processes such as Chunk Seal and PG Recovery. The repair operation and data source are separated by operation mapping to reduce coupling and complexity. On this basis, strip cache and shard cache are used to improve search efficiency. IO Aggregator is used to merge small IOs to improve write efficiency. The implementation is simple, the logic is clear, and it supports read and write IO aggregation to reduce IO overhead. Multi-level cache can improve EC computing efficiency and reduce repeated IO. The repair process and source data acquisition process are decoupled to simplify the repair operation. The read IO is aggregated through operation-data binding, and the write IO is aggregated through IO Aggregator, which can save EC Decode and IO overhead and improve overall performance.

[0122] An embodiment of the present invention further provides a storage medium, in which a computer program is stored. The computer program is configured to implement the steps of any of the above method embodiments when running.

[0123] Specifically, in this embodiment, the above-mentioned storage medium may be configured to store a computer program for performing the following steps:

[0124] Step S1: Unit repair operation and data source mapping:

[0125] First, bind the data source and data operation required to repair a specific unit. The input is the unit to be repaired, and the output is repair_mapping.

[0126] Step S2: Strip read operation mapping:

[0127] Read the data in repair_mapping, map it to the shard required for data recovery, and output it as strip_mapping;

[0128] Step S3: IO aggregation and data flushing:

[0129] According to the data and operation sets mapped in steps S1 and S2, the original shard data is read, and then EC recovery and data flushing are performed.

[0130] Specifically, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0131] Compared with the existing technology, the present invention uses an operation mapping method to separate the repair operation from the data source, reduce coupling, and lower complexity. On this basis, strip cache and shard cache are used to improve search efficiency, and IO Aggregator is used to merge small IOs to improve write efficiency. Compared with current technology, two mapping operations are used to complete the mapping of the data to be repaired to the existing data, isolating the complex data distribution of each Shard encountered during the EC file repair process. It has clear logic and simple implementation, which can reduce the complexity of system implementation. At the same time, the mapping relationship between the target unit and the logical strip, and the mapping relationship between the logical strip and the target shard output in the two mapping operations facilitates the design of the cache. When multiple shards of a file need to be repaired, EC Decode and IO overhead can be saved, improving overall performance.

[0132] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments.

[0133] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0134] Specifically, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0135] Step S1: Unit repair operation and data source mapping:

[0136] First, bind the data source and data operation required to repair a specific unit. The input is the unit to be repaired, and the output is repair_mapping.

[0137] Step S2: Strip read operation mapping:

[0138] Read the data in repair_mapping, map it to the shard required for data recovery, and output it as strip_mapping;

[0139] Step S3: IO aggregation and data flushing:

[0140] According to the data and operation sets mapped in steps S1 and S2, the original shard data is read, and then EC recovery and data flushing are performed.

[0141] Compared with the existing technology, the present invention uses an operation mapping method to separate the repair operation from the data source, reduce coupling, and lower complexity. On this basis, strip cache and shard cache are used to improve search efficiency, and IO Aggregator is used to merge small IOs to improve write efficiency. Compared with current technology, two mapping operations are used to complete the mapping of the data to be repaired to the existing data, isolating the complex data distribution of each Shard encountered during the EC file repair process. It has clear logic and simple implementation, which can reduce the complexity of system implementation. At the same time, the mapping relationship between the target unit and the logical strip, and the mapping relationship between the logical strip and the target shard output in the two mapping operations facilitates the design of the cache. When multiple shards of a file need to be repaired, EC Decode and IO overhead can be saved, improving overall performance.

[0142] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0143] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0144] In the several embodiments provided by the present invention, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above-mentioned units is merely a logical functional division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0145] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0146] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0147] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the above-mentioned methods of each embodiment of the present invention. The aforementioned memory includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0148] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A data recovery method for EC replica hybrid redundant storage, characterized in that: include: Step S1: Unit repair operation and data source mapping: First, bind the data source and data operation required to repair a specific Unit. The input is the Unit to be repaired, and the output is repair_mapping. Step S2, Strip read operation mapping: Read the data in repair_mapping, map it to the shard required for data recovery, and output it as strip_mapping; Step S3: IO aggregation and data flushing: According to the data and operation set mapped in step S1 and step S2, the original shard data is read, and then EC recovery and data flushing are performed.

2. A data recovery method for EC replica hybrid redundant storage according to claim 1, characterized in that: The step S1 includes a tuple of strip_req and repair_op.

3. A data recovery method for EC replica hybrid redundant storage according to claim 2, characterized in that: In the step S2, strip_req data in repair_mapping is read.

4. A data recovery method for EC replica hybrid redundant storage according to claim 3, characterized in that: The input in step S2 is strip_req.

5. A data recovery method for EC replica hybrid redundant storage according to claim 4, characterized in that: In the step S1 , strip_req is the source strip of source data required to complete the repair operation, and one strip of data is used to repair one unit; the repair_op data operation in the step S1 includes writing raw data WRITE_RAW_DATA and writing verification data WRITE_CODING_DATA.

6. A data recovery method for EC replica hybrid redundant storage according to claim 5, characterized in that: In step S2, the input is strip_req, and the output is strip_mapping, which is a tuple consisting of shard_req and strip_op. Shard_req refers to the shard data required to restore strip data. Restoring a strip requires data from multiple shards. strip_op includes recovery from checksum and reading the original data.

7. A data recovery method for EC replica hybrid redundant storage according to claim 6, characterized in that: It also includes the steps for repairing Shard, as follows: Step a: Determine multiple units to be repaired, bind operation data to these units respectively, and aggregate strip_req; Step b, get the strip data from the strip cache, if the cache does not hit, then execute the next step, otherwise jump directly to step g; Step c: Input the strip_req obtained in the previous step, obtain the shard operation, and aggregate the shard_req; Step d, get shard data from shard_cache. If the cache is not hit, read the Shard data and put it into shard_cache. Otherwise, jump to step f. Step e: Read Shard data and put it into shard_cache; Step f, restore the Strip data and put it into strip_cache; Step g: Perform a repair operation and write the data into the IO Aggregator; Step h: If the shard has other shards that need to be repaired, jump to step a; otherwise, flush the data in the IO Aggregator.

8. The data recovery method for EC replica hybrid redundant storage according to claim 7, characterized in that: The repair_mapping in step S1 is specifically as follows: The strip_mapping in step S2 is specifically as follows.

9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to implement the method described in any one of claims 1 to 8 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the computer program to implement the method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Data recovery method and equipment

    CN108170555A

  • Automatic configuration block storage method based on distributed storage system

    CN110347344A

  • Data recovery verification method, device and equipment

    CN110795269A

  • IO processing method and device

    CN112256206A

  • Method and device for recovering erasure data in distributed storage system and medium

    CN115454711A

Cited By

  • Erasure code data updating method and system of distributed hybrid storage system

    CN119785857A