An independent redundant disk array degradation method, system and device
By transforming the relationship between TP-RAID to RAID6 and updating the verification relationship, the calculation process is simplified, and the problem of high complexity of TP-RAID degradation in the prior art is solved, and a more efficient degradation speed is achieved.
Patent Information
- Application Number
- CN202210301609.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-03-25
AI Technical Summary
The existing RAID technology has high computational complexity and low downgrade efficiency in data storage, especially the calculation complexity and time loss during the downgrade process of TP-RAID to RAID6.
A method of downgrading TP-RAID to RAID6 is proposed. By transforming the relationship between TP-RAID to RAID6, updating the verification relationship and load balancing position, simplifying the calculation process, directly determining the downgrading operation through the host, and reducing encoding and decoding calculations.
The computational complexity of TP-RAID downgrading to RAID6 is simplified, the downgrading efficiency is improved, the time loss of data migration and encoding operations is reduced, and the downgrading speed is improved.
Smart Images

Figure CN114610244B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data storage, in particular to the technical field of Redundant Arrays of Independent Disks (RAID), and specifically to the degradation of RAID, especially the degradation technology from TP-RAID to RAID6. Background Art
[0002] With the rapid development of communication technology and network technology, digital information has grown exponentially, posing huge challenges to data storage technology. The reliability of data in storage systems and the energy consumption of storage systems have attracted increasing attention. Currently, in the face of such a large data scale, the reliability of data in a storage system is inversely proportional to the number of components in the storage system. That is, the more components in the storage system, the lower the reliability of the data in the storage system. According to relevant surveys, in an Internet data center composed of 600 disks, approximately 30 disks fail every month. In large-scale storage systems, the reduction in data reliability caused by disk failures is a very serious problem, and relevant fault-tolerant technologies have been studied.
[0003] In 1988, the RAID structure proposed by professors such as D.A. Patterson at the University of California, Berkeley became a key technology for improving storage space. RAID (Redundant Arrays of Independent Disks) is a disk array with redundancy capabilities. A disk array is formed by combining multiple independent disks to obtain a disk group with a large capacity. By using RAID storage technology, the storage capacity can be greatly improved, the request processing ability of system input and output can be enhanced, and the reliability of data can be improved through data distributed storage technology, parallel access means, and information redundancy technology.
[0004] After the design concept of RAID was proposed, it was quickly adopted by the industry. As a high-performance and highly reliable storage technology, RAID has been extremely widely applied in people's production and life. RAID mainly uses data striping, data verification, and mirroring technologies to obtain strong performance, higher reliability, better fault tolerance, and strong scalability. According to different data application requirements, these three technologies' strategies and architectures can be used alone or in combination. Therefore, according to different strategies and architectures, RAID can be divided into different levels: RAID 0, 1, 5, 6, 10.
[0005] Among them, RAID 0 is the earliest RAID mode, namely the Data Stripping technology. RAID 0 is the simplest form of building a disk array. It only requires more than 2 hard disks, has a low cost, and can improve the performance and throughput of the entire disk. RAID 0 does not provide redundancy or error repair capabilities, but its implementation cost is the lowest.
[0006] The simplest implementation of RAID 0 is to connect N identical hard disks in series in hardware through an intelligent disk controller or in software through the disk driver in the operating system to create a large volume set. In use, computer data is written to each hard disk in turn. Its greatest advantage is that it can increase the hard disk capacity by an integer multiple. For example, if three 80GB hard disks are used to form a RAID 0 mode, then the disk capacity will be 240GB. In terms of speed, it is exactly the same as that of a single hard disk. The biggest disadvantage is that if any hard disk fails, the entire system will be damaged, and the reliability is only 1 / N of that of a single hard disk.
[0007] RAID 1 is called disk mirroring. The principle is to mirror the data of one disk to another disk. That is to say, when data is written to one disk, a mirror file will be generated on another idle disk. Without affecting performance, it can maximize the reliability and repairability of the system. As long as at least one disk in any pair of mirror disks in the system can be used, the system can even run normally when half of the hard disks have problems. When a hard disk fails, the system will ignore that hard disk and instead use the remaining mirror disk to read and write data, with good disk redundancy capabilities. Although this is absolutely safe for data, the cost will also increase significantly. The disk utilization rate is 50%. For four 80GB hard disks, the available disk space is only 160GB. In addition, a RAID system with a failed hard disk is no longer reliable, and the damaged hard disk should be replaced in time. Otherwise, if the remaining mirror disk also has problems, then the entire system will crash. After replacing the new disk, it will take a long time to synchronize the mirror of the original data. The external access to the data will not be affected, but the performance of the entire system will decline at this time. Therefore, RAID 1 is mostly used in occasions where critical and important data needs to be saved.
[0008] RAID 5 (Redundant Array of Independent Disks with Distributed Parity). Its parity check code exists on all disks. Here, p0 represents the parity check value of the 0th stripe, and the others are similar. The read efficiency of RAID 5 is very high, the write efficiency is average, and the block-based collective access efficiency is good. Because the parity check code is on different disks, the reliability is improved. However, it does not solve the parallelism of data transmission well, and the design of the controller is quite difficult. For RAID 5, most data transmissions only operate on one disk and can be parallelized. There is a "write penalty" in RAID 5, that is, for each write operation, four actual read / write operations will be generated, including two reads of the old data and parity information, and two writes of the new data and parity information.
[0009] RAID 6 is an independent disk structure with two distributed storage parity check codes. It is an extension of RAID 5 and is mainly used in occasions where data must absolutely not be incorrect. Due to the introduction of the second parity check value, N + 2 disks are required, and at the same time, the design of the controller becomes very complex, further improving the data reliability of the disk array. More space is required to store the check values, and there is a higher performance loss in write operations.
[0010] RAID technology has been widely applied in today's distributed storage servers. RAID 5 and 6 can respectively recover one or two error blocks, but each data recovery is still limited by the speed limit when a large amount of data is read from each disk.
[0011] Therefore, in view of the above-mentioned disadvantages and problems in the prior art, an optimized method for RAID degradation needs to be proposed to simplify the operation as much as possible and improve the degradation efficiency. Summary of the Invention
[0012] In view of this, the purpose of the present invention is to propose an improved method, system and device for RAID degradation, so as to solve the problems of complex operation and low efficiency in the prior art.
[0013] Based on the above purpose, on the one hand, the present invention provides an independent redundant disk array degradation method, which includes the following steps:
[0014] Transform the relationship of downgrading from TP-RAID to RAID6, so that the downgraded check data remains as the specified check code combination p1p2 when any check disk is removed;
[0015] Update the parity relationship. First, in the case of no load balancing requirement, consider the parity relationship degradation from TP-RAID to RAID6 to obtain the relationship expression of data and parity. Then, considering the degradation operation relationship, obtain the relationship expression of the degraded RAID6. Among them, the parity block p3 extracted during the operation is directly determined by the host decoupled from the actual degradation operation based on the degradation requirement, and the operation starts;
[0016] Update the data change caused by the change of the load balancing position. According to the relationship expression of the degraded RAID6, arrange the RAID without load balancing based on the load balancing adjustment, update the encoding and decoding situation, and obtain the RAID6 group, where the position of the data and / or the position of the parity code are adjusted.
[0017] In some embodiments of the independent redundant disk array degradation method according to the present invention, the transformation of the relationship of the degradation from TP-RAID to RAID6 is such that the degraded parity data remains as a specified combination in the case of removing any parity disk, and further includes:
[0018] The relationship of the degradation is represented based on the following formula, where:
[0019] TP-RAID:
[0020]
[0021] x≥2 (4)
[0022] And
[0023] RAID6:
[0024]
[0025] Where d1 - d a represents data blocks, p1, p2, p3 represent the three parity codes of TP-RAID, p1' and p2' are the parity codes of RAID6 obtained after re-operation of the load balancing related operations after the degradation operation, and a represents the number of user data disks.
[0026] In some embodiments of the independent redundant disk array degradation method according to the present invention, the update of the parity relationship further includes:
[0027] Based on the following formula, consider the parity relationship degradation from TP-RAID to RAID6 to obtain the relationship expression of data and parity in the case of no load balancing requirement:
[0028]
[0029] x≥2(6)
[0030] Among them, the first half of the formula represents the parameters and operation relationships that the data information needs to satisfy, and the relationship is determined based on the load balancing requirements; the second half of the formula represents the parameters and operation relationships that the verification information needs to satisfy. Based on different load balancing requirements, there are different relationships for m, n, and o. m, n, and o respectively correspond to the positions of the check codes in the stripes under load balancing. Among them represents the exclusive OR operation, and k represents the number of user data disks actually used.
[0031] In some embodiments of the independent redundant disk array degradation method according to the present invention, the update check relationship further includes:
[0032] Based on the transformation of the above formula (6) and the following formula, considering the operation relationship during degradation, the relationship expression of the degraded RAID6 is obtained:
[0033] Among them, the expression considering the operation change from the check code combination p1p2 to p1'p2'
[0034] Among them, Δp1 and Δp2 are the differences that need to be added for the direct operation from p1p2 to p1'p2'. Among them, it is obtained that
[0035]
[0036] Based on (11), use p3 to complete the encoding of Δp1 and Δp2, and obtain
[0037] Among them, the parameter values of m, n, and o are determined by the host and the operation starts.
[0038] In some embodiments of the independent redundant disk array degradation method according to the present invention, the update check relationship further includes: obtaining the check code value of the TP-RAID degraded to RAID6 arranged based on the existing load balancing situation through Δp1 and Δp2, and calculating based on the following formula:
[0039]
[0040] In some embodiments of the independent redundant disk array degradation method according to the present invention, the update of the data change caused by the change of the load balancing position further includes:
[0041] Based on the degraded RAID6 satisfying:
[0042]
[0043] Among them, P1' and P2' satisfy the encoding relationship of RAID6 under the current structure, and m and n represent the position parameters that satisfy the load balancing algorithm under TP-RAID.
[0044] In some embodiments of the independent redundant disk array downgrading method according to the present invention, the data change caused by the update of the load balancing position further includes: adjusting the positions of the data, where formula (14) is updated to:
[0045]
[0046] Among them, d1' and d2' are data information that satisfies the load balancing requirements after the position update, and the corresponding checksums after load balancing are p1'' and p2'', and m and n represent the positions where the checksums are located.
[0047] In some embodiments of the independent redundant disk array downgrading method according to the present invention, the data change caused by the update of the load balancing position further includes: adjusting the positions of all the data and all the checksum positions, where first the positions of the data are adjusted based on formula (15), and then based on the following formula, the checksum data is updated based on the positions involved in the new load balancing and shifted:
[0048]
[0049] Among them, p1'' and p2'' are the checksum information updated after data migration, p1 m ” and p2 m ” are the checksum information after the change of the checksum position, m and n are the original checksum positions, and m' and n' are the checksum positions after load balancing adjustment.
[0050] On the other hand, the present invention also provides an independent redundant disk array downgrading system, which includes:
[0051] A downgrading relationship transformation module configured to transform the relationship of downgrading from TP-RAID to RAID6 so that the checksum data after downgrading remains as the specified checksum code combination p1p2 in the case of removing any checksum disk;
[0052] A checksum relationship update module configured to update the checksum relationship, where first, in the case of no load balancing requirement, the checksum relationship downgrading from TP-RAID to RAID6 is considered to obtain the relationship expression between the data and the checksum, and then, in the case of considering the operation relationship of downgrading, the relationship expression of the downgraded RAID6 is obtained, where the removed checksum block p3 is directly determined by the host decoupled from the actual downgrading operation based on the downgrading requirement, and the operation starts;
[0053] A data change update module, configured to update data changes caused by changes in the load balancing position, and adjust the arrangement of the RAID without load balancing based on the load balancing according to the relational expression of the degraded RAID6, and update the encoding and decoding situation to obtain a RAID6 group, wherein the positions of the data and / or the parity codes are adjusted.
[0054] In another aspect of the present invention, there is also provided a computer-readable storage medium storing computer program instructions, which when executed implement the independent redundant disk array downgrading method according to any one of the above of the present invention.
[0055] In still another aspect of the present invention, there is also provided a computer device including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, it implements the independent redundant disk array downgrading method according to any one of the above of the present invention.
[0056] The present invention has at least the following beneficial technical effects: According to the present invention, a fast and simple solution for downgrading TP-RAID to RAID6 is proposed. Firstly, different operations involved in the downgrading operation are split, simplifying complex scenarios, and separate solutions are given for different scenarios. Compared with the traditional solution, the corresponding numerical update can be simply completed through the Δ data calculated during data forward movement, without having to read all data and re-encode after data migration, reducing the operation complexity and improving the working speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other embodiments based on these drawings without creative efforts.
[0058] In the figures:
[0059] Figure 1 Shows a schematic diagram of the downgrading of TP-RAID to RAID6 without considering load balancing requirements according to an embodiment of the independent redundant disk array downgrading method of the present invention;
[0060] Figure 2 Shows a schematic diagram of the adjustment of the downgrading based on load balancing according to an embodiment of the independent redundant disk array downgrading method of the present invention;
[0061] Figure 3 Shows a schematic block diagram according to an embodiment of the independent redundant disk array downgrading method of the present invention;
[0062] Figure 4 FIG. 2 shows a schematic block diagram of an embodiment of an independent redundant disk array degradation system according to the present invention;
[0063] Figure 5 FIG. 6 shows a schematic diagram of an embodiment of a computer-readable storage medium for implementing an independent redundant disk array degradation method according to the present invention;
[0064] Figure 6 FIG. 10 shows a schematic hardware structure diagram of an embodiment of a computer device for implementing an independent redundant disk array degradation method according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0065] In order to make the objectives, technical solutions, and advantages of the present invention more clear and understandable, the following further describes the embodiments of the present invention in detail with reference to specific embodiments and the accompanying drawings.
[0066] It should be noted that all the expressions using "first" and "second" in the embodiments of the present invention are used to distinguish two non-identical entities or non-identical parameters with the same name. It can be seen that "first" and "second" are only for the convenience of expression and should not be construed as a limitation on the embodiments of the present invention. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units inherently includes other steps or units.
[0067] Traditional RAID groups include RAID0, 1, 5, 6, etc. under different combinations. However, with the development of technology, users have higher requirements for both the amount of stored data and the performance of silent recovery. This requires the previously conceptual TP-RAID to be officially put into use. TP-RAID (Triple-RAID) is based on RAID5 and 6 and uses a similar algorithm to expand the parity check to achieve a triple-parity RAID algorithm (with parity codes p1, p2, and p3). The core of TP-RAID is that in addition to being able to perform triple parity checks, it can also upgrade from RAID5 and 6 to TP-RAID, and can downgrade from TP-RAID to RAID5 and 6. Since the parity check algorithm of TP-RAID is much more complex than that of RAID5 and 6, the encoding and decoding calculations for calculating parity checks or error recovery are also much more complex. Therefore, triple-parity TP-RAID can only be solved in a manner similar to erasure correction by matrix inversion or the method of solving a system of linear equations with three variables. Such a solution has a high complexity, large time consumption, and also a large computing power consumption. Therefore, the present invention proposes a fast and simple downgrading scheme for the operation of downgrading TP-RAID to RAID6, which is much simpler than the encoding and decoding algorithm and can achieve the advantage of simplifying the operation.
[0068] After the RAID group is completed, based on the user's requirements, it may be necessary to downgrade the RAID group. Downgrading means downgrading the existing RAID group by one or two levels, leaving the position where the parity data was originally stored empty, so as to free up the hard disk for other functional requirements. The present invention is directed to the downgrading operation of TP-RAID to RAID6. To illustrate the present invention, it is first necessary to explain the algorithmic relationship that RAID6 and TP-RAID need to follow.
[0069] The algorithm principle of RAID6 is:
[0070]
[0071] Among them, d1(d1), d2(d2), d3(d3)…da(d a ) represent the data 1, 2, 3…a in the user data disks participating in the encoding. d represents the data disk data, and 1, 2, 3…a represent its numbers. Different numbers represent the disk numbers of different disks in different stripes.
[0072] Regarding p1(p1), p2(p2), p3(p3), where p represents the parity, which is the parity value generated by encoding the user data by RAID for data protection. Different RAID levels will have different numbers of RAID protection parity codes. Among them, RAID5 has only one, so it is p1, RAID6 has two, so the numbers are represented as p1p2. Similarly, TP-RAID has three parity codes, p1p2p3. In the represented RAID group, if there are n parity values in the same stripe, they are represented as p1 to pn.
[0073] The encoding and decoding algorithm of RAID is to solve the equation with p as the unknown in the above relational expression. The operations here use Galois field operations in storage. Therefore, it can be known that the relational expressions of p in traditional RAID 6 are respectively:
[0074] RAID6:
[0075]
[0076] In the storage system, in order to reduce the operation complexity and ensure that the data will not overflow, the above unified and storage encoding and decoding operations are generally implemented through the Galois field. That is to say, in the hardware implementation, addition and subtraction are implemented through exclusive OR operations, and multiplication and division are implemented through Galois multiplication and division for different Galois field polynomials. This will not be elaborated here.
[0077] Based on the operation requirements of the above-mentioned upgrade from RAID6 to TP-RAID and downgrade from TP-RAID to RAID6, under the premise of formulas (1) and (2), the algorithmic relationship that the obtained TP-RAID needs to satisfy is as follows:
[0078] TP-RAID:
[0079]
[0080] x≥2 (3)
[0082] As shown in formula (3), the formulas in the first two rows respectively correspond to the preconditions for compatibility with RAID5 and 6 after adding one parity to meet the requirements of TP-RAID. The formula in the third row uses a similar principle and is based on Vandermonde to construct a solvable relational expression, where x is the power, and here the power is greater than or equal to 2 to meet the construction requirements of Vandermonde.
[0083] When the downgrade behavior from TP-RAID to RAID6 occurs, it corresponds to removing any one of the three parities to form RAID6. For this removal behavior, although any parity disk is removed, based on formula (1), it can be known that the remaining parities need to conform to the relationship between p1 and p2 in formula (1). Therefore, no matter which parity disk is removed, the parity data after the final downgrade needs to be changed to p1p2 in formula (1).
[0084] Based on these above requirements, it can be known that under TP-RAID, it is impossible to ensure that the parity disk extracted by the user is a certain parity, and the final downgrade result needs to satisfy that it must be p1p2. Therefore, the traditional operation method must be recalculated to meet the conditions.
[0085] For this reason, in the first aspect of the present invention, an independent redundant disk array downgrading method 100 is provided. Figure 3 The schematic block diagram showing an embodiment of the independent redundant disk array downgrading method according to the present invention is shown. In the embodiment as Figure 1 shown, the method includes:
[0086] Step S110: Transform the relationship of downgrading from TP-RAID to RAID6 so that the parity data after downgrading remains as the specified parity code combination p1p2 in the case of removing any parity disk;
[0087] Step S120: Update the parity relationship. First, in the case of no load balancing requirement, consider the parity relationship degradation from TP-RAID to RAID6 to obtain the relationship expression of data and parity. Then, considering the operation relationship of the degradation, obtain the relationship expression of the degraded RAID6, where the parity block p3 extracted during the operation is directly determined by the host decoupled from the actual degradation operation based on the degradation requirement, and start the operation.
[0088] Step S130: Update the data change caused by the change in the load balancing position. According to the relationship expression of the degraded RAID6, adjust the layout of the RAID without load balancing based on the load balancing, update the encoding and decoding situation, and obtain the RAID6 group, where the position of the data and / or the position of the parity code are adjusted.
[0089] Generally speaking, aiming at the above problems existing in the prior art, the method according to the present invention mainly lies in several parts such as transforming the relationship of the degradation from TP-RAID to RAID6, updating the parity relationship, and updating the data change caused by the change in the load balancing position. In the actually implemented TP-RAID, the parity will fall on different positions according to the load balancing requirement. In order to meet the requirement that no matter how the disks are extracted when completing the degradation from TP-RAID to RAID6, the obtained RAID6 should satisfy that in the actual operation relationship, P3 is extracted and only the parity code combination P1P2 is retained, first perform Step S110 to transform the relationship of the degradation from TP-RAID to RAID6, so that the degraded parity data remains as the specified parity code combination P1P2 in the case of extracting any parity disk.
[0090] Based on Step S110, when normally completing the degradation operation from TP-RAID to RAID6, it is necessary to consider the new RAID6 structure that meets the load balancing. Accordingly, all p1' and p2' need to be recalculated based on the new load balancing structure. Such a standard process method will cause a large amount of operation loss and high complexity. Therefore, to improve this operation structure, then update the parity relationship in Step S120. First, in the case of no load balancing requirement, consider the parity relationship degradation from TP-RAID to RAID6 to obtain the relationship expression of data and parity. Then, considering the operation relationship of the degradation, obtain the relationship expression of the degraded RAID6, where the parity block P3 extracted during the operation is directly determined by the host decoupled from the actual degradation operation based on the degradation requirement, and start the operation.
[0091] Based on the above operations, the relationship of the degraded RAID6 has met the aforementioned relationship requirements. On this basis, in step S130, the data changes caused by the change of the load balancing position are updated. According to the relationship expression of the degraded RAID6, the arrangement of the RAID without load balancing is adjusted based on the load balancing, and the encoding and decoding conditions are updated to obtain a RAID6 group, in which the positions of the data and / or the parity codes are adjusted.
[0092] Furthermore, the present invention starts from the characteristics of the parity check and improves it as follows:
[0093] 1. First, transform the relationship of the TP-RAID degradation
[0094] The actually implemented TP-RAID will check at different positions according to the requirements of load balancing. For the situation of formula (1), in actual implementation, the formula relationship may be expressed as:
[0095] TP-RAID:
[0096]
[0097] x≥2 (4)
[0098] where d1 - d a represents data blocks, p1, p2, p3 represent the three parity codes of the TP-RAID, p1' and p2' are the parity codes of the RAID6 obtained after re-calculation of the load balancing related operations after the degradation operation, and a represents the number of user data disks.
[0099] 1, 2, 3, 4,... (a + 3) in formula (4): represent the encoding parameters. In order to form a RAID group, the added parity codes need to be solvable, so the formula needs parameters. This parameter is generally related to the load balancing algorithm of the RAID group. For example, the disk landing situation of the first stripe is d1d2d3p1p2 respectively, and their corresponding parameters are 12345, where a = 3, and a is the number of user data disks. The arrangement of the second stripe may be p1p2d1d2d3, then the corresponding parameters of p1 and p2 are 1 and 2 respectively, and so on.
[0100] x represents the power of the formula and can take values of 2, 3, 4 and other natural numbers greater than 2.
[0101] Based on the above analysis, it can be known that in the case of load balancing, when completing the downgrade from TP-RAID to RAID6, no matter how the disks are extracted, the resulting RAID6 should satisfy the situation where p3 is extracted in the actual operation relationship, and only the RAID6 composed of the parity codes p1 and p2 is retained. Then, for the TP-RAID under formula (4). At this time, if the downgrade is successfully completed, the resulting RAID6 should satisfy formula (5): RAID6:
[0102]
[0103] In formula (5), p1' and p2' are the two parity codes of the RAID6 obtained after the downgrade operation and the completion of the load balancing related operations and re-calculation. Their relationship should meet the requirements of formula (5).
[0104] 2. Update the parity relationship
[0105] Based on the first step, it can be known that when normally completing the downgrade operation from TP-RAID to RAID6, it is necessary to consider the new RAID6 structure that meets the load balancing. Accordingly, all p1' and p2' need to be re-calculated based on the new load balancing structure. Such a standard process method will cause a large amount of computational loss and high complexity.
[0106] To improve this operation structure, the present invention first assumes that there is no load balancing requirement and only considers the downgrade of the parity relationship from TP-RAID to RAID6. Then the relational expression can be expressed as:
[0107]
[0108] x≥2 (6)
[0109] Here, the relationship between data and parity is represented separately. The left half of formula (6) represents the parameters and operation relationships that the data information needs to satisfy, and its relationship is determined based on the load balancing requirement; the right half of the formula represents the parameters and operation relationships that the parity information needs to satisfy. There will be different relationships of m, n, and o based on different load balancing requirements. m, n, and o respectively correspond to the positions of the parity codes in the stripe under load balancing, where represents the exclusive OR operation, and k represents the number of user data disks actually used.
[0110] Considering the operation relationship of the downgrade, expressing the parity of the resulting RAID6 after the downgrade as p1p2, then corresponding to the above expression method of formula (6), it should be obtained:
[0111]
[0112] Considering the degraded operation and the differential relationship between formulas (6) and (7), based on the XOR operation relationship, the rewrite of formula (6) can be obtained as follows:
[0113]
[0114] x≥2 (8)
[0115] Considering the operation change of the parity check code combination from p1p2 to p1’p2’, the following can be obtained:
[0116]
[0117] Here, Δp1 and Δp2 can be considered as the differences that need to be added for the direct operation from p1p2 to p1’p2’. If this difference can be obtained, the degraded parity check code does not need to be recalculated based on formula (7), but can be directly updated.
[0118] Next, considering the relationship between Δp1 and Δp2, based on the observation and transformation of formulas (7) and (8), the following can be obtained:
[0119]
[0120] Summarizing the results obtained from formula (10), it can be expressed as:
[0121]
[0122] m, n, and o are the above-mentioned parameter values respectively, corresponding to the positions of the parity check codes in the stripes under load balancing. For example, if p1p2p3 are in the 2nd, 3rd, and 4th positions in the stripe respectively, then m = 2, n = 3, and o = 4.
[0123] Observing formula (11), it can be seen that it satisfies the operation formula of RAID6 for Δp1, Δp2, and p3. Therefore, it can be assumed that formula (11) is using p3 to complete the encoding work of Δp1 and Δp2. That is to say, the formula of RAID6 can be applied to solve Δp1 and Δp2, and their relationship satisfies:
[0124]
[0125] From formula (12), it can be seen that p3 here is the actually extracted parity check block regardless of how the user performs the extraction operation based on the degraded requirements. Therefore, regardless of the actual degraded operation, the data can be directly determined by the host and the operation can be started. Among them, m, n, and o are determined by the load balancing algorithm. Therefore, the parameter values of m, n, and o can also be determined in advance by the host regardless of the actual operation and the operation can be started.
[0126] After completing the operations of Δp1 and Δp2, the parity code value of TP-RAID arranged based on the existing load balancing reduced to RAID6 can be obtained through Δp1 and Δp2. The calculation method is as follows:
[0127] As described above, the operations replace the complex encoding and decoding operations in the original method, and the data reading amount only requires three data blocks: p1, p2, and p3. Taking the TP-RAID algorithm with a data volume of 29 and a parity block of 3 as an example, during the process of generating the new RAID6 encoding, the data reading amount is reduced from 29 to 3, and the speed is increased by 9.7 times.
[0128] 3. Update the data changes caused by the change in the load balancing position
[0129] Based on the above operations, we have obtained the downgraded RAID6, and its relationship satisfies:
[0130]
[0131] Here, P1’ and P2’ are the encoding relationships of RAID6 that satisfy the current structure, and m and n represent the position parameters that satisfy the load balancing algorithm under the previous TP-RAID. The specific structure can be exemplified as Figure 1 shown.
[0132] such as Figure 1 shown, Figure 1 in Figure 1, case 1 is the TP-RAID after load balancing that satisfies left rotation misalignment, case 2 is the operation of downgrading, and the 4th disk (dotted part) here is extracted for other applications.
[0133] Figure 1 In Figure 2, in order to implement the downgrading operation, the operations in parts (1) and (2) of the present invention are first used. It can be known that based on the method of the present invention, p3 is taken out of the RAID group, and on the premise that the load balancing does not change, the parity code is updated, and the RAID6 group that satisfies the arrangement conditions at this time is shown as part 2 in the figure.
[0134] As shown in the figure, in order to form a real RAID6 group, it is necessary to adjust its arrangement based on the load balancing and update the encoding and decoding situation to obtain the RAID6 group. Then the operations at this time are as Figure 2 shown.
[0135] such as Figure 2 shown, after downgrading, adjusting the position based on the load balancing results in three main types of data operations. The first type is that only the position of the data changes, while the position of the parity code does not change; the second type is that the position of the data and the position of some parities change; the third type is that all data and parities change.
[0136] Three categories need to be adjusted separately.
[0137] The first category: On the premise that it degrades to RAID6 and satisfies formula (14), if the position of the data information changes, it can be considered that the data information at each position has changed. At this time, formula (14) can be updated as follows:
[0138]
[0139] Here, d1’ and d2’ are the data information that meets the load balancing requirements after the position update. The corresponding checksums after load balancing are p1”, p2”. m and n represent the positions where the checksums are located. For Figure 2 in the case of the first category in, here m and n are 4 and 1 respectively. Then, based on the calculation relationship of RAID6, it can be obtained that:
[0140]
[0141]
[0142]
[0143]
[0144] It can be seen that the new checksums p1” and p2” can be updated through formula (16).
[0145] Then the operation at this time is to mark the positions where the data has changed based on the new load balancing requirements, perform data shifting, and calculate their respective Δ data during data shifting. Calculate the Δ value of the checksum using formula (16), and then update the checksum using it to obtain the checksum that meets the load balancing requirements.
[0146] The second category: At this time, the position of the data has changed, and there are also positions that have changed in the checksum. Then, first update the values where the checksum position has changed.
[0147] Taking the case where p1’ has changed in the second row of the second category as an example, the formula relationship at this time is:
[0148]
[0149]
[0150] It can be seen that only updating p1 in the second category cannot achieve the operation. That is to say, when any position in the checksum changes, it is impossible to achieve it by only changing the relevant checksum codes. That is to say, the second category of situations is equivalent to the third category of situations, and all checksums need to be updated.
[0151] Therefore, for the second type of situation, no special setting is made here, and the same operation method as the third type can be used.
[0152] Third type: For all situations involving changes in the positions of parity bits, the operation method of the third type should be used.
[0153] The calculation method at this time is as follows: First, in the first type of method, assuming that the positions of the parity checks do not change, the data is moved, and based on the Δ value of the moved data, the Δ value of the parity check is calculated, and the parity check is updated to obtain the parity check data value under the new data position.
[0154] Then, based on the positions involved in the new load balancing, the parity check data is updated and shifted.
[0155] Take Figure 2 The specific method for the row situation involved in the third type in it is as follows:
[0156]
[0157] In formula (18), p1” and p2” are the parity check information updated after data migration, and p1 m ” and p2 m ” are the parity check information after the change in the parity check position. m and n are the original parity check positions, and m’ and n’ are the parity check positions adjusted by the load balancing. Based on the derivation of the above formula, it can be known that after the change, p1 m ” and p2 m ” satisfy the RAID6 algorithm calculated through p1” and p2”, so finally they can be calculated through p1” and p2”, and the calculation method is as shown in formula (18).
[0158] For the situation in the second type where the position information does not change, directly replace the corresponding unchanged m or n with m’ or n’, and then complete the operation based on formula (18).
[0159] The above completes the downgrade of TP - RAID to RAID6, including all operations of load balancing.
[0160] Such an operation can simplify the complex situation of downgrading, and the data migration affects the data operation, and the parity check affects the parity check operation. As the data is moved, the operation can be completed through the Δ data, without having to perform all the encoding operations again, reducing the operation complexity and improving the speed.
[0161] In the second aspect of the present invention, an independent redundant disk array downgrading system 200 is also provided. Figure 4 The schematic block diagram showing an embodiment of the independent redundant disk array downgrading system 200 according to the present invention is shown. As Figure 4 shown, the system includes:
[0162] A degradation relationship transformation module 210 is configured to transform the relationship of TP-RAID degraded to RAID6, so that the degraded parity data remains as the specified parity code combination P1P2 when any parity disk is removed.
[0163] A parity relationship update module 220 is configured to update the parity relationship. First, in the case of no load balancing requirement, the parity relationship degradation of TP-RAID to RAID6 is considered to obtain the relationship expression of data and parity. Then, considering the operation relationship of the degradation, the relationship expression of the degraded RAID6 is obtained. Among them, the removed parity block P3 in the operation is directly determined by the host decoupled from the actual degradation operation based on the degradation requirement, and the operation starts.
[0164] A data change update module 230 is configured to update the data change caused by the change of the load balancing position. According to the relationship expression of the degraded RAID6, the RAID without load balancing is arranged based on the load balancing adjustment, the encoding and decoding situation is updated, and a RAID6 group is obtained, in which the position of the data and / or the position of the parity code are adjusted.
[0165] In a third aspect of the embodiments of the present invention, a computer-readable storage medium is further provided. Figure 5 The schematic diagram of the computer-readable storage medium showing the independent redundant disk array degradation method provided by the embodiments of the present invention is as follows. Figure 5 As shown, the computer-readable storage medium 300 stores computer program instructions 310, and the computer program instructions 310 can be executed by a processor. When the computer program instructions 310 are executed, the method of any of the above embodiments is implemented.
[0166] It should be understood that, without conflict, all the embodiments, features, and advantages described above for the independent redundant disk array degradation method according to the present invention are equally applicable to the independent redundant disk array degradation system and storage medium according to the present invention.
[0167] In a fourth aspect of the embodiments of the present invention, a computer device 400 is further provided, including a memory 420 and a processor 410. A computer program is stored in the memory, and when the computer program is executed by the processor, the method of any of the above embodiments is implemented.
[0168] As Figure 6 shown, it is a schematic diagram of the hardware structure of an embodiment of the computer device for executing the independent redundant disk array degradation method provided by the present invention. Figure 6Taking the computer device 400 shown as an example, the computer device includes a processor 410 and a memory 420, and may further include: an input device 430 and an output device 440. The processor 410, the memory 420, the input device 430, and the output device 440 may be connected by a bus or other means. Figure 6 Taking connection by a bus as an example. The input device 430 can receive input digital or character information, and generate a signal input related to the degradation of the redundant array of independent disks. The output device 440 may include a display device such as a display screen.
[0169] The memory 420, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the resource monitoring method in the embodiments of the present application. The memory 420 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created for the use of the resource monitoring method, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 420 may optionally include a memory remotely set relative to the processor 410, and these remote memories can be connected to the local module through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0170] The processor 410 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions, and modules stored in the memory 420, that is, implements the resource monitoring method in the above method embodiments.
[0171] Finally, it should be noted that the computer-readable storage medium (e.g., memory) in this article can be a volatile memory or a non-volatile memory, or can include both volatile memory and non-volatile memory. By way of example and not limitation, non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM), which can serve as an external cache memory. By way of example and not limitation, RAM can be obtained in various forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to include, but are not limited to, these and other suitable types of memory.
[0172] Those skilled in the art will also understand that the various exemplary logical blocks, modules, circuits, and algorithmic steps described in connection with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described generally in terms of their functionality. Whether this functionality is implemented as software or hardware depends upon the particular application and the design constraints imposed on the overall system. The functionality that can be implemented in various ways for each particular application by those skilled in the art, but such implementation decisions should not be construed as causing a departure from the scope of the disclosure of the embodiments of the present invention.
[0173] The various exemplary logical blocks, modules, and circuits described in connection with the disclosure herein can be implemented or executed using the following components designed to perform the functions herein: a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. The general-purpose processor can be a microprocessor, but alternatively, the processor can be any conventional processor, controller, microcontroller, or state machine. The processor can also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in conjunction with a DSP and / or any other such configuration.
[0174] The foregoing are exemplary embodiments disclosed by the present invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments disclosed by the present invention as defined by the claims. The functions, steps, and / or actions of the method claims according to the disclosed embodiments herein need not be performed in any particular order. In addition, although the elements disclosed by the embodiments of the present invention may be described or claimed in individual form, they may also be understood as plural unless explicitly limited to the singular form.
[0175] It should be understood that, as used herein, unless the context clearly supports exceptions, the singular form "a" is also intended to include the plural form. It should also be understood that the "and / or" used herein refers to any and all possible combinations including one or more of the associated listed items. The serial numbers of the foregoing disclosed embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0176] Those of ordinary skill in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features between the above embodiments or different embodiments can also be combined, and there are many other variations in different aspects of the embodiments of the present invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present invention shall be included within the protection scope of the embodiments of the present invention.
Claims
1. An independent redundant disk array degradation method, characterized in that Including the following steps: Transform the relationship of downgrading TP-RAID to RAID6 so that the parity data after downgrading remains as the specified parity code combination p1p2 in the case of removing any parity disk; Update the parity relationship. First, consider the downgrading of the parity relationship from TP-RAID to RAID6 without load balancing requirements to obtain the relationship expression of data and parity. Then, considering the arithmetic relationship of downgrading, obtain the relationship expression of the downgraded RAID6. Among them, the parity block p3 removed in the operation is directly determined by the host decoupled from the actual downgrading operation based on the downgrading requirements, and the operation starts; Update the data changes caused by the change of the load balancing position. According to the relationship expression of the downgraded RAID6, adjust the layout of the RAID without load balancing based on the load balancing, update the encoding and decoding situation, and obtain the RAID6 group, where the position of the data and / or the position of the parity code are adjusted.
2. The method according to claim 1, wherein The transformation of the relationship of downgrading TP-RAID to RAID6 so that the parity data after downgrading remains as the specified combination in the case of removing any parity disk further includes: Express the downgrading relationship based on the following formula, where: And where d1 - d a represents a data block, p1, p2, and p3 represent three parity codes of TP - RAID, p1' and p2' are parity codes of RAID6 obtained by re - computing related operations for load balancing after a degradation operation, and a represents the number of user data disks.
3. The method according to claim 2, characterized in that, The update of the parity relationship further includes: Based on the following formula, consider the downgrading of the parity relationship from TP-RAID to RAID6 without load balancing requirements to obtain the relationship expression of data and parity: Among them, the first half of the formula represents the parameters and operation relationships that the data information needs to satisfy, and the relationship is determined based on the load balancing requirements; the second half of the formula represents the parameters and operation relationships that the verification information needs to satisfy. Different m, n, and o relationships correspond to different load balancing requirements. m, n, and o respectively correspond to the positions of the check codes in the stripes under load balancing, where represents the exclusive OR operation, and k represents the number of user data disks actually used.
4. The method according to claim 3, wherein The update of the parity relationship further includes: Based on the transformation of the above formula (6) and the following formula, obtain the relationship expression of the downgraded RAID6 considering the arithmetic relationship of downgrading: Where the expression considering the arithmetic change of the parity code combination from p1p2 to p1'p2' Where Δp1 and Δp2 are the differences that need to be added for the direct operation from p1p2 to p1'p2', and obtain Based on (11), use p3 to complete the encoding of Δp1 and Δp2, and obtain Where the parameter values of m, n, and o are determined by the host and the operation starts.
5. The method according to claim 4, wherein The update of the parity relationship further includes: obtaining the parity code values of TP-RAID downgraded to RAID6 arranged based on the existing load balancing situation through Δp1 and Δp2, where the calculation is based on the following formula:
6. The method according to claim 5, characterized in that, The update of the data changes caused by the change of the load balancing position further includes: Based on the downgraded RAID6 satisfying: Where P1' and P2' are the encoding relationships of RAID6 satisfying the current structure, and m and n represent the position parameters satisfying the load balancing algorithm under TP-RAID.
7. The method according to claim 6, characterized in that, The update of the data changes caused by the change of the load balancing position further includes: adjusting the position of the data, where formula (14) is updated to: Where d1' and d2' are the data information satisfying the load balancing requirements after the position update, and the corresponding parity after satisfying the load balancing is p1" and p2", and m and n represent the positions where the parity is located.
8. The method according to claim 7, wherein The data changes caused by the change in the updated load balancing position further include: adjusting the positions of all data and all check codes, where the position of the data is first adjusted based on formula (15), and then the check data is updated and shifted based on the positions involved in the new load balancing according to the following formula: Among them, p1” and p2” are the verification information updated after data migration, and p1 m ” and p2 m ” are the verification information after the change of verification positions. m and n are the original verification positions, and m’ and n’ are the verification positions after load balancing adjustment.
9. An independent redundant disk array degradation system, characterized in that, Including: A downgrade relationship transformation module configured to transform the relationship of downgrading from TP-RAID to RAID6, so that the check data after downgrading remains as the specified combination p1p2 in the case of removing any check disk; A check relationship update module configured to update the check relationship, where first, in the case of no load balancing requirement, the check relationship downgrading of TP-RAID to RAID6 is considered to obtain the relationship expression of data and check, and then, in the case of considering the operation relationship of downgrading, the relationship expression of the downgraded RAID6 is obtained, where the removed check block p3 in the operation is directly determined by the host decoupled from the actual downgrading operation based on the downgrading requirement, and the operation starts; A data change update module configured to update the data changes caused by the change in the load balancing position, and arrange and update the encoding and decoding according to the relationship expression of the downgraded RAID6 for the RAID without load balancing based on the load balancing, to obtain a RAID6 group, where the position of the data and / or the position of the check code is adjusted.
10. A computer device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and when the computer program is executed by the processor, it executes the independent redundant disk array downgrading method according to any one of claims 1-8.
Citation Information
Patent Citations
RAID5 (redundant array of independent disk 5) write IO optimization processing method
CN103049222A
Efficient data migration method under RAID (Redundant Array of Independent Disks)
CN114115729A