Change the error correction configuration

The flexible coding data management engine reorganizes the coded data blocks in the storage system, solving the problem of low erasure coding adjustment efficiency in the existing technology, and achieving efficient data recovery and resource optimization when the number of fault domains changes.

CN117194095BActive Publication Date: 2024-08-27HEWLETT PACKARD ENTERPRISE DEV LP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211279493.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2022-07-26
Filing Date
2022-10-19
Publication Date
2024-08-27
Estimated Expiration
2042-10-19

AI Technical Summary

Technical Problem

It is difficult for existing storage systems to efficiently adjust erasure coding when storage devices fail to cope with changes in the number of fault domains, resulting in low data recovery efficiency and high computing costs.

Method used

Adopts a flexible encoded data management engine that changes the erasure configuration by grouping multiple encoded data blocks into segments and reorganizing them between fault domains to adjust the number of fault domains without completely recomputing the encoded data, supporting Increase or decrease in the number of fault domains.

Benefits of technology

It achieves efficient adjustment of encoded data distribution when the storage system changes, improves data recovery capabilities and storage resource utilization, and reduces computing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117194095B_ABST
    Figure CN117194095B_ABST
Patent Text Reader

Abstract

The present disclosure relates to changing an error correction configuration. In some examples, a system groups a plurality of coded data blocks into first segments, each first segment including a number of the plurality of blocks, and the coded data is based on applying erasure coding to input data. The system stores the first segments in respective fault domains of a first number of fault domains in a first erasure configuration, wherein the first erasure configuration enables error recovery in response to coded data lost in a specified number of fault domains. The system changes from the first erasure configuration to a second erasure configuration by reorganizing the first segments into second segments, each second segment including a different number of coded data blocks than the first segment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to data processing. Background Art

[0002] A storage system may be used to store data. To avoid data loss, the data may be distributed across multiple storage devices in the storage system, and redundant data may be added so that the original data can be recovered when a storage device fails (partially or completely). The redundant data may be in the form of a copy of the original data, or may be in the form of coded data generated based on applying error correction coding to the original data. Summary of the invention

[0003] According to a first aspect of the present disclosure, a non-transitory machine-readable storage medium is disclosed, the non-transitory machine-readable storage medium comprising instructions, which when executed, cause a system to: group a plurality of coded data blocks into a plurality of first segments, each of the plurality of first segments comprising a number of blocks of the plurality of blocks, and the coded data is based on applying erasure coding to input data; store the plurality of first segments in corresponding fault domains of a first number of fault domains in a first erasure configuration, wherein the first erasure configuration enables error recovery in response to coded data lost in a specified number of fault domains; and change the erasure configuration from the first erasure configuration to a first erasure configuration by reorganizing the plurality of first segments into a plurality of second segments. A second erasure configuration, wherein each second segment of the plurality of second segments includes a different number of coded data blocks than a first segment of the plurality of first segments; storing the plurality of second segments in corresponding fault domains of a second number of fault domains in the second erasure configuration, wherein the second number is different from the first number; and changing the erasure configuration from the second erasure configuration to a third erasure configuration associated with a third number of fault domains that is less than the second number of fault domains, wherein changing the erasure configuration from the second erasure configuration to the third erasure configuration includes: copying the coded data blocks in the plurality of second segments to a plurality of third segments, and recalculating the coded data blocks to be added to the plurality of third segments.

[0004] According to a second aspect of the present disclosure, a system for data processing is disclosed, comprising: a processor; and a non-transitory storage medium storing instructions, wherein the instructions are executable on the processor to perform the following operations: grouping a plurality of coded data blocks into a first number of segments, each segment of the first number of segments including several blocks of the plurality of blocks, and the coded data is based on applying error correction coding to input data; storing segments of the first number of segments in corresponding fault domains of a first number of fault domains in a first error correction configuration, wherein the first number of segments supports data recovery in response to up to a specified number of lost segments of the first number of segments, and changing the error correction configuration from the first error correction configuration to a second number of segments by reorganizing the first number of segments into the second number of segments. Changing to a second error correction configuration, comprising: copying coded data blocks in the first number of segments to the second number of segments; and recalculating coded data blocks to be added to the second number of segments, wherein each segment in the second number of segments includes a larger number of coded data blocks than segments in the first number of segments; and storing the segments in the second number of segments in corresponding fault domains of a second number of fault domains in the second error correction configuration, wherein the second number is less than the first number, and the number of segments in the second number of segments is less than the number of segments in the first number of segments, and wherein the second number of segments supports data recovery in response to up to the specified number of lost segments of the second number of segments.

[0005] According to a third aspect of the present disclosure, a method of a system including a hardware processor is disclosed, the method comprising: grouping a plurality of erasure coded data blocks into a plurality of first segments, each of the plurality of first segments comprising a number of blocks of the plurality of blocks, and the erasure coded data is based on applying Reed-Solomon erasure coding to input data; storing the plurality of first segments in corresponding fault domains of a first number of fault domains in a first erasure configuration, wherein the first erasure configuration enables error recovery in response to erasure coded data lost in a specified number of fault domains; changing the erasure configuration from the first erasure configuration to the second erasure configuration by reorganizing the plurality of first segments into a plurality of second segments A second erasure configuration, comprising: copying the erasure coded data blocks in the plurality of first segments to the plurality of second segments; and recalculating the erasure coded data blocks to be added to the plurality of second segments, wherein the number of erasure coded data blocks included in each of the plurality of second segments is greater than the number of erasure coded data blocks included in the first segments of the plurality of first segments; and storing the plurality of second segments in corresponding fault domains of a second number of fault domains in the second erasure configuration, wherein the second number is less than the first number, and wherein the second erasure configuration enables error recovery in response to erasure coded data lost in the specified number of fault domains. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] Some embodiments of the disclosure are described with respect to the following figures.

[0007] Figure 1 is a block diagram of an arrangement including multiple failure domains and a flexible coding data management engine according to some examples of the present disclosure.

[0008] Figure 2 is a block diagram illustrating an arrangement including a greater number of fault domains according to some examples.

[0009] Figure 3 is a block diagram of a storage medium storing machine-readable instructions according to some examples.

[0010] Figure 4 is a block diagram of a system according to some examples.

[0011] Figure 5 is a flow diagram of a process according to some examples.

[0012] Throughout the drawings, the same reference numerals refer to similar, but not necessarily identical, elements. The drawings are not necessarily drawn to scale, and the dimensions of some parts may be exaggerated to more clearly illustrate the examples shown. In addition, the drawings provide examples and / or implementations consistent with the description; however, the description is not limited to the examples and / or implementations provided in the drawings. DETAILED DESCRIPTION

[0013] In the present disclosure, unless the context clearly indicates otherwise, the use of the terms "a / an" or "the" is intended to include the plural forms as well. Similarly, when used in the present disclosure, the terms "includes / including / comprises / comprising", "have / having" indicate the presence of stated elements, but do not exclude the presence or addition of other elements.

[0014] As used herein, "original data" may refer to a version of data that is intended to be written to a storage system via a write operation initiated by a requestor, which may be a user, program, or machine.

[0015] A storage system may include a number of physical storage devices. A "storage system" may also be referred to as a "storage pool," "storage array," or any other term that indicates the presence of multiple physical storage devices in a storage arrangement. Examples of storage devices may include any one or some combination of the following: disk-based storage devices, solid-state drives, and the like.

[0016] Applying erasure coding to the original data internally generates redundant coded data that can be used to recover the original data in the event of data loss (such as due to failure of the storage device (or part of the storage device), program error, malware attack or other reasons).

[0017] An example of an erasure code that can be used to protect data is a Reed-Solomon erasure code. In order to be able to recover n (n>1) original data blocks in the event of the loss of any m>0 blocks, the application of Reed-Solomon erasure coding can produce encoded data with n+m blocks, where m>0.

[0018] The n+m blocks are stored on n+m corresponding storage devices of the storage system. Each coded data block is stored on a different storage device of the storage system. As used herein, a "block" may refer to any portion of data divided from a larger data set (wherein the portion of data has a specified size). If the larger data set is not evenly divided into n blocks, the last block may be filled with zeros.

[0019] If at least n coded data blocks survive, then it is possible to recover the original data from the coded data. If n>>m (n is much larger than m), then the relative storage space overhead of adding m redundant data blocks is small, and data recovery can be efficient.

[0020] In some examples, d storage devices in a storage system may be used to store the encoded data, where d>n+2m. For example, data blocks of the encoded data may be distributed across d storage devices in the storage system for storage. Having more than n+m storage devices in the storage system allows the fault recovery system to ensure that even if several storage devices fail and cannot be replaced for a long period of time, the fault recovery system can still provide a desired level of data redundancy. The data blocks of the additional encoded data may be distributed differently across the d storage devices so that a roughly equal amount of data may be stored on each storage device.

[0021] In other examples, erasure codes other than Reed-Solomon erasure codes can define the use of m redundant data blocks to protect n original data blocks. Other codes such as Golay codes or Bose-Chaudhuri-Hocquenghem (BCH) codes can also be used. In the simplest extreme case, redundant data blocks are calculated based on performing an XOR operation on n original data blocks (or some modified version of the n original data blocks). The n+1 code formed using XOR in this way can be used to build a RAID-4 or RAID-5 storage system.

[0022] In general, n+m erasure codes support recovery of n original data blocks when up to m blocks are lost.

[0023] Conventionally, once a storage system is configured to support a particular erasure code, such as a Reed-Solomon erasure code comprising n+m blocks distributed across n+m block storage devices, the encoding of the data is fixed and does not change unless the data is completely replicated into a new form with new redundant data. In such an example, changing the encoding of the data (e.g., distributing encoded data based on the original data across a changed number of storage devices, e.g., due to adding storage devices to expand the storage capacity of the storage system) would involve recalculating the encoded data based on the entire set of original data, which is computationally expensive.

[0024] According to some embodiments of the present disclosure, a mechanism or technology is provided that supports flexible encoding of data for data protection, wherein, when a storage system changes, such as due to the addition or removal of storage devices, data encoding can be efficiently changed on the fly (for example, so that the encoded data can be distributed across a changed number of storage devices without completely recalculating the encoded data, and in some cases, only requiring rearranging the data and deleting some data).

[0025] More generally, flexible coded data generated by applying erasure coding (e.g., Reed-Solomon erasure coding) allows the number of failure domains to be changed by reorganizing coded data blocks, wherein the change in the number of failure domains can be implemented without having to recalculate any coded data, or by recalculating only a small amount of coded data while mostly reusing existing coded data blocks. Flexible coded data can be stretched to more failure domains or compressed to fewer failure domains.

[0026] Figure 1 is a block diagram of an example arrangement that includes a set of fault domains 102. A "fault domain" may refer to an entity associated with a data store, where data loss may potentially occur at the entity (e.g., due to a failure of the entity), and where the fault domain is part of a set of fault domains that enables data recovery from data loss in the fault domain. In some examples, the set of fault domains 102 may include a set of storage devices in a storage system. In other examples, the set of fault domains 102 may include a set of server computers or other machines, a set of programs (such as virtual machines or applications, etc.), and the like.

[0027] In an example where the set of fault domains 102 includes a set of server computers, the server computers are used to manage data access in storage devices. Each server computer can be connected to a corresponding set of storage devices (a single storage device or multiple storage devices), and the server computer manages data access in the connected set of storage devices. In an example shared-nothing arrangement, the set of storage devices connected to one server computer is not shared with any other server computer.

[0028] The failure of a given server computer in the set of server computers results in data loss. In the example of using n+m erasure coding in a set of n+m failure domains, an erasure code (such as a Reed-Solomon erasure code) can support data recovery from data loss in up to m failure domains.

[0029] The set of fault domains 102 may be part of an entire system 100 (or simply "system") that supports storage of data in a storage device. The system 100 may include a server computer coupled to the storage device. For example, the server computer may receive read and write requests from a requestor to access data in the storage device. Alternatively, the system 100 may be composed of a storage system including storage devices that the requestor can access without an intermediary such as a server computer.

[0030] In an example, system 100 may initially be constructed with a first number of fault domains 102 (e.g., a first number of server computers, a first number of storage devices, etc.). Over time, the number of fault domains in system 100 may change, either due to expansion where one or more new fault domains are added to system 100 (e.g., increasing storage capacity), or contraction where one or more existing fault domains are removed (e.g., due to data loss, maintenance, reduced storage capacity, etc.). Figure 1 , the added or removed fault domain(s) are represented as “changed fault domain(s) 104.” Thus, the changed fault domain(s) 104 may each represent a new fault domain that has been added or an existing fault domain that has been removed.

[0031] Note that there may be only one or more than one changed fault domain 104 (eg, due to adding multiple new fault domains, or removing multiple existing fault domains).

[0032] In an example, system 100 may start with a relatively small number of failure domains 102. To support m = 2 (where data recovery is possible in response to the loss of up to two failure domains 102), the number of non-redundant blocks is constrained such that n ≤ s - m, where s represents the number of failure domains 102. If s is relatively small (e.g., s = 4), the erasure coding technique used may be relatively inefficient because the number of redundant failure domains (e.g., 2) constitutes a large portion of the total number of failure domains 102 (e.g., 4). Alternatively, to increase the efficiency of storage resource use (e.g., a server computer or storage device), the value of m can be decreased, which reduces the number of tolerable failures.

[0033] As the number of failure domains increases (such as by adding new failure domains), it may become feasible to modify the erasure coding technique to obtain efficiency by increasing n or by increasing the number of tolerable failures (i.e., by increasing m) (e.g., by changing from a 2+2 erasure coding technique (n+m, where n = 2 and m = 2) to a 3+2 erasure coding technique (n+m where n = 3 and m = 2)).

[0034] Conversely, the number of failure domains may decrease, such as due to hardware failures or other problems. For example, a hardware failure or other problem occurring in a remote location where regular maintenance is difficult may mean that system 100 will have to continue operating for an extended period with the loss of at least one failure domain. If the data was initially stored across n + m failure domains, the loss of one or more failure domains may require reconfiguring system 100 to use n′ + m blocks, where n′ < n. Such reconfiguration can allow system 100 to maintain the same m failure margin without data loss, at the cost of reduced storage space use efficiency.

[0035] According to some embodiments of the present disclosure, system 100 includes a flexible coded data management engine 106 that supports reconfiguring the erasure code used in system 100 when the number of failure domains changes (increases or decreases). The flexible coded data management engine 106 is capable of changing the erasure code without having to recalculate the erasure code from scratch based on the entire data set stored in system 100. The flexible coded data management engine 106 supports reconfiguring the erasure code when system 100 scales up or down.

[0036] As used herein, "engine" may refer to a hardware processing circuit that may include any one or some combination of a microprocessor, a core of a multi-core microprocessor, a microcontroller, a programmable integrated circuit, a programmable gate array, or another hardware processing circuit. Alternatively, "engine" may refer to a combination of a hardware processing circuit and machine-readable instructions (software and / or firmware) executable on the hardware processing circuit.

[0037] like Figure 1 As further described in , the system 100 includes a memory 108 that stores information 110 of a current erasure configuration (which uses an existing erasure code) used in the system 100. The memory 108 can be implemented using a collection of memory devices (a single memory device or a plurality of memory devices). The memory device can include any one or some combination of the following: a dynamic random access memory (DRAM) device, a static random access memory (SRAM) device, a flash memory device, etc. In other examples, the information 110 of the current erasure configuration can be stored in another type of storage device, such as a disk-based storage device, a solid-state drive, etc.

[0038] The flexible coding data management engine 106 receives a request 112 to change to a new erasure configuration (which uses a new erasure code that is different from an existing erasure code). The request 112 can be provided by a user, a program, or a machine. For example, due to a change in the configuration of the system 100 (such as by adding a new fault domain or removing an existing fault domain), a user at a remote computing device can issue a request to the flexible coding data management engine 106 over a network.

[0039] In some examples of the present disclosure, the flexible coding data management engine 106 can group multiple coded data blocks 114 into segments 116. The coded data blocks 114 are coded data blocks generated by applying erasure coding to the original data. Applying erasure coding to the original data generates coded data, which can be divided into coded data blocks 114 to be stored on multiple failure domains 102.

[0040] A "segment" may refer to a collection of coded data blocks 114 (a single coded data block or multiple coded data blocks). Figure 1 , each segment 116 includes multiple coded data blocks 114. According to some embodiments of the present disclosure, a segmented erasure code (e.g., a segmented Reed-Solomon erasure code) includes n+m segments, where each segment includes q≥1 coded data blocks and is contained in a corresponding fault domain. In this arrangement, there are a total of nq+mq data blocks. In contrast, a traditional erasure code (e.g., a traditional Reed-Solomon erasure code) includes n+m coded data blocks. The segmented erasure code can prevent the loss of up to m segments.

[0041] In this example, it is assumed that 12 data blocks are encoded using Reed-Solomon erasure codes, so that the encoded data includes 12+12 encoded data blocks b1 to b 24 (nq=12 and mq=12 in this example):

[0042] [b1, b2, b3, ..., b 23 , b24 ]

[0043] In the example, the above coded data blocks are grouped into four segments, each segment contains q=6 data blocks, as shown below:

[0044] Segment 1 = [b1, b2, b3, b4, b5, b6],

[0045] Segment 2 = [b7, b8, b9, b 10 , b 11 , b 12 ],

[0046] Segment 3 = [b 13 , b 14 , b 15 , b 16 , b 17 , b 18 ],and

[0047] Segment 4 = [b 19 , b 20 , b 21 , b 22 , b 23 , b 24 ].

[0048] These four segments can be used to implement 2+2 segmented erasure coding (n+m, where n=2 and m=2). In this erasure coding, each segment includes multiple (q=6 in this example) coded data blocks, and the four segments are contained in the corresponding four failure domains. The 2+2 segmented erasure coding can prevent the loss of at most any 2 of the 4 segments, because any 2 segments contain 12 coded data blocks, which allows the recovery of 12 original data blocks.

[0049] When the system 100 is expanded by adding (multiple) new failure domains, the segmented erasure code can be reorganized to change the erasure configuration from the current erasure configuration (which uses the existing erasure code) to a new erasure configuration (which uses the new erasure code). The current erasure configuration may use the 2+2 segmented erasure code above. If an additional failure domain is added, the new erasure configuration uses a 3+2 segmented erasure code (n+m, where n=3 and m=2), where the coded data blocks are regrouped into five segments as shown below:

[0050] Segment 1 = [b1, b2, b3, b4],

[0051] Segment 2 = [b5, b6, b7, b8],

[0052] Segment 3 = [b9, b 10 , b 11 , b 12 ],

[0053] Segment 4 = [b 13 , b 14 , b 15 , b 16 ],and

[0054] Segment 5 = [b 17 , b 18 , b 19 , b2 0].

[0055] Note that these 5 segments are obtained by simply rearranging the data blocks used in the 2+2 code above and discarding the 4 encoded data blocks b 21 , b 22 , b 23 , b 24 After this reconfiguration, q = 4. If no more than 2 of these segments are lost, the remaining 3 segments will contain 12 data blocks, thus allowing recovery of the original data.

[0056] These five segments are contained in five failure domains. If another failure domain is added resulting in six failure domains, the new erasure configuration uses 4+2 segmented erasure codes (n+m, where n=4 and m=2), where the coded data blocks are regrouped into six segments (contained in the corresponding six failure domains), as shown below:

[0057] Segment 1 = [b1, b2, b3],

[0058] Segment 2 = [b4, b5, b6],

[0059] Segment 3 = [b7, b8, b9],

[0060] Segment 4 = [b 10 , b 11 , b 12 ],

[0061] Segment 5 = [b 13 , b 14 , b 15 ],and

[0062] Segment 6 = [b 16 , b 17 , b 18 ].

[0063] Note that these 6 segments are formed by rearranging the data blocks in the 2+2 or 3+2 code, except for the 4 coded data blocks that were previously discarded (b 21 , b 22 , b 23 , b 24), two other coded data blocks (b 19 and b 20 ). In this arrangement, q = 3. In other words, the above 4+2 segmented erasure code does not use the coded data block b 19 to b 24 .

[0064] If these six fault domains are increased to 14 fault domains, the new erasure configuration uses 12+2 segmented erasure codes (n+m, where n=12 and m=2), where the coded data blocks are regrouped into 14 segments (contained in the corresponding 14 fault domains), as shown below:

[0065] Segment 1 = [b1],

[0066] Segment 2 = [b2],

[0067] Section 3 = [b3],

[0068] Segment 4 = [b4],

[0069] Segment 5 = [b5],

[0070] Segment 6 = [b6],

[0071] Segment 7 = [b7],

[0072] Segment 8 = [b8],

[0073] Segment 9 = [b9],

[0074] Segment 10 = [b 10 ],

[0075] Segment 11 = [b 11 ],

[0076] Segment 12 = [b 12 ],

[0077] Segment 13 = [b 13 ],and

[0078] Segment 14 = [b 14 ].

[0079] The above 12+2 segmented erasure code does not use the coded data block b 19 To b 24 , but if only 12 segments are kept, the original data can be recovered.

[0080] In these examples, reorganization of the segmented erasure code is performed by simply copying the existing coded data blocks and discarding some of the coded data blocks to form new segments of the coded data blocks to support the new erasure code.

[0081] The above example starts with 24 coded data blocks (i.e., 12+12, where n=12 and m=12), which are encoded so that 12 coded data blocks (e.g., the first n blocks) can be recovered from any 12 of the first 24 coded data blocks. It can be seen that each erasure configuration includes at least 12 of the original 24 coded blocks, so that 12 original data blocks can be recovered in each erasure configuration.

[0082] A similar process can be used to convert an n+m segment erasure code with p data blocks per segment to any n′+m′ configuration with p data blocks per segment, as long as n′p′≥np. Furthermore, if (n′+m′)p′≤(n+m)p, then the conversion involves only reconfiguration and deletion of blocks. If (n′+m′)p′>(n+m)p, then in addition to rearrangement, some blocks are recomputed. For example, when converting from a 4+2 configuration with p=3 to a 3+2 configuration with p′=4, block b is recomputed. 19 and b 20 .

[0083] In the current erasure configuration, segments 116 are stored in a first number of failure domains 102. The current erasure configuration enables error recovery in response to lost segments in a specified number (m) of failure domains 102.

[0084] like Figure 2 As shown, in response to the request 112 , the flexible coded data management engine 106 changes the erasure configuration from the current erasure configuration to the new erasure configuration by reorganizing the segments 116 into additional segments 202 .

[0085] exist Figure 2 In the example of FIG. 1 , assume that the first number of fault domains 102 (before the change) is 4. Assume that one or more new fault domains 104 are added (in Figure 2 104). For 4 fault domains 102 including 4 corresponding segments 116, 2+2 erasure coding is supported. However, by adding two new fault domains 104, the system 100 is changed to include a second number of fault domains (in Figure 2 ), which includes 6 corresponding segments 202, so that the flexible coding data management engine 106 can change from a 2+2 erasure code (of the existing erasure configuration) to a 4+2 erasure code (of the new erasure configuration).

[0086] Note that each segment 202 includes a different number of encoded data blocks 114 than any segment 116 .

[0087] After reconfiguration, the flexible coded data management engine 106 stores the segments 202 in corresponding failure domains 102 and 104 (which constitute a second number of failure domains) to provide a new erasure configuration.

[0088] Although the examples discussed herein involve the application of erasure coding, the techniques or mechanisms according to some embodiments of rearranging coded data blocks into coded segments can also be applied to general error coding as well as erasure coding. In this more general case, it is usually unknown which segment may be corrupted, so only the corrected errors, among which is a function that returns the largest integer less than or equal to m / 2. Given coded data consisting of n+m blocks generated by error correction coding, if blocks are retained (of which is a function that returns the smallest integer greater than or equal to m / 2), then identification and correction of corrupted data can be performed.

[0089] Reed-Solomon Erasure Coding

[0090] Reed-Solomon erasure coding is described below.

[0091] The original data can be written as a matrix x with n rows, where each row contains k (k ≥ 1) values, each value has w bits. For example, w = 8 so that each value in the original data x or the encoded data r is an unsigned 8-bit integer (commonly referred to as a byte), and the original data x includes n blocks, each block contains k bytes.

[0092] In other examples, w may have different non-zero values.

[0093] In this representation, each row of x can be considered as a single block of data. The encoded data r is calculated by multiplying the encoding matrix A by the original data x:

[0094] Ax=r.

[0095] The encoding matrix A has n+m rows, so the size of r is (n+m)×k bytes. Note that the encoded data r has n+m rows (or equivalently n+m blocks in some examples).

[0096] For Reed-Solomon erasure coding, it can be done in the modular Galois field GF(2 w ) where addition is XOR and multiplication is modulo the primitive polynomial.

[0097] In some examples, A represents a systematic code in which the first n values ​​in r are the same as the values ​​in x. A systematic code is a code that, when applied to input data, produces an output code that consists partly of the input data and partly contains redundant information.

[0098] If A represents the system code, then A can be represented as the following structure:

[0099]

[0100] Among them, I n is the identity matrix with n rows, and F m,n is the specified encoding matrix. The identity matrix I n The first n rows of the encoded data r generated by multiplying the original data x are equal to the n rows of the original data x.

[0101] D m,n (which has m rows and n columns) when multiplied by the original data x, generates m rows of parity data p.

[0102] (Systematic code A) multiplied by the original data x produces the following encoded data r:

[0103]

[0104] In fact, the encoded data r can be written as the original data x and the m,n The concatenation of the parity data p generated by x.

[0105] If the parity data p is very small relative to x (the number of rows m of the parity data p is much smaller than the number of rows n of the original data x), then calculate p = F m,n x can be executed faster than using the non-systematic code A.

[0106] However, in other examples of the present disclosure, A may be a non-systematic code.

[0107] In some examples, F m,n can be a partial Vandermonde matrix as follows:

[0108]

[0109] Modulo Galois Field GF(2 w ) has the following properties: if n+m<2 w Then rank(A) = n. In fact, the rank A′ of any matrix created by selecting any n rows from A also has rank n. The fact that any n×n submatrix of A is full rank is useful in erasure correction, because if any n rows among the n+m rows of the coded data r are selected, the following equation is obtained:

[0110] A'x=r′.

[0111] Among them, the rows of A' (i.e., the submatrix of A) correspond to the rows of r' (i.e., the subset of r).

[0112] A matrix is ​​full rank if all its rows and columns are linearly independent.

[0113] Because A′ is full rank, A′ is reversible, and given the value of r′ and knowledge of which n rows survived (i.e., which n coded data blocks of the failure domain were not lost), the system can solve for x. The practical implication is that if any n of the n+m rows of the coded data r are preserved, the entire value of the original data x can be recovered. Further, since m may be small (e.g., much smaller than n), A′ may be almost the same as the identity matrix, so the full upper-lower (LU) decomposition used to derive x based on A′ and r′ can be performed efficiently. Specifically, because A represents the systematic code, the F that survives A′ can be decomposed by n,m The rest of A′ remains unchanged.

[0114] Flexible Reed-Solomon Erasure Coding

[0115] Some examples of flexible Reed-Solomon erasure coding according to some embodiments of the present disclosure are described below.

[0116] According to some examples of the present disclosure, the flexible Reed-Solomon erasure coding provided by the flexible coded data management engine 106 allows the erasure codes to be changed with significantly less computation than would be used to recompute the coded data from the entire set of original data.

[0117] In some examples, for n+m Reed-Solomon erasure codes, m can be set to 1, 2, or 3, and n≤12. Large values ​​of n (greater than 12) may result in negligible improvements in coding efficiency. The above constraints allow the construction of a family of related erasure codes based on Reed-Solomon encoded data, which can initially start with n=2 and increase the value of n to 3, 4, 6, or 12, for example by simply rearranging the coded data blocks (and discarding some of the coded data blocks).

[0118] Increasing the value of n may be performed in response to increasing the number of failure domains, such as by adding server computers or storage devices to the system 100 .

[0119] Although specific examples of n and m are given above, it should be noted that in other examples, the flexible coding data management engine 106 may use different values ​​of n and / or m according to some embodiments of the present disclosure.

[0120] In a specific example, the flexible coding data management engine 106 may define a basic coding structure of a 12+12 Reed-Solomon erasure code, which is represented line by line as follows:

[0121]

[0122] Among them, x1 to x 12 are 12 rows (or blocks) of the original data x, I1 to I 12 is the identity matrix I 12 (the identity matrix with 12 rows), F 12,12,1 to F 12,12,12 Yes F 12,12 The 12 sub-matrices of the matrix (F 12,12 The matrix has 12 rows and 12 columns), and r1 to r 12 It is by F m,n x generates 12 rows of parity data p. Here, I j Represents the identity matrix I n The jth row of F 12,12,j Indicates F 12,12 The jth row of j ,2 j ,…,n j ].

[0123] The representation of the above 12+12 Reed-Solomon erasure code can be rearranged in a piecewise form as follows:

[0124]

[0125] in, and There are four segments, each with 6 coded data blocks. and Each of the 6 "encoded data blocks" in the segment is actually a block of original data, and and Each of the 6 "coded data blocks" in is a parity block (p's block).

[0126] These four segments and Each of these can be Figure 1 An example of segment 116 is shown.

[0127] The 12+12 Reed-Solomon erasure code of the above form can be written in a more simplified form:

[0128]

[0129] in, and

[0130] The above form with four segments (in the corresponding 4 fault domains) It can be regarded as a 2+2 erasure code. These four segments are segment X 1…6 、Duan X 7…12 、Duan R1…6 and Section R 7…12 .

[0131] If a new fault domain is added to provide 5 fault domains, then the above erasure code can be rearranged into 5 corresponding segments X as follows 1…4 , X 5…8 , X 9…12 , R 1…4 and R 5…8 :

[0132]

[0133] These 5 segments can be Figure 2 An example of segment 202 is shown in .

[0134] Note that in these five segments, rows r9 to r1 of the parity data p are 12 has been discarded, and only 8 lines of encoded data (x1 to x 12 and r1 to r8). Also note that only 8 rows of F are used.

[0135] These 5 segments X 1…4 , X 5…8 , X 9…12 , R 1…4 and R 5…8 Each of the 5 segments includes 4 coded data blocks. The above 5 segments provide 3+2 erasure codes.

[0136] Note that by simply rearranging the rows x1 to x 12 , and discarding 4 rows of p, the 2+2 erasure code can be converted to a 3+2 erasure code.

[0137] A similar process can be used to create a 4+2 erasure code from a 3+2 erasure code as follows:

[0138]

[0139] Among them, the parity data p rows r7 to r 12 has been discarded, and only 6 lines of encoded data (x1 to x 12 and r1 to r8). Also note that only 6 rows of F are used.

[0140] The output of the 4+2 erasure correction (including 6 segments) can be obtained by rearranging the rows x1 to x 12 And discard 6 rows of parity data p and deduce them from the output of 3+2 erasure code. When converting from 3+2 erasure code to 4+2 erasure code, the 5 segments X corresponding to 3+2 erasure code 1…4 , X 5…8 , X9…12 , R 1…4 and R 5…8 is considered to be Figure 1 The segment 116 corresponds to the 6 segments X of the 4+2 erasure code. 1…3 , X 4…6 , X 7…9 , X 10…12 , R 1…3 and R 4…6 is considered to be Figure 2 Segment 202.

[0141] A similar process can be used to form a 6+2 erasure code from a 4+2 erasure code, and to form a 12+2 erasure code from a 6+2 erasure code.

[0142] According to some embodiments of the present disclosure, the conversion from n=2 to n=3 and finally to n=12 involves only copying and deletion, but not calculation of the encoded data.

[0143] In the opposite direction, to reduce the number of failure domains (e.g., by removing one or more failure domains), a small amount of computation may have to be performed. For example, a 4+2 erasure code can be converted to a 3+2 erasure code, where the 6 segments X corresponding to the 4+2 erasure code 1…3 , X 4…6 , X 7…9 , X 10…12 , R 1…3 and R 4…6 is considered to be Figure 1 The segment 116 corresponds to the 5 segments X of the 3+2 erasure code. 1…4 , X 5…8 , R 8…12 , X 1…4 and R 5…8 is considered to be Figure 2 Segment 202.

[0144] Please note that the 6 segments X corresponding to the 4+2 erasure code 1…3 , X 4…6 , X 7…9 , X 10…12 , R 1…3 and R 4…6 Rows r7 and r8 of the parity data p are missing because these rows are discarded when converted to 4+2 erasure code. Therefore, rows r7 and r8 of the parity data p form the five segments X corresponding to the 3+2 erasure code. 1…4 , X 5…8 , X 9…12 , R 1…4 and R 5…8 part of.

[0145] Note that only two rows of parity data p are calculated in this example, and it is not necessary to recalculate all rows of parity data p.

[0146] Further Example Implementations

[0147] Figure 3 is a block diagram of a non-transitory machine-readable or computer-readable storage medium 300 storing machine-readable instructions that, when executed, cause the system to perform various tasks. The system may include one computer or multiple computers.

[0148] The machine-readable instructions include first segment grouping instructions 302 for grouping a plurality of coded data blocks into a first segment (e.g., Figure 1 116 in the first segment), wherein each first segment includes several blocks of the plurality of blocks, and the encoded data is based on applying erasure coding to the input data.

[0149] The machine-readable instructions include first segment storage instructions 304 for storing a first segment in corresponding fault domains of a first number of fault domains in a first erasure configuration, wherein the first erasure configuration enables error recovery in response to encoded data lost in a specified number (m) of fault domains of the plurality of fault domains.

[0150] The machine-readable instructions include erasure configuration change instructions 306 for reorganizing the first segment into a second segment (e.g., Figure 2 202 in the example to change the erasure configuration from the first erasure configuration to the second erasure configuration. Each second segment includes a different number of coded data blocks from the first segment.

[0151] In some examples, reorganizing the first segment into the second segment to change to the second erasure configuration is performed without recalculating the encoded data based on the input data.

[0152] In some examples, the reorganization discards some of the plurality of coded data blocks to produce a remainder of the plurality of coded data blocks, wherein the machine-readable instructions group the remainder of the plurality of coded data blocks into a second segment.

[0153] The machine-readable instructions include second segment storing instructions 308 for storing the second segment in respective ones of a second number of failure domains in a second erasure configuration, wherein the second number is different than the first number.

[0154] In some examples, the first segment according to the first erasure configuration includes n1+m first segments, where n1 represents the number of input data segments that can be recovered in the presence of up to m lost coded data segments. The second segment according to the second erasure configuration includes n2+m first segments, where n2>n1, and n2 represents the number of input data segments that can be recovered in the presence of up to m lost coded data segments.

[0155] In some examples, the machine-readable instructions change the erasure configuration from the second erasure configuration to the third erasure configuration by reorganizing the second segments into third segments, each of the third segments including a different number of coded data blocks than a second segment of the second segments.

[0156] In some examples, the third erasure configuration includes a third number of failure domains, the third number being different than the second number.

[0157] In some examples, the machine-readable instructions change the erasure configuration from a second erasure configuration to a third erasure configuration associated with a third number of failure domains that is less than the second number of failure domains, wherein changing the erasure configuration from the second erasure configuration to the third erasure configuration includes copying the coded data blocks in the second segment to the third segment, and recalculating the coded data blocks to be added to the third segment.

[0158] In some examples, recalculating the block of encoded data to be added to the third segment includes recalculating less than the plurality of blocks.

[0159] In some examples, each of the third segments has a greater number of encoded data blocks than a second of the second segments.

[0160] In some examples, the first number of failure domains includes a first number of server computers or a first number of storage devices, and the second number of failure domains includes a second number of server computers or a second number of storage devices.

[0161] In some examples, the plurality of encoded data blocks includes a first number of input data blocks and a second number of parity data blocks calculated based on applying the encoding matrix to the input data.

[0162] Figure 4 is a block diagram of a system 400 according to some examples.

[0163] System 400 includes a hardware processor 402 (or multiple hardware processors). The hardware processor may include a microprocessor, a core of a multi-core microprocessor, a microcontroller, a programmable integrated circuit, a programmable gate array, or another hardware processing circuit.

[0164] System 400 includes storage media 404 storing machine-readable instructions executable on hardware processor 402 to perform various tasks. Machine-readable instructions executable on a hardware processor may refer to instructions executable on a single hardware processor or instructions executable on multiple hardware processors.

[0165] The machine-readable instructions in the storage medium 404 include first segment grouping instructions 406 for grouping a plurality of coded data blocks into a first number of segments, each segment of the first number of segments including a number of blocks of the plurality of blocks, and the coded data is based on applying error correction coding (e.g., erasure coding or other error correction coding) to the input data.

[0166] The machine-readable instructions in the storage medium 404 include first segment storage instructions 408 for storing segments of a first number of segments in corresponding fault domains of a first number of fault domains in a first error correction configuration, wherein the first number of segments supports data recovery in response to the loss of up to a specified number of segments of the first number of segments.

[0167] The machine-readable instructions in the storage medium 404 include error correction configuration change instructions 410 for changing the error correction configuration from a first error correction configuration to a second error correction configuration by reorganizing the first number of segments into a second number of segments, each segment in the second number of segments including a different number of encoded data blocks than the segments in the first number of segments.

[0168] The machine-readable instructions in the storage medium 404 include second segment storage instructions 412 for storing segments of a second number of segments in corresponding fault domains of a second number of fault domains in a second error correction configuration, wherein the second number is different from the first number and the number of segments in the second number of segments is different from the number of segments in the first number of segments, and wherein the second number of segments supports data recovery in response to the loss of up to a specified number of segments of the second number of segments.

[0169] Figure 5 is a flow diagram of a process 500 that may be performed by a system including a hardware processor.

[0170] The process 500 includes grouping (at 502) a plurality of blocks of erasure coded data into first segments, each of the first segments including a number of the plurality of blocks, and the erasure coded data is based on applying Reed-Solomon erasure coding to input data.

[0171] Process 500 includes storing (at 504) a first segment in respective ones of a first number of failure domains in a first erasure configuration. The first erasure configuration enables error recovery in response to erasure coded data lost in a specified number (m) of failure domains.

[0172] The process 500 includes changing (at 506) an erasure configuration from a first erasure configuration to a second erasure configuration by reorganizing the first segments into second segments, each of the second segments including a different number of erasure coded data blocks than a first segment of the first segments.

[0173] In some examples, changing the erasure configuration is responsive to a change in the number of failure domains due to the addition or removal of storage hardware (eg, server computers, storage devices, etc.).

[0174] Process 500 includes storing (at 508) the second segment in respective ones of a second number of failure domains in a second erasure configuration, wherein the second number is different than the first number, and wherein the second erasure configuration enables error recovery in response to erasure coded data lost in a specified number (m) of failure domains.

[0175] Storage media (e.g. Figure 3 300 or Figure 4 404) may include any one or some combination of the following: semiconductor memory devices, such as dynamic or static random access memory (DRAM or SRAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), and flash memory; magnetic disks, such as fixed disks, floppy disks, and removable disks; another magnetic medium, including magnetic tape; optical media, such as compact disks (CDs) or digital video disks (DVDs); or another type of storage device. Note that the instructions discussed above may be provided on one computer-readable or machine-readable storage medium, or alternatively, may be provided on multiple computer-readable or machine-readable storage media distributed in a large system with possibly multiple nodes. Such one or more computer-readable or machine-readable storage media are considered to be part of an article (or product). An article or product may refer to any manufactured single component or multiple components. One or more storage media may be located in a machine running machine-readable instructions, or at a remote site, from which machine-readable instructions may be downloaded over a network for execution.

[0176] In the foregoing description, many details are set forth to enable an understanding of the subject matter disclosed herein. However, embodiments may be practiced without some of these details. Other embodiments may include modifications and variations of the details discussed above. The appended claims are intended to cover such modifications and variations.

Claims

1. A non-transitory machine-readable storage medium comprising instructions that, when executed, cause a system to: grouping a plurality of coded data blocks into a plurality of first segments, each first segment of the plurality of first segments comprising a number of blocks of the plurality of blocks, and the coded data is based on applying erasure coding to input data; The plurality of first segments are stored in respective failure domains of a first number of failure domains in a first erasure configuration, wherein: The first erasure configuration enables error recovery in response to coded data lost in a specified number of failure domains; changing the erasure configuration from the first erasure configuration to a second erasure configuration by reorganizing the plurality of first segments into a plurality of second segments, each second segment of the plurality of second segments including a different number of coded data blocks than a first segment of the plurality of first segments; storing the plurality of second segments in respective ones of a second number of failure domains in the second erasure configuration, wherein the second number is different than the first number; and changing the erasure configuration from the second erasure configuration to a third erasure configuration associated with a third number of failure domains that is less than the second number of failure domains, wherein changing the erasure configuration from the second erasure configuration to the third erasure configuration comprises: copying the coded data blocks in the plurality of second segments to a plurality of third segments, and The coded data blocks to be added to the plurality of third segments are recalculated.

2. The non-transitory machine-readable storage medium of claim 1, wherein: The plurality of first segments according to the first erasure configuration includes n1+m first segments, wherein m represents the specified number and n1 represents the number of input data segments that can be recovered in the presence of up to m lost coded data segments, and The plurality of second segments according to the second erasure configuration include n2+m second segments, wherein n2>n1, and n2 represents the number of recoverable input data segments in the presence of up to m lost coded data segments.

3. The non-transitory machine-readable storage medium of claim 2, wherein: Reorganizing the plurality of first segments into the plurality of second segments to change to the second erasure correction configuration is performed without recalculating encoded data based on the input data.

4. The non-transitory machine-readable storage medium of claim 3, wherein: The reorganizing discards some of the plurality of coded data blocks to produce a remaining portion of the plurality of coded data blocks, and wherein the instructions, when executed, cause the system to: The remaining portions of the plurality of coded data blocks are grouped into the plurality of second segments.

5. The non-transitory machine-readable storage medium of claim 1, wherein: The erasure coding includes Reed-Solomon erasure coding.

6. The non-transitory machine-readable storage medium of claim 1, wherein: The plurality of coded data blocks grouped into the plurality of first segments include 12 coded data blocks.

7. The non-transitory machine-readable storage medium of claim 1, wherein: Each of the plurality of third segments has a greater number of encoded data blocks than a second segment of the plurality of second segments.

8. The non-transitory machine-readable storage medium of claim 1, wherein: The recalculating the blocks of encoded data to be added to the plurality of third segments comprises recalculating less than the plurality of blocks.

9. The non-transitory machine-readable storage medium of claim 1, wherein: The first number of failure domains includes a first number of server computers or a first number of storage devices, and the second number of failure domains includes a second number of server computers or a second number of storage devices.

10. A system for data processing, comprising: processor; as well as a non-transitory storage medium storing instructions executable on the processor to: grouping a plurality of blocks of coded data into a first number of segments, each segment of the first number of segments comprising a number of blocks of the plurality of blocks, and the coded data is based on applying error correction coding to input data; storing segments of the first number of segments in respective ones of a first number of failure domains in a first error correction configuration, wherein the first number of segments supports data recovery in response to loss of up to a specified number of the first number of segments, Changing the error correction configuration from the first error correction configuration to a second error correction configuration by reorganizing the first number of segments into a second number of segments includes: copying coded data blocks in the first number of segments to the second number of segments; and recalculating coded data blocks to be added to the second number of segments, wherein each segment in the second number of segments includes a greater number of coded data blocks than a segment in the first number of segments; and The segments of the second number of segments are stored in respective ones of a second number of failure domains in the second error correction configuration, wherein the second number is less than the first number and a number of the segments of the second number of segments is less than a number of the segments of the first number of segments, and wherein the second number of segments supports data recovery in response to loss of up to the specified number of the second number of segments.

11. A method of a system including a hardware processor, the method comprising: grouping a plurality of blocks of erasure coded data into a plurality of first segments, each first segment of the plurality of first segments comprising a plurality of blocks of the plurality of blocks, and the erasure coded data being based on applying Reed-Solomon erasure coding to input data; storing the plurality of first segments in respective ones of a first number of failure domains in a first erasure configuration, wherein the first erasure configuration enables error recovery in response to erasure coded data lost in a specified number of failure domains; Changing an erasure configuration from the first erasure configuration to a second erasure configuration by reorganizing the plurality of first segments into a plurality of second segments, comprising: copying the erasure coded data blocks in the plurality of first segments to the plurality of second segments; and recalculating erasure coded data blocks to be added to the plurality of second segments, wherein each of the plurality of second segments includes a greater number of erasure coded data blocks than a first segment of the plurality of first segments; and The plurality of second segments are stored in respective failure domains of a second number of failure domains in the second erasure configuration, wherein the second number is less than the first number, and wherein the second erasure configuration enables error recovery in response to erasure coded data lost in the specified number of failure domains.

12. The method of claim 11, wherein: Changing the erasure configuration is responsive to a change in the number of failure domains due to the addition or removal of storage hardware.