Data reconstruction method, device, apparatus and storage medium
By splitting the target data and storing redundant data shards across multiple storage nodes, the performance limitations of traditional data reconstruction methods are resolved, achieving more efficient data reconstruction.
Patent Information
- Application Number
- CN202210761621.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-06-30
Smart Images

Figure CN115454708B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data storage technology, and in particular to a data reconstruction method, apparatus, and storage medium. Background Technology
[0002] To meet the big data storage needs of servers and enterprise-level data storage systems, large-capacity storage systems such as disk arrays and solid-state drive arrays have emerged. These storage systems consist of multiple storage nodes (e.g., disks, solid-state drives), and when any one of these storage nodes fails, the data stored on that node needs to be reconstructed.
[0003] In traditional data reconstruction methods, the entire storage system is reconstructed using specific backup nodes. Therefore, the data reconstruction performance of the entire storage system is limited by the write performance of the specific backup nodes, resulting in long reconstruction times and low flexibility. Summary of the Invention
[0004] This application provides a data reconstruction method, apparatus, device, and storage medium, which can improve data reconstruction efficiency and performance. The technical solution is as follows:
[0005] Firstly, a data reconstruction method is provided, which includes:
[0006] If a failure is detected in the first storage node of the storage system, the data identifier of the target data to which the first target data fragment stored in the first storage node belongs is determined. The first storage node can be any storage node in the storage system. The target data is used to generate K target data fragments, M parity data fragments and R redundant data fragments. The K target data fragments, the M parity data fragments and the R redundant data fragments are stored in K+M+R storage nodes of the storage system respectively, where K, M and R are all positive integers.
[0007] Based on the data identifier, other target data fragments and the M verification data fragments are obtained from other storage nodes besides the first target data node included in the storage system. The other target data fragments refer to the other target data fragments besides the first target data fragment among the K target data fragments.
[0008] Based on the other target data fragments and the M verification data fragments, restore the first target data fragment;
[0009] The data content of the first target data fragment is written into the first redundant data fragment stored in the second storage node of the storage system. The second storage node is the storage node that stores the first redundant data fragment, and the first redundant data fragment is any one of the R redundant data fragments.
[0010] Optionally, all or part of the storage space of each storage node in the storage system is divided into N OGs, and the N OGs have the same storage space size. The K target data fragments, the M parity data fragments, and the R redundant data fragments are stored in the OGs of the K+M+R storage nodes of the storage system, respectively.
[0011] Optionally, the number of storage nodes in the storage system is greater than or equal to K+M+R, and the data fragment size of each data fragment in the K target data fragments, the M parity data fragments, and the R redundant data fragments is the same.
[0012] Optionally, the data identifier of the target data to which the first target data fragment stored in the first storage node belongs is determined, including:
[0013] Based on the data indexing relationship of the storage system, determine the first target data fragment stored in the first storage node and the data identifier of the target data to which the first target data belongs;
[0014] The data index relationship includes the index relationship of at least one original data written to the storage system. The target data is any one of the at least one original data. The index relationship of the target data is used to indicate the data identifier of the target data, the K target data fragments, the M check data fragments and the R redundant data fragments corresponding to the target data, and the storage node corresponding to each data fragment in the K target data fragments, the M check data fragments and the R redundant data fragments, and the data storage location in the corresponding storage node.
[0015] Optionally, based on the data identifier, other target data fragments and the M check data fragments are obtained from other storage nodes besides the first storage node included in the storage system, including:
[0016] From the index relationship of the target data, determine the storage node corresponding to each data fragment of the other target data fragment and the M verification data fragments, as well as the data storage location in the corresponding storage node;
[0017] Based on the storage node corresponding to each data fragment in the other target data fragment and the M verification data fragments, and the data storage location in the corresponding storage node, each data fragment is obtained from the corresponding storage node.
[0018] Optionally, all or part of the storage space in each storage node of the storage system is divided into multiple OGs. The K target data fragments, the M parity data fragments, and the R redundant data fragments are respectively stored in the OGs of the K+M+R storage nodes of the storage system. The data storage location includes the OG identifier of the OG in the storage node used to store the corresponding data fragment and the storage location of the corresponding data fragment in the OG.
[0019] Optionally, the K target data fragments and the M check data fragments are obtained by encoding the target data using a preset encoding algorithm. The first target data fragment is then reconstructed based on the other target data fragments and the M check data fragments, including:
[0020] The other target data fragments and the M check data fragments are decoded using a decoding algorithm corresponding to the preset encoding algorithm to obtain the first target data fragment.
[0021] Optionally, before determining the data identifier of the target data to which the first target data fragment stored in the first storage node belongs, the method further includes:
[0022] Based on the target data, generate the K target data fragments, the M verification data fragments, and the R redundant data fragments;
[0023] The K target data fragments and the M verification data fragments are stored in the K+M storage nodes of the storage system, respectively. The R redundant data fragments are reserved in the R storage nodes of the storage system. The R storage nodes correspond one-to-one with the R redundant data fragments. The R storage nodes are the storage nodes in the storage system other than the K+M storage nodes.
[0024] Optionally, based on the target data, the K target data fragments, the M verification data fragments, and the R redundant data fragments are generated, including:
[0025] The target data is encoded using a preset encoding algorithm to obtain the K target data fragments and the M check data fragments;
[0026] R blank data fragments are generated for the target data. These R blank data fragments are the R redundant data fragments.
[0027] Optionally, the K target data fragments and the M parity data fragments are stored in the K+M storage nodes of the storage system, and the R redundant data fragments are reserved in the R storage nodes of the storage system, including:
[0028] Using a preset load balancing algorithm, the storage node corresponding to each of the K data shards, the M parity data shards, and the R redundant data shards in the storage system, as well as the data storage location in the corresponding storage node, are determined. Different data shards correspond to different storage nodes.
[0029] The K data fragments and the M parity data fragments are stored in the data storage locations of the corresponding storage nodes, and a redundant data fragment is reserved in the corresponding storage location of the storage node corresponding to the R redundant data fragments.
[0030] Optionally, the size of each data fragment in the K data fragments, the M check data fragments, and the R redundant data fragments is a preset size. Before generating the K target data fragments, the M check data fragments, and the R redundant data fragments based on the target data, the method further includes:
[0031] For the data to be stored, the data to be stored is divided into at least one target data, and the data size of the target data is K * the preset size.
[0032] Secondly, a data reconstruction apparatus is provided, comprising:
[0033] The determination module is used to determine the data identifier of the target data to which the first target data fragment stored in the first storage node belongs if a failure of the first storage node in the storage system is detected. The first storage node can be any storage node in the storage system. The target data is used to generate K target data fragments, M parity data fragments and R redundant data fragments. The K target data fragments, the M parity data fragments and the R redundant data fragments are stored in K+M+R storage nodes of the storage system respectively, where K, M and R are all positive integers.
[0034] The acquisition module is used to acquire other target data fragments and the M verification data fragments of the target data from other storage nodes besides the first target data node included in the storage system. The other target data fragments refer to the other target data fragments besides the first target data fragment among the K target data fragments.
[0035] The first generation module is used to restore the first target data fragment based on the other target data fragments and the M verification data fragments;
[0036] The write module is used to write the data content of the first target data fragment into the first redundant data fragment stored in the second storage node. The second storage node is the storage node that stores the first redundant data fragment, and the first redundant data fragment is any one of the R redundant data fragments.
[0037] Optionally, all or part of the storage space of each storage node in the storage system is divided into N OGs, and the N OGs have the same storage space size. The K target data fragments, the M parity data fragments, and the R redundant data fragments are stored in the OGs of the K+M+R storage nodes of the storage system, respectively.
[0038] Optionally, the number of storage nodes in the storage system is greater than or equal to K+M+R, and the data fragment size of each data fragment in the K target data fragments, the M parity data fragments, and the R redundant data fragments is the same.
[0039] Optionally, the determining module is used for:
[0040] Based on the data indexing relationship of the storage system, determine the first target data fragment stored in the first storage node and the data identifier of the target data to which the first target data belongs;
[0041] The data index relationship includes the index relationship of at least one original data written to the storage system. The target data is any one of the at least one original data. The index relationship of the target data is used to indicate the data identifier of the target data, the K target data shards, the M check data shards and the R redundant data shards corresponding to the target data, and the storage node corresponding to each of the K target data shards, the M check data shards and the R redundant data shards and the data storage location in the corresponding storage node.
[0042] Optionally, the acquisition module is used for:
[0043] From the index relationship of the target data, determine the storage node corresponding to each data fragment of the other target data fragment and the M verification data fragments, as well as the data storage location in the corresponding storage node;
[0044] Based on the storage node corresponding to each data fragment in the other target data fragment and the M verification data fragments, and the data storage location in the corresponding storage node, each data fragment is obtained from the corresponding storage node.
[0045] Optionally, all or part of the storage space in each storage node of the storage system is divided into multiple OGs. The K target data fragments, the M parity data fragments, and the R redundant data fragments are stored in the OGs of different storage nodes of the storage system, respectively. The data storage location includes the OG identifier of the OG in the storage node used to store the corresponding data fragment and the storage location of the corresponding data fragment in the OG.
[0046] Optionally, the first generation module is used for:
[0047] The other target data fragments and the M check data fragments are decoded using the decoding algorithm corresponding to the preset encoding algorithm to obtain the first target data fragment.
[0048] Optionally, the device further includes:
[0049] The second generation module is used to generate the K target data fragments, the M verification data fragments, and the R redundant data fragments based on the target data.
[0050] The storage module is used to store the K target data fragments and the M verification data fragments into the K+M storage nodes of the storage system, respectively. The R redundant data fragments are reserved in the R storage nodes of the storage system. The R storage nodes correspond one-to-one with the R redundant data fragments. The R storage nodes are the storage nodes in the storage system other than the K+M storage nodes.
[0051] Optionally, the second generation module is used for:
[0052] The target data is encoded using a preset encoding algorithm to obtain the K target data fragments and the M check data fragments;
[0053] R blank data fragments are generated for the target data. These R blank data fragments are the R redundant data fragments.
[0054] Optionally, the storage module is used for:
[0055] Using a preset load balancing algorithm, the storage node corresponding to each of the K data shards, M parity data shards and R redundant data shards in the storage system and the data storage location in the corresponding storage node are determined. Different data shards correspond to different storage nodes or different data storage locations in the same storage node.
[0056] The K target data fragments and the M verification data fragments are stored in the K+M storage nodes of the storage system, respectively. The R redundant data fragments are reserved in the R storage nodes of the storage system. The R storage nodes correspond one-to-one with the R redundant data fragments. The R storage nodes are the storage nodes in the storage system other than the K+M storage nodes.
[0057] Optionally, the size of each data fragment in the K data fragments, the M check data fragments, and the R redundant data fragments is a preset size. The device further includes:
[0058] The segmentation module is used to segment the data to be stored into at least one target data, the size of which is K * the preset size.
[0059] Thirdly, a computer device is provided, the computer device including a memory, a processor, a computer program stored in the memory and executable on the processor, and a storage system including a plurality of storage nodes, wherein the computer program, when executed by the processor, implements any of the data reconstruction methods of the first aspect described above.
[0060] Fourthly, a computer-readable storage medium is provided that stores a computer program, which, when executed by a processor, implements any of the data reconstruction methods described in the first aspect.
[0061] The embodiments of this application have the following beneficial effects:
[0062] In this embodiment, for the target data to be stored, K target data fragments, M check data fragments, and R redundant data fragments can be generated first. These fragments are then stored in different storage nodes of the storage system. Subsequently, if a failure is detected in the first storage node of the storage system, the data identifier of the target data to which the first target data fragment stored in the first storage node belongs can be determined. Based on the data identifier, other target data fragments and M check data fragments of the target data are obtained from other storage nodes in the storage system. Then, based on the other target data fragments and M check data fragments, the first target data fragment is restored, and its data content is written into any redundant data fragment of the target data to complete the data reconstruction of the first storage node. In this way, different target data of the faulty storage node corresponds to different redundant data fragments, and the redundant data fragments of different target data can be allocated to different storage nodes other than the faulty storage node. In this way, when the entire storage system is reconstructing data, the storage nodes where the redundant data fragments corresponding to the data to be reconstructed are located can all participate in the data reconstruction, rather than only specific backup storage nodes can participate in the data reconstruction, thereby improving the data reconstruction efficiency and data reconstruction performance of the storage system. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 This is a schematic diagram of the structure of a computer device 100 provided in an embodiment of this application;
[0065] Figure 2 This is a schematic diagram of a storage array provided in an embodiment of this application;
[0066] Figure 3 This is a flowchart of a data writing method provided in an embodiment of this application;
[0067] Figure 4 This is a logical schematic diagram of a data writing process for a storage array provided in an embodiment of this application;
[0068] Figure 5 This is a flowchart of a data reconstruction method provided in an embodiment of this application;
[0069] Figure 6 This is a logical schematic diagram of a data reconstruction process for a storage array provided in an embodiment of this application;
[0070] Figure 7 This is a structural block diagram of a data reconstruction device provided in an embodiment of this application. Detailed Implementation
[0071] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0072] It should be understood that "multiple" as mentioned in this application refers to two or more. In the description of this application, unless otherwise stated, " / " indicates "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist, for example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, to facilitate a clear description of the technical solutions of this application, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and that "first," "second," etc., do not necessarily imply differences.
[0073] The data reconstruction method provided in this application is applied to a large-capacity storage system, which includes multiple storage nodes and can be a distributed storage system or a storage array, etc.
[0074] A distributed storage system comprises multiple independent storage devices to distribute data across these devices, thus allocating storage load across them. This not only improves the reliability, performance, and capacity of the storage system but also facilitates scalability. The storage nodes in a distributed storage system are called storage devices.
[0075] A storage array consists of multiple member disks, typically arranged in a matrix. The array stores data in striped / blocked chunks across these member disks. When accessing data, the relevant member disks operate simultaneously, significantly reducing access time and improving space utilization. The storage nodes in a storage array are called member disks. Each member disk stores not only data written to it externally but also data used for recovering data from other member disks.
[0076] For example, a storage array can be specifically a Redundant Array of Independent Disks (RAID), such as a SAS RAID; or a Redundant Array of Independent SSDs (RAIS), such as an NVMe SSD array or an mSATA SSD array; or a storage array that includes both RAID disks and SSDs. In a RAID array, the member disks are RAID disks; in a SSD array, the member disks are solid-state drives (SSDs). SSDs, also known as solid-state drives or solid disks, are hard drives made using arrays of solid-state electronic storage chips.
[0077] For ease of understanding, the following will use a storage system as a storage array and storage nodes as member disks as an example to illustrate the data reconstruction method provided in this application embodiment.
[0078] Figure 1 This is a schematic diagram of the structure of a computer device 100 provided in an embodiment of this application, as shown below. Figure 1 As shown, the computer device 100 includes a processor 10, a memory 20, and a storage array 30. The storage array 30 includes multiple member disks, such as member disk 0, member disk 1, ..., member disk n.
[0079] The memory 20 stores a computer program 21 that can run on the processor 10. When the processor 10 executes the computer program 21, it implements the data reconstruction method described in the embodiments of this application. For example, the processor 10 can execute the computer program 21 to reconstruct the data stored in the member disk 1 based on the data stored in other member disks when a failure is detected in the member disk 1 of the storage array 30.
[0080] Computer device 100 can be a general-purpose computer device or a special-purpose computer device. In specific implementations, computer device 100 can be a desktop computer, portable computer, network server, handheld computer, mobile phone, tablet computer, wireless terminal device, communication equipment, or embedded device. This application embodiment does not limit the type of computer device 100. Those skilled in the art will understand that... Figure 1 This is merely an example of computer device 100 and does not constitute a limitation on computer device 100. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0081] Processor 10 can be a Central Processing Unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0082] Storage array 30 can be a disk array or solid-state drive array, etc. Memory 20 is used to store the operating system, applications, boot loader, data, and other programs. Memory 20 can also be used to temporarily store data that has been output or will be output. It should be noted that Figure 1 only uses memory 20 as an example of a storage unit independent of storage array 30; of course, memory 20 can also be located within storage array 30, and this application does not limit this. Furthermore, in some embodiments, memory 20 can be an internal storage unit of computer device 100, such as the RAM of computer device 100. In other embodiments, memory 20 can also be an external storage device of computer device 100, such as a plug-in storage node, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on computer device 100. Further, memory 20 can include both internal storage units and external storage devices of computer device 100.
[0083] It should be understood that Figure 1This illustration only uses the example of a storage array located in a computer device. In other embodiments, the storage array may be located in other implementation environments, and this application does not limit this.
[0084] Figure 2 This is a schematic diagram of a storage array 30 provided in an embodiment of this application, as shown below. Figure 2 As shown, the storage array includes member disk 0, member disk 1, ..., member disk n.
[0085] As an example, some or all of the storage space of each member disk in storage array 30 can be divided into multiple OGs (Object Groups). OGs are used to store external data, i.e., to write external data.
[0086] As an example, a portion of the storage space of a member disk (the first storage space) can be divided into multiple OGs, and another portion of the storage space of the member disk (the second storage space) can be divided to store specific data, such as the data index relationship of storage array 30, or the index relationship of one or more target data.
[0087] As an example, the storage space of each member disk can be divided into N OGs (Original Groups). Here, N is a positive integer, and N can be set appropriately based on the storage node capacity. The storage space size of each OG can be the same, for example, all can be a first preset size. The first preset size can be set as needed, such as 4GB.
[0088] Before implementing the data reconstruction method described in the embodiments of this application, it is necessary to write data to the storage system in a specific manner. For ease of understanding, the data writing method provided in the embodiments of this application will be described in detail below.
[0089] Figure 3 This is a flowchart illustrating a data writing method provided in an embodiment of this application. This method is applied to a control unit in a storage system. For example, the control unit can be a controller for controlling a distributed storage system, or a processor for controlling a storage array. Figure 3 As shown, the method includes the following steps:
[0090] Step 301: For the target data to be stored, generate K target data fragments, M verification data fragments, and R redundant data fragments based on the target data.
[0091] Where K, M, and R are all positive integers, for example, K and M are positive integers greater than 1. K, M, and R can be set in advance as needed.
[0092] Here, K target data fragments are obtained by splitting the target data, that is, the target data can be split into K target data fragments.
[0093] The M verification data shards are used for data recovery, such as recovering data from one or more target data shards out of the K target data shards. For example, the M verification data shards are used to combine some data shards from the K target data shards to recover data from another set of data shards. For instance, they can combine data shards other than the first target data shard from the K target data shards to recover data from the first target data shard, where the first target data shard is any one of the K target data shards.
[0094] Among them, R redundant data shards are blank data shards, that is, the data stored in each redundant data shard is empty.
[0095] As an example, each of the K target data shards, M check data shards, and R redundant data shards has the same shard size, for example, a second preset size. This second preset size can be set as needed, such as 4MB.
[0096] As an example, the target data can first be encoded using a preset encoding algorithm to obtain K target data fragments and M parity data fragments. Then, R blank data fragments are generated for the target data; these R blank data fragments are the R redundant data fragments.
[0097] For example, the preset encoding algorithm can be the EC (Erasure Code) algorithm, and correspondingly, K, M, and R can be referred to as EC parameters. For the target data to be stored, the EC parameters can be determined first, and then the target data can be decoded according to the EC parameters to generate K target data fragments, M parity data fragments, and R redundant data fragments. It should be understood that the preset encoding algorithm can also be other encoding algorithms, and the embodiments of this application do not limit this.
[0098] The target data refers to the data to be written to the storage system. For example, the target data can be called "content". As an example, each of the K target data shards, M parity data shards, and R redundant data shards has the same shard size, which is the second preset size. Correspondingly, the size of the target data is K * the second preset size, for example, K * 4MB.
[0099] As an example, for data to be stored, it can first be divided into at least one target data with a data size of K * a second preset size, and then the target data can be written into the storage system according to the data writing method described in the embodiments of this application. The entity executing the division of the data to be stored into target data can be the control unit of the storage system, or other operating units, such as the file system driver of a computer device; this application does not limit this.
[0100] As an example, the number of storage nodes in the storage system is greater than or equal to K+M+R. This makes it easier to write K target data fragments, M parity data fragments, and R redundant data fragments to different storage nodes, thereby improving the reconstruction performance of the storage nodes.
[0101] Step 302: Store the K target data fragments, M parity data fragments, and R redundant data fragments into the K+M+R storage nodes of the storage system, respectively.
[0102] Different data shards correspond to different storage nodes. That is, different data shards in the K target data shards, M parity data shards and R redundant data shards can be stored in different storage nodes in the K+M+R storage nodes.
[0103] For example, K target data shards and M verification data shards are stored in K+M storage nodes of the storage system, and R redundant data shards are reserved in R storage nodes of the storage system. The R storage nodes correspond one-to-one with the R redundant data shards. The R storage nodes are the storage nodes in the storage system other than the above K+M storage nodes.
[0104] As an example, storing K target data fragments and M parity data fragments into K+M storage nodes of the storage system, and reserving R redundant data fragments in the R storage nodes of the storage system, includes the following steps:
[0105] 1) Using a preset load balancing algorithm, determine the storage node corresponding to each of the K data shards, M parity data shards, and R redundant data shards in the storage system, as well as the data storage location in the corresponding storage node.
[0106] The preset load balancing algorithm is used to distribute different data shards to different storage nodes based on the principle of load balancing. For example, the preset load balancing algorithm can be a hash algorithm, etc.
[0107] As an example, some or all of the storage space in each storage node is divided into multiple Object Groups (OGs). The data storage location in a corresponding storage node can include the OG identifier of the OG within that storage node, and it can also include the storage location of the corresponding data fragment within the OG. The storage location of the corresponding data fragment within the OG can be its storage sequence number within the OG.
[0108] As an example, a pre-defined load balancing algorithm can be used to determine the storage node identifier, OG identifier, and storage sequence number for each data shard among K data shards, M parity data shards, and R redundant data shards in the storage system. The storage node identifier indicates the storage node to which the corresponding data shard is to be written, the OG identifier indicates the OG to be written within the storage node to which the corresponding data shard is to be written, and the storage sequence number indicates the position or sequence number of the corresponding data shard within the OG to be written.
[0109] The storage node identifier can be the storage node name or ID, and the OG identifier can be the OG name or ID, etc. This application embodiment does not limit this.
[0110] As an example, storage sequence numbers can be assigned by OG according to the order of write requests for the corresponding shard data, thus resolving hash collisions.
[0111] In one possible implementation, assume that K+M+R data fragments (i.e., K target data fragments, M parity data fragments, and R redundant data fragments) have been generated based on Content(offset, length). These K+M+R data fragments are denoted as object[0], object[1], ..., object[K+M+R]. Here, Content refers to the target data, offset refers to the address offset of the target data, and length refers to the data length of the target data. Furthermore, the storage node ID is denoted as n, the OG ID as m, and the storage sequence number as p. Thus, n, m, and p can uniquely determine the location of a data fragment; that is, the location of a data fragment can be denoted as n, m, and p.
[0112] As an example, in determining the location of each data shard, we can first determine the intermediate variable t corresponding to each data shard, and then calculate n, m, and p corresponding to each data shard based on the intermediate variable t corresponding to each data shard.
[0113] For example, for shard_i (data shard i), the intermediate variable t of shard_i can be determined first using the following formula (1):
[0114] t=md5(offset+shard_id)%(DISK_NUM*OG_NUM) (1)
[0115] Where t is an intermediate variable of shard_i, md5 is a message digest algorithm, offset is the address offset of the target data or the address offset of shard_i, shard_id is the id of shard_i, DISK_NUM is the number of storage nodes, and OG_NUM is the number of OGs in the storage nodes.
[0116] Then, based on the intermediate variable t, the n and m corresponding to shard_id are determined using the following formulas (2) and (3):
[0117] n i =t / OG_NUM (2)
[0118] m i =t%OG_NUM (3)
[0119] Where, n i n is the id of the storage node corresponding to shard_id, i.e., the id of the storage node corresponding to data shard i; m i m is the ID of the OG in the storage node corresponding to shard_id, i.e., the ID of the OG in the storage node corresponding to data shard i.
[0120] After that, it can be done through m i The corresponding OG determines p based on the write request order of data shard i to the OG. i p i This refers to the storage sequence number of data shard i in the corresponding OG.
[0121] In addition, in determining p i After that, it is also possible to determine p i Is it greater than or equal to the maximum memory sequence number allowed to be written in OG? If not, then n will be obtained. i m i and p i As n, m, and p corresponding to shard_id; if so, then the intermediate variable t of shard_i is recalculated using the following formula (4):
[0122] id=md5(offset+shard_id+random(DISK_NUM*OG_NUM))%(DI SK_NUM*OG_NUM)(4)
[0123] Then, based on the recalculated intermediate variable t, recalculate ni, mi, and pi in the same manner as above, and then recalculate n. i m i and p i n, m, and p correspond to shard_id.
[0124] As an example, the maximum storage sequence number that OG allows to be written to is 1023.
[0125] As an example, the n, m, and p values corresponding to each data slice of the target data can be shown in Table 1 below:
[0126] Table 1
[0127]
[0128] 2) Store the K data shards and M parity data shards to the data storage locations of the corresponding storage nodes, and reserve one redundant data shard in the corresponding storage location of the storage nodes corresponding to the R redundant data shards.
[0129] As an example, in the process of storing K data shards and M parity data shards to their respective data storage locations on storage nodes, each data shard can be written into the OG (Original Group) of its corresponding storage node based on its storage node identifier, OG identifier, and storage sequence number. Furthermore, based on the storage node identifier, OG identifier, and storage sequence number of each redundant data shard, one redundant data shard is reserved at its corresponding storage location on each storage node, thus reserving R redundant data shards across R storage nodes.
[0130] Please refer to Figure 4 Assume K, M, and R are 3, 2, and 1 respectively, and the storage system is a storage array. The storage array includes member disk 0, member disk 1, ..., member disk 5, and each member disk includes n OGs, denoted as OG0, OG1, ..., OGn-1. The target data is encoded into 3 target data fragments: A, B, and C; 2 parity data fragments: P1 and P2; and 1 redundant data fragment R1. Then, A, B, C, P1, P2, and R1 are stored in the OGs of member disks 0, 1, ..., 5 respectively.
[0131] In addition, after the target data is written to the storage system, the index relationship of the target data can be determined, and the data index relationship of the storage system can be updated according to the index relationship of the target data. The data index relationship of the storage system includes the index relationship of at least one original data item written to the storage system, and the target data is one of these at least one original data item.
[0132] The index relationship of the target data is used to indicate the data identifier of the target data, the K target data shards, M check data shards and R redundant data shards corresponding to the target data, and the storage node and data storage location in the corresponding storage node for each data shard in the K target data shards, M check data shards and R redundant data shards.
[0133] For example, the index relationship of the target data includes the data identifier of the target data, as well as the offset address, fragment identifier, and location identifier of each fragment of the target data. Additionally, it may include the data type of each fragment. The data identifier of the target data can be the name, ID, or offset address of the target data, etc.; the fragment identifier can be the name or ID of the fragment data, etc.; and the location identifier of each fragment can be represented by m, p, and n.
[0134] For example, the indexing relationship of the target data can be shown in Table 2 below:
[0135] Table 2
[0136] Column Name type offset unsigned long long Shard_id unsigned int8 m unsigned int n unsigned int16 p unsigned int16
[0137] In this embodiment, by generating K target data fragments, M parity data fragments, and R redundant data fragments based on the target data to be written during data writing, and then storing these fragments on different storage nodes of the storage system, the redundancy of the storage system can be improved, allowing more storage nodes to participate in data reconstruction. Furthermore, the reliability of the storage system can be adjusted by flexibly changing the values of K, M, and R.
[0138] Figure 5 This is a flowchart of a data reconstruction method provided in an embodiment of this application. The method is applied to a control unit of a storage system, such as a controller for controlling a distributed storage system or a processor for controlling a storage array. Figure 5 As shown, the method includes the following steps:
[0139] Step 501: If a failure is detected in the first storage node of the storage system, determine the data identifier of the target data to which the first target data fragment stored in the first storage node belongs.
[0140] For example, the data identifier of the target data to which the first target data fragment stored on the first storage node belongs can be determined based on the data index relationship of the storage system. Here, the data index relationship includes the index relationship of at least one original data written to the storage system, and the target data is any one of the at least one original data.
[0141] The data identifier for the target data can be the target data's ID or name, etc.
[0142] Step 502: Based on the data identifier, obtain other target data fragments and M verification data fragments of the target data from other storage nodes besides the first storage node included in the storage system.
[0143] Among them, other target data fragments refer to the target data fragments other than the first target data fragment among the K target data fragments.
[0144] For example, the index relationship of the target data can be determined based on the data identifier of the target data. Based on the index relationship of the target data, other target data fragments and M parity data fragments of the target data can be obtained from other storage nodes besides the first storage node in the storage system.
[0145] Step 503: Restore the first target data fragment based on the other target data fragments and M verification data fragments.
[0146] As an example, assuming that the K target data fragments and M check data fragments are obtained by encoding the target data using a preset encoding algorithm, then the decoding algorithm corresponding to the preset encoding algorithm can be used to decode the other target data fragments and M check data fragments to obtain the first target data fragment.
[0147] Step 504: Write the data content of the first target data fragment into the first redundant data fragment stored in the second storage node of the storage system.
[0148] The second storage node is the storage node that stores the first redundant data shard, which is any one of the R redundant data shards. For example, the first redundant data shard is any unoccupied redundant data shard among the R redundant data shards, or it is the redundant data shard with the smallest corresponding shard ID among the unoccupied redundant data shards.
[0149] It should be noted that the first storage node may store multiple target data fragments. When the first storage node fails, each target data fragment stored in the first storage node can be reconstructed according to the data reconstruction method of the first target data fragment described above.
[0150] In addition, after writing the data content of the first target data fragment into the first redundant data fragment stored in the second storage node of the storage system, the data index of the target data can also be updated.
[0151] Please refer to Figure 4 Suppose that the target data X has been encoded into 3 target data fragments: X A X B and X C Two data parity fragments: X P1 and X P2 And one redundant data shard: X R1 And X A X B X C XP1 X P2 and X R1 The data has been written to the OG (Object Storage Group) on member disks 0, 1, ..., 5 respectively. The target data Y has been encoded into three target data fragments: Y A Y B and Y C Two data parity partitions: Y P1 and Y P2 And one redundant data shard: Y R1 And Y A Y B Y C Y P1 Y P2 and Y R1 These data have been written to the OG (Original Data Store) of member disks 0, 1, ..., 5. Subsequently, if a failure is detected in member disk 0, all target data fragments stored on member disk 0 need to be reconstructed. For example, if X needs to be reconstructed... A and Y C Perform data reconstruction. For X A X can be read from member disk 1, member disk 2, ..., member disk 4 respectively. B X C X P1 and X P2 Then for X B X C X P1 and X P2 Decode to obtain X A The corresponding backup data fragments will be X A The corresponding backup data fragment data content is written to member disk 5's X. R1 In, thus completing X A Data reconstruction for Y. C Y can be read from member disk 2, member disk 3..., member disk 5 respectively. A Y B Y P1 and Y P2 Then for Y A Y B Y P1 and Y P2 Decode to obtain Y C The corresponding backup data fragments will be Y C The data content of the corresponding backup data fragment is written to member disk 1's Y. R1 In, thus completing Y C Data reconstruction was performed. During this process, member disk 1 and member disk 5, which store redundant data shards, both participated in the data reconstruction.
[0152] In this embodiment, for the target data to be stored, K target data fragments, M check data fragments, and R redundant data fragments can be generated first. These fragments are then stored in different storage nodes of the storage system. Subsequently, if a failure is detected in the first storage node of the storage system, the data identifier of the target data to which the first target data fragment stored in the first storage node belongs can be determined. Based on the data identifier, other target data fragments and M check data fragments of the target data are obtained from other storage nodes in the storage system. Then, based on the other target data fragments and M check data fragments, the first target data fragment is reconstructed. The data content of the first target data fragment is written into any redundant data fragment of the target data to complete the data reconstruction of the first storage node. In this way, different target data of the faulty storage node corresponds to different redundant data fragments, and the redundant data fragments of different target data can be allocated to different storage nodes other than the faulty storage node. Thus, when the entire storage system is reconstructing data, the storage nodes participating in the data reconstruction are not fixed. All storage nodes where the redundant data fragments corresponding to the data to be reconstructed are located can participate in the data reconstruction, rather than only specific backup storage nodes can participate in the data reconstruction, thereby improving the data reconstruction efficiency and performance of the storage system.
[0153] Figure 7 This is a structural block diagram of a data reconstruction apparatus provided in an embodiment of this application. The apparatus can be integrated into the control unit of a storage system. This control unit can be a controller of a distributed storage system or a processor of a storage array, as described above. Figure 1 The processor in the system. See also Figure 7 The device includes: a determination module 701, an acquisition module 702, a first generation module 703, and a writing module 704.
[0154] The determination module 701 is used to determine the data identifier of the target data to which the first target data fragment stored in the first storage node belongs if a failure of the first storage node in the storage system is detected. The first storage node is any storage node in the storage system. The target data is used to generate K target data fragments, M parity data fragments and R redundant data fragments. The K target data fragments, the M parity data fragments and the R redundant data fragments are stored in K+M+R storage nodes of the storage system respectively, where K, M and R are all positive integers.
[0155] The acquisition module 702 is used to acquire other target data fragments and the M verification data fragments of the target data from other storage nodes besides the first target data node included in the storage system. The other target data fragments refer to the other target data fragments besides the first target data fragment among the K target data fragments.
[0156] The first generation module 703 is used to restore the first target data fragment based on the other target data fragments and the M verification data fragments;
[0157] The write module 704 is used to write the data content of the first target data fragment into the first redundant data fragment stored in the second storage node. The second storage node is the storage node that stores the first redundant data fragment, and the first redundant data fragment is any one of the R redundant data fragments.
[0158] Optionally, all or part of the storage space of each storage node in the storage system is divided into N OGs, and the N OGs have the same storage space size. The K target data fragments, the M parity data fragments, and the R redundant data fragments are stored in the OGs of the K+M+R storage nodes of the storage system, respectively.
[0159] Optionally, the number of storage nodes in the storage system is greater than or equal to K+M+R, and the data fragment size of each data fragment in the K target data fragments, the M parity data fragments, and the R redundant data fragments is the same.
[0160] Optionally, the determining module 701 is used for:
[0161] Based on the data indexing relationship of the storage system, determine the first target data fragment stored in the first storage node and the data identifier of the target data to which the first target data belongs;
[0162] The data index relationship includes the index relationship of at least one original data written to the storage system. The target data is any one of the original data. The index relationship of the target data is used to indicate the data identifier of the target data, the K target data shards, the M check data shards and the R redundant data shards corresponding to the target data, and the storage node and data storage location in the corresponding storage node for each data shard in the K target data shards, the M check data shards and the R redundant data shards.
[0163] Optionally, the acquisition module 702 is used for:
[0164] From the index relationship of the target data, determine the storage node corresponding to each data fragment of the other target data fragment and the M verification data fragments, as well as the data storage location in the corresponding storage node;
[0165] Based on the storage node corresponding to each data fragment in the other target data fragment and the M verification data fragments, and the data storage location in the corresponding storage node, each data fragment is obtained from the corresponding storage node.
[0166] Optionally, all or part of the storage space in each storage node of the storage system is divided into multiple OGs. The K target data fragments, the M parity data fragments, and the R redundant data fragments are stored in the OGs of different storage nodes of the storage system, respectively. The data storage location includes the OG identifier of the OG in the storage node used to store the corresponding data fragment and the storage location of the corresponding data fragment in the OG.
[0167] Optionally, the first generation module 703 is used for:
[0168] Using a decoding algorithm corresponding to the preset encoding algorithm, the other target data fragments and the M verification data fragments are decoded to obtain the backup data fragments corresponding to the first target data fragment.
[0169] Optionally, the device further includes:
[0170] The second generation module is used to generate the K target data fragments, the M verification data fragments, and the R redundant data fragments based on the target data.
[0171] The storage module is used to store the K target data fragments and the M verification data fragments into the K+M storage nodes of the storage system, respectively. The R redundant data fragments are reserved in the R storage nodes of the storage system. The R storage nodes correspond one-to-one with the R redundant data fragments. The R storage nodes are the storage nodes in the storage system other than the K+M storage nodes.
[0172] Optionally, the second generation module is used for:
[0173] The target data is encoded using a preset encoding algorithm to obtain the K target data fragments and the M check data fragments;
[0174] R blank data fragments are generated for the target data. These R blank data fragments are the R redundant data fragments.
[0175] Optionally, the storage module is used for:
[0176] Using a preset load balancing algorithm, the storage node corresponding to each of the K data shards, M parity data shards and R redundant data shards in the storage system and the data storage location in the corresponding storage node are determined. Different data shards correspond to different storage nodes or different data storage locations in the same storage node.
[0177] The K target data fragments and the M verification data fragments are stored in the K+M storage nodes of the storage system, respectively. The R redundant data fragments are reserved in the R storage nodes of the storage system. The R storage nodes correspond one-to-one with the R redundant data fragments. The R storage nodes are the storage nodes in the storage system other than the K+M storage nodes.
[0178] Optionally, the size of each data fragment in the K data fragments, the M check data fragments, and the R redundant data fragments is a preset size. The device further includes:
[0179] The segmentation module is used to segment the data to be stored into at least one target data, the size of which is K * the preset size.
[0180] In this embodiment, for the target data to be stored, K target data fragments, M check data fragments, and R redundant data fragments can be generated first. These fragments are then stored in different storage nodes of the storage system. Subsequently, if a failure is detected in the first storage node of the storage system, the data identifier of the target data to which the first target data fragment stored in the first storage node belongs can be determined. Based on the data identifier, other target data fragments and M check data fragments of the target data are obtained from other storage nodes in the storage system. Then, based on the other target data fragments and M check data fragments, the first target data fragment is restored, and its data content is written into any redundant data fragment of the target data to complete the data reconstruction of the first storage node. In this way, different target data of the faulty storage node corresponds to different redundant data fragments, and the redundant data fragments of different target data can be allocated to different storage nodes other than the faulty storage node. In this way, when the entire storage system is reconstructing data, the storage nodes where the redundant data fragments corresponding to the data to be reconstructed are located can all participate in the data reconstruction, rather than only specific backup storage nodes can participate in the data reconstruction, thereby improving the data reconstruction efficiency and data reconstruction performance of the storage system.
[0181] It should be noted that the data reconstruction device provided in the above embodiments is only illustrated by the division of the above functional modules when performing data reconstruction. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0182] The functional units and modules in the above embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of the embodiments of this application.
[0183] The data reconstruction apparatus and data reconstruction method embodiments provided in the above embodiments belong to the same concept. The specific working process and technical effects of the units and modules in the above embodiments can be found in the method embodiment section, and will not be repeated here.
[0184] This application also provides a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the steps in any of the above method embodiments.
[0185] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps in the various method embodiments described above.
[0186] This application provides a computer program product that, when run on a computer, causes the computer to perform the steps described in the various method embodiments above.
[0187] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above method embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate form. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographing device / terminal device, a recording medium, a computer memory, ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, and optical data storage devices. The computer-readable storage medium mentioned in this application can be a non-volatile storage medium; in other words, it can be a non-transient storage medium.
[0188] It should be understood that all or part of the steps of the above embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented in whole or in part as a computer program product. The computer program product includes one or more computer instructions. The computer instructions can be stored in the above-described computer-readable storage medium.
[0189] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0190] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0191] In the embodiments provided in this application, it should be understood that the disclosed apparatus / computer devices and methods can be implemented in other ways. For example, the apparatus / computer device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0192] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0193] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A data reconstruction method, characterized in that, The method includes: Based on the target data to be written, generate K target data fragments and M verification data fragments, and allocate R redundant data fragments to the target data; wherein, the R redundant data fragments are reserved blank data fragments, and each data fragment in the K target data fragments, the M verification data fragments and the R redundant data fragments has the same size, and K, M and R are all positive integers; The K target data fragments, M parity data fragments, and R redundant data fragments are stored in K+M+R storage nodes of the storage system, with each of the R storage nodes corresponding one-to-one with the R redundant data fragments. Each storage node in the storage system has all or part of its storage space divided into N OGs, all of which have the same storage size. The K target data fragments, M parity data fragments, and R redundant data fragments are stored in the OGs of the K+M+R storage nodes of the storage system. If a failure is detected in the first storage node of the storage system, the data identifier of the target data to which the first target data fragment stored in the first storage node belongs is determined; Based on the data identifier, other target data fragments and the M verification data fragments of the target data are obtained from other storage nodes besides the first storage node included in the storage system. The other target data fragments refer to the other target data fragments besides the first target data fragment among the K target data fragments. Based on the other target data fragments and the M verification data fragments, restore the first target data fragment; The data content of the first target data fragment is written into the first redundant data fragment stored in the second storage node of the storage system. The second storage node is the storage node that stores the first redundant data fragment, and the first redundant data fragment is any one of the R redundant data fragments.
2. The method as described in claim 1, characterized in that, The number of storage nodes in the storage system is greater than or equal to K+M+R, and the data fragment size of each data fragment in the K target data fragments, the M verification data fragments, and the R redundant data fragments is the same.
3. The method as described in claim 1, characterized in that, The step of determining the data identifier of the target data to which the first target data fragment stored in the first storage node belongs includes: Based on the data indexing relationship of the storage system, determine the first target data fragment stored in the first storage node and the data identifier of the target data to which the first target data belongs; The data index relationship includes the index relationship of at least one original data written to the storage system, the target data is any one of the at least one original data, the index relationship of the target data is used to indicate the data identifier of the target data, the K target data shards, the M check data shards and the R redundant data shards corresponding to the target data, and the storage node and data storage location in the corresponding storage node for each data shard in the K target data shards, the M check data shards and the R redundant data shards.
4. The method as described in claim 3, characterized in that, The step of obtaining other target data fragments and the M verification data fragments from other storage nodes besides the first storage node included in the storage system based on the data identifier includes: Based on the data identifier, determine the storage node corresponding to each data fragment of the other target data fragments and the M verification data fragments, as well as the data storage location in the corresponding storage node, from the index relationship of the target data. Based on the storage node corresponding to each of the other target data shards and the M verification data shards, and the data storage location in the corresponding storage node, each data shard is obtained from the corresponding storage node.
5. The method as described in claim 3, characterized in that, The data storage location includes the OG identifier in the storage node used to store the corresponding data fragment in the OG, and the storage location of the corresponding data fragment in the OG.
6. The method as described in claim 1, characterized in that, The K target data fragments and the M check data fragments are obtained by encoding the target data using a preset encoding algorithm. The step of restoring the first target data based on the other target data fragments and the M check data fragments includes: The other target data fragments and the M check data fragments are decoded using a decoding algorithm corresponding to the preset encoding algorithm to obtain the first target data fragment.
7. The method as described in claim 1, characterized in that, The step of generating K target data fragments and M verification data fragments based on the target data to be written, and allocating R redundant data fragments to the target data, includes: The target data is encoded using a preset encoding algorithm to obtain the K target data fragments and the M check data fragments; R blank data fragments are generated for the target data, and the R blank data fragments are the R redundant data fragments.
8. The method as described in claim 1, characterized in that, The step of storing the K target data fragments, the M verification data fragments, and the R redundant data fragments into K+M+R different storage nodes of the storage system includes: A preset load balancing algorithm is used to determine the storage node corresponding to each of the K target data shards, the M verification data shards, and the R redundant data shards in the storage system, as well as the data storage location in the corresponding storage node. Different data shards correspond to different storage nodes. The K target data fragments and the M verification data fragments are stored in the data storage locations of the corresponding storage nodes, and a redundant data fragment is reserved in the corresponding storage location of the storage node corresponding to the R redundant data fragments.
9. The method as described in claim 1, characterized in that, The data fragment size of each data fragment in the K target data fragments, the M verification data fragments, and the R redundant data fragments is a preset size. Before generating the K target data fragments and M verification data fragments according to the target data to be written, and allocating the R redundant data fragments to the target data, the method further includes: For the data to be stored, the data to be stored is divided into at least one target data, and the data size of the target data is K. The preset size.
10. A data reconstruction apparatus, characterized in that, The device includes: The write module is used to generate K target data fragments and M parity data fragments based on the target data to be written, and allocate R redundant data fragments to the target data; wherein, the R redundant data fragments are reserved blank data fragments, and each data fragment in the K target data fragments, the M parity data fragments, and the R redundant data fragments has the same size, and K, M, and R are all positive integers; the K target data fragments, the M parity data fragments, and the R redundant data fragments are stored in K+M+R storage nodes of the storage system, and the R storage nodes correspond one-to-one with the R redundant data fragments; wherein, all or part of the storage space of each storage node in the storage system is divided into N OGs, the N OGs have the same storage space size, and the K target data fragments, the M parity data fragments, and the R redundant data fragments are stored in the OGs of the K+M+R storage nodes of the storage system; The determination module is used to determine the data identifier of the target data to which the first target data fragment stored in the first storage node belongs if a failure is detected in the first storage node of the storage system. The acquisition module is configured to acquire other target data fragments and the M verification data fragments from other storage nodes besides the first storage node included in the storage system, based on the data identifier. The other target data fragments refer to other target data fragments besides the first target data fragment among the K target data fragments. The first generation module is used to restore the first target data fragment based on the other target data fragments and the M verification data fragments; The writing module is further configured to write the data content of the first target data fragment into the first redundant data fragment stored in the second storage node of the storage system, wherein the second storage node is the storage node storing the first redundant data fragment, and the first redundant data fragment is any one of the R redundant data fragments.
11. A computer device, characterized in that, The computer device includes a memory, a processor, a computer program stored in the memory and executable on the processor, and a storage system, the storage system including multiple storage nodes, wherein the computer program, when executed by the processor, implements the method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Data processing method and device
CN111381767A
