CN1655126A - Disk faulttolerant system and method - Google Patents
Disk faulttolerant system and method Download PDFInfo
- Publication number
- CN1655126A CN1655126A CN 200410015361 CN200410015361A CN1655126A CN 1655126 A CN1655126 A CN 1655126A CN 200410015361 CN200410015361 CN 200410015361 CN 200410015361 A CN200410015361 A CN 200410015361A CN 1655126 A CN1655126 A CN 1655126A
- Authority
- CN
- China
- Prior art keywords
- block
- error
- disk
- checking
- damage
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
This invention provides a disk fault tolerant system including a central processor and XOR unit, a disk array and a system bus. Said central processor includes a modulus operation unit, an offset operation unit and an address conversion unit, among which, said disk array comprises multiple disks, each is divided into multiple data segments logically, a set of fault check segment P and a set of fault check segment Q. This invention also provides a disk fault tolerant method, which utilizes the X OR operation to carry out two packet arrangements of different packet methods logically on every data block in the disk array so as to effectively utilize the disk space.
Description
[technical field]
The invention relates to a kind of disk fault-tolerant system and method, particularly about a kind of disk fault-tolerant system and method for using disk array technology.
[prior art]
In the present information age, the user needs large capacity disc to store increasing data, yet the price of large capacity disc is very expensive, and the user is formed very large economy burden.Therefore, how to increase the access speed of disk, how to prevent to damage data and the efficient disk space that utilizes how because of the fault of disk, be computer professional and user's puzzlement always.The mode of improving disk access speed at present mainly contains two kinds: the one, and disk is got control (Disk Cache Controller) technology soon, and two are to use disk array (Disk Array) technology.Wherein disk array is that a plurality of disks are formed an array, is used as single disk and uses, and it is stored in the mode of data with segmentation in the different disks, during access data, associative disk in the disk array is Collaboration together, reduces the access time of data, improves the space availability ratio of disk.The different technologies that disk array utilized, be called RAID (Redundant Array ofIndependent Disks) rank, be commonly referred to: RAID0, RAID1, RAID2, RAID3, RAID4, RAID5 and RAID6, its each RAID rank all has the merits and demerits of oneself.RAID6 compares with other RAID level, has increased by two independently error-checking blocks (Parity Block), and it uses different algorithms, and the reliability height of data had both made two disks damage simultaneously, also can not influence the use of data.But need distribute to the bigger disk space of error-checking block, RAID5 has bigger " writing loss " relatively.Because the relatively poor and complicated enforcement of write performance of RAID6 makes that RAID6 is difficult to realize.
Once be exposed in No. the 6th, 353,895, the United States Patent (USP) of on March 5th, 2002 bulletin about the fault-tolerant supporting technology of disk array, its patent name is " disk tolerance RAID framework " (RAIDARCHITECTURE WITH TWO-DRIVE FAULT TOLERANCE).This patent has disclosed the problem that a kind of use XOR (XOR) operation coding method solves single or two disks of fault tolerant, and two groups of error-checking blocks have been used in its coding method.Its weak point is that the invention of this patent has the method for different store data block and error-checking block to the varying number disk, make block and error-checking block not have and significantly deposit correlation rule, cause write performance relatively poor, and too complicated and be difficult in actual applications realize.
For overcoming the deficiency of above-mentioned prior art, a kind of disk fault-tolerant system and method must be provided, it can use a spot of XOR, is implemented in and repairs single damage disk and two damage disks in the disk array.
[summary of the invention]
At the deficiency that prior art exists, fundamental purpose of the present invention is to provide a kind of disk fault-tolerant system and method.It is by carrying out suitable grouping to the block that is stored in the disk, and uses a small amount of XOR to produce two groups of error-checking blocks respectively to it, or is implemented in the disk of repairing single two damages in the disk array.
For reaching the foregoing invention purpose, the invention provides a kind of disk fault-tolerant system, this disk fault-tolerant system comprises: a central processing unit, an XOR unit, a disk array and a system bus.Wherein, this central processing unit comprises asks modulo operation unit, a shift operation unit and an address conversioning unit, and it is respectively applied for asks modulo operation, shift operation, address translation computing and control operation.This XOR unit is used for carrying out XOR to being stored in the disk data, and it can be contained in the central processing unit, also can be independent of central processing unit, to reduce the load of central processing unit.This disk array comprises a plurality of disks, and these a plurality of disks logically are divided into a plurality of data segments, one group of error-checking section P and another group error-checking section Q.Each data segment comprises a plurality of block, and it is used to store a plurality of data; This group error-checking section P comprises a plurality of error-checking block P (j), this group error-checking section Q comprises a plurality of error-checking block Q (k), and these a plurality of error-checking block P (j) and error-checking block Q (k) are used to repair the disk of two damages or single damage disk.This system bus is used for collaborative realization central processing unit the disk data is carried out corresponding computing, read-write and control operation.
The invention provides a kind of group technology in data block of disk array, it is with each block D (i in the disk array, j) logically carry out the grouping of twice different grouping method respectively, one group is designated as error-checking block P grouping, and another group is designated as error-checking block Q grouping.This group technology comprises: (a) indicate each error-checking block P (j); (b) with block D (i, j) (i j) is divided in the error-checking block P grouping block D that the j value in is identical with the label j of error-checking block P (j); (c) indicate each error-checking block Q (k); (d) (i, j) (i j) is divided in the error-checking block Q grouping block D that ((i+j) mod n) value in is identical with the label k of error-checking block Q (k) with block D.Wherein, and D (i, j) expression arbitrary data block, D (i, implication j) is j data block on i the disk, and it belongs to the j group of error-checking block P grouping, and " mod " is for asking the modulo operation symbol.
The present invention also provides a kind of disk tolerance method, and it can repair single damage disk and two damage disks in disk array.This disk tolerance method may further comprise the steps: block and the error-checking block of (a) checking two damage disks; (b) utilize an error-checking block Q method to rebuild a data block of first damage disk, and it is write a new disk; (c) utilize an error-checking block P method to rebuild a data block of second damage disk, and it is write another new disk; (d) whether the block of judging two damage disks is respectively all rebuild and is finished.Do not finish if the block of damage disk is rebuild, begin to repeat above step from step (a) so; If all rebuilding, the block of damage disk finishes, so termination routine.
By implementing the present invention, can effectively use disk space and use a small amount of XOR to produce two groups of error-checking blocks.The code efficiency of these two groups of error-checking blocks is higher, and has higher disk space utilization rate, and its actual usage space/data occupancy space is ((m+2) * (m-1)+1)/(m* (m-1)), and wherein m is the number of disk.It also has higher disk read-write speed, can repair single damage disk in disk array or two and damage disk simultaneously.
[description of drawings]
Fig. 1 is the hardware structure figure of disk fault-tolerant system of the present invention.
Fig. 2 is another hardware structure figure of disk fault-tolerant system of the present invention.
Fig. 3 is the XOR cell schematics of disk fault-tolerant system of the present invention.
Fig. 4 is the disk array displacement synoptic diagram of disk fault-tolerant system of the present invention.
Fig. 5 is that the block grouping and the error-checking block of disk fault-tolerant system of the present invention produces synoptic diagram.
Fig. 6 is the process flow diagram of the generation error-checking block P (j) of disk tolerance method of the present invention.
Fig. 7 is the process flow diagram of the generation error-checking block Q (k) of disk tolerance method of the present invention.
Fig. 8 is the process flow diagram of the block that reads and writes data of disk tolerance method of the present invention.
Fig. 9 is that the error-checking block P method of utilizing of disk tolerance method of the present invention is rebuild the process flow diagram of single damage block.
Figure 10 is that the error-checking block Q method of utilizing of disk tolerance method of the present invention is rebuild the process flow diagram of single damage block.
Figure 11 is the process flow diagram of the single damage disk of the repairing of disk tolerance method of the present invention.
Figure 12 is the process flow diagram of two damages of repairing disk of disk tolerance method of the present invention.
[embodiment]
As Fig. 1 and shown in Figure 2, be the hardware structure figure of disk fault-tolerant system of the present invention.This disk fault-tolerant system comprises a central processing unit (CPU) 1, an XOR unit (XORUnit) 2, a disk array (Disk Array) 3 and one system bus (BUS) 4.Wherein, this central processing unit 1 comprises and asks 11, one shift operation unit, modulo operation unit (Module Unit) (Shift Unit), 12, one address conversioning unit (Address Conversion Unit) 13; This asks modulo operation unit 11 to be used to calculate the modulus of an operand (Operand); This shift operation unit 12 is used to finish the shift operation operation of data bit; This address conversioning unit 13 is used to finish address translation, for example logical address (Logical Address) is converted to the physical address (Physical Address) of disk 30 in the disk array 3; This XOR unit 2 is used for carrying out XOR to being stored in disk 30 data, and it can be independent of central processing unit 1 (as shown in Figure 1), also can be contained in (as shown in Figure 2) in the central processing unit 1; This disk array 3 comprises m disk 30, this m disk 30 can be numbered respectively: Disk0, Disk1...Disk (m-1), it is respectively applied for and stores a plurality of data, also need have two new disks 30 (not drawing among the figure) in addition, it is used for stored disk 30 the rebuilt data that go out of when damage; This system bus 4 is used for collaborative disk 30 data of 1 pair of disk array 3 of central processing unit that realize and carries out corresponding computing, read-write and control operation.
As shown in Figure 3, be the XOR cell schematics of disk fault-tolerant system of the present invention.One XOR unit 2 includes a plurality of XOR gate (XOR Gate) 20, wherein each XOR gate 20 input end to be being connected with the output terminal of a disk 30 in the disk array 3 by system bus 4, and an output terminal of these a plurality of XOR gate 20 is connected with the input end of a plurality of disks 30 in the disk array 3 by system bus 4.This XOR unit 2 is used for finishing the error-checking inspection and repairs damage disk 30 data.
As shown in Figure 4, be the disk array displacement synoptic diagram of disk fault-tolerant system of the present invention.The present invention uses m disk 30 to form a disk array (Disk Array) 3, wherein has n disk to be used to store actual data, also has two disks to be used to store the data that error-checking is checked, so the total number m=n+2 of disk.The present invention for convenience of description supposes n=5, in real application systems, n be one greater than 4 prime number, so at this synoptic diagram disk array 3 that 7 disks 30 form that only draws.This disk array 3 can logically be divided into a plurality of data sets (Data Set) 32, and each data set 32 comprises a plurality of data segments (DB) 321, an error-checking section P322 and an error-checking section Q323.This error-checking section P322 and error-checking section Q323 are used for the error-checking inspection of a plurality of data segments 321, and then reconstruct the data of damage disk 30.The disk space that constitutes same disk array 3 for the average use of energy effectively utilizes disk space to reach, the arrangement of data segment (DB) 321, error-checking section P322 and error-checking section Q323 can be done a displacement rotation in shift operation unit 12, its a plurality of data sets 32 will be arranged and be shifted into above-mentioned disk array 3, convert and can be calculated by address conversioning unit 13 in the address that wherein uses.
As shown in Figure 5, be to be the generation block grouping of disk fault-tolerant system of the present invention and the synoptic diagram of error-checking block.7 disks 30 are denoted as Disk0, Disk1, Disk2, Disk3, Disk4, Disk5 and Disk6 respectively, wherein disk Disk0, Disk1, Disk2, Disk3 and Disk4 are used to store a plurality of data segments (DB) 321, disk Disk5 is used to store error-checking section P322, disk Disk6 is used to store error-checking section Q323, so a data set 32 comprises a plurality of data segments (DB) 321, one groups of error-checking sections P322 and one group of error-checking section Q323.Each data segment 321 comprises a plurality of block (DataBlock) 3210, this group error-checking section P322 comprises a plurality of error-checking block P (j) (ParityBlock) 3220, this group error-checking section Q323 comprises a plurality of error-checking block Q (k) 3230, these a plurality of error-checking block P (j) 3220 and error-checking block Q (k) 3230 are used for the error-checking inspection of a plurality of block 3210, and then repair damage disk 30.As shown in Figure 5,20 data blocks 3210 are logically carried out the grouping of twice different grouping method respectively, one group is designated as error-checking block P3220 grouping, and one group is designated as error-checking block Q3230 grouping.For error-checking block P3220 grouping, (i j) represents arbitrary data block 3210, because (i j) is divided into four groups, so every group has five data blocks 3210 with 20 data block D with D; Divide into groups for error-checking block Q3230, each block 3210 belongs to error-checking block Q3230 and is grouped into the k group, wherein k=((i+j) mod n) is that the present invention produces the algorithm that error-checking block Q3230 indicates grouping, because n=5, thus every group four data blocks 3210 are arranged.Hence one can see that, the data of the error-checking block P3220 that each group is corresponding are to belong to all block 3210 whole XOR values of same group, and the data of the error-checking block Q3230 of each group correspondence are all and indicate the identical same group data area piece 3210 whole XOR values of k.Below illustrate the group technology of above-mentioned block 3210 corresponding error-checking block P3220 and error-checking block Q3230.
For block D (i, j) can adopt following table 1 to represent in error-checking block P3220 grouping:
Table 1
Disk0 Disk1 Disk2 Disk3 Disk4 Disk5 Disk6
D(0,0) D(1,0) D(2,0) D(3,0) D(4,0) P(0)
D(0,1) D(1,1) D(2,1) D(3,1) D(4,1) P(1)
D(0,2) D(1,2) D(2,2) D(3,2) D(4,2) P(2)
D(0,3) D(1,3) D(2,3) D(3,3) D(4,3) P(3)
Wherein (i j) is block 3210 to D, and P (j) is error-checking block P3220.Calculate P (j) and can adopt following algorithmic notation (wherein " " represents XOR computing, i.e. XOR):
P(0)=D(0,0)D(1,0)D(2,0)D(3,0)D(4,0);
P(1)=D(0,1)D(1,1)D(2,1)D(3,1)D(4,1);
P(2)=D(0,2)D(1,2)D(2,2)D(3,2)D(4,2);
P(3)=D(0,3)D(1,3)D(2,3)D(3,3)D(4,3);
By above-mentioned algorithm D (0 as can be known, 0), D (1,0), D (2,0), D (3,0) and D (4,0) in error-checking block P3220 grouping, be same group, be the 0th group, the result of its XOR computing just is stored among the P (0), and P (0) is exactly the error-checking block P3220 of above-mentioned same group data area piece 3210.So for arbitrary data block D (i, j), it belongs in the error-checking block P grouping is the j group, promptly P (j)=D (0, j) D (1, j) ... D (n-1, j).
According to the algorithm of shown in Figure 5 and above-mentioned grouping Q (k) sign k=((i+j) mod n), grouping can be adopted following algorithmic notation for error-checking block Q3230:
Q(0)=D(0,0)D(4,1)D(3,2)D(2,3);
Q(1)=D(1,0)D(0,1)D(4,2)D(3,3);
Q(2)=D(2,0)D(1,1)D(0,2)D(4,3);
Q(3)=D(3,0)D(2,1)D(1,2)D(0,3);
Q(4)=D(4,0)D(3,1)D(2,2)D(1,3);
By above-mentioned algorithm D (0,0) as can be known, D (4,1), D (3,2) and D (2,3) are same group in error-checking block Q3230 grouping, be the 0th group, the result of its XOR computing just is stored among the Q (0), and Q (0) is exactly the error-checking block Q3230 of above-mentioned same group data area piece 3210.So (i, j), it belongs to error-checking block Q3230 and is grouped into the k group for arbitrary data block D.When for each block 3210 indicate grouping after, can get following block D (i, the j) result in error-checking block Q3230 grouping, its result can adopt following table 2 to represent:
Table 2
Disk0 Disk1 Disk2 Disk3 Disk4 Disk5 Disk6
0 1 2 3 4 Q(0)
1 2 3 4 0 Q(1)
2 3 4 0 1 Q(2)
3 4 0 1 2 Q(3)
Q(4)
As above-mentioned Fig. 4 and shown in Figure 5, because error-checking section Q323 can use an error-checking block Q3230 more, for use that can be average and constitute the disk space of same disk array 3, effectively utilize disk space to reach, the arrangement of data segment 321, error-checking section P322 and error-checking section Q323 can be done a displacement rotation in shift operation unit 12, and its each data set 32 will be arranged and be shifted into above-mentioned disk array 3.Convert and can be calculated by address conversioning unit 13 in the address that wherein uses, its address conversion method is as follows: suppose the disk array 3 formed by m disk 30, and m=n+2 wherein, each data set 32 contains n data block 3210 of (n-1) * so.If read certain logical address is r data block 3210, and so available following method converts this logical address to physical address.So that (wherein i is the numbering of disk 30 for i, j) expression physical address, and j is numbering (0<=i<n wherein, 0<=j) of block 3210 on this disk 30.At first by central processing unit 1 ask modular arithmetic unit 11 to calculate this block 3210 to belong to which data set 32 (being expressed as ds), and then calculate physical address (i, j).Can adopt following algorithmic notation (wherein " mod " expression asks modulo operation, r to represent r data block 3210):
ds=(r/(n*(n-1)))mod(n+2);
i=(r?mod?n+(n+2-ds))mod(n+2);
If the value of (r mod n) is less than the value of ds, j=r/n+r/n* (n-1) * (n+2)+1 so;
If the value of (r mod n) is more than or equal to the value of ds, j=r/n+r/n* (n-1) * (n+2) so.
As shown in Figure 6, be the process flow diagram of the generation error-checking block P (j) of disk tolerance method of the present invention.At first central processing unit 1 initiation parameter makes prime number n>4, i=0, j=0 (step S11).Belong to same group block D (i in the central processing unit 1 reading disk array 3, j), and do the i=i+1 computing, it is the block 3210 (step S12) that central processing unit 1 prepares to read next disk, judge whether that then i is less than n, judge promptly (whether i j) all is read finish (step S13) for the block D of the error-checking block P grouping that belongs to same group in the disk array 30.If, illustrate the error-checking block P grouping that belongs to same group in the disk array 30 block D (i j) also is not read and finishes, and re-executes step S12 so, up to belong to same group block D (i, j) all be read finish till; If not, illustrate that (i j) all has been read and finishes, and (i j) makes XOR (step S14) with all block D that read in XOR unit 2 so for the block D that belongs to same group in the disk array 30.Central processing unit 1 writes the XOR result among the P (j) of corresponding error-checking block P3220 (step S15).Central processing unit 1 is done the j=j+1 computing, and promptly central processing unit 1 is that next group data area piece 3210 produces corresponding error-checking block P3220 (step S16) again.Whether last central processing unit 1 judges j less than n-1, and promptly whether all error-checking block P3220 have all been produced (step S17), if, illustrate that error-checking block P3220 is not produced in addition, re-execute step S11 so; If not, illustrating that all error-checking block P3220 are produced, this flow process finishes so.
As shown in Figure 7, be the process flow diagram of the generation error-checking block Q (k) of disk tolerance method of the present invention.At first central processing unit 1 initiation parameter makes prime number n>4, k=0 (step S21), and i=k, j=0 (step S22), wherein k is the label of error-checking block Q3230.(promptly central processing unit 1 prepares to read the block 3210 (step S24) of next disk for i, j) (step S23), and do j=j+1 and i=(n+i-1) mod n computing to belong to same group block D in the central processing unit 1 reading disk array 3.Then judge it is that j is not less than n-1, be to belong to same group block D (i in the disk array 30, j) whether all be read finish (step S25), if, illustrate that (i j) also is not read and finishes, and flow process turns to step S23 so for the block D of the error-checking block Q grouping that belongs to same group in the disk array 30, up to the block D that belongs to same group error-checking block Q grouping (i, j) all be read finish till; If not, (i j) makes XOR (step S26) with all block D that read in XOR unit 2 so.Central processing unit 1 writes the XOR result among the Q (k) of corresponding error-checking block Q3230 (step S27), central processing unit 1 is done the k=k+1 computing, and promptly central processing unit 1 is that next group data area piece 3210 produces corresponding error-checking block Q3230 (step S28) again.Whether judge k at last less than n, promptly whether all error-checking block Q3230 have all been produced (step S29), if, illustrating that error-checking block Q3230 is not produced in addition, flow process turns to step S22 so; If not, illustrating that all error-checking block errors verification block Q3230 are finished by generation, this flow process finishes so.
As shown in Figure 8, be the process flow diagram of the block that reads and writes data of disk tolerance method of the present invention.Adopt respectively D ' (i, j), P ' (j) and Q ' (k) represent that central processing unit 1 will write block new in the disk 30 3210, error-checking block P3220 and error-checking block Q3230 again, k=((i+j) mod n) wherein.At first, address conversioning unit 13 converts logical address to physical address (step S31).Then central processing unit 1 reads the block D (i in the physical address that is stored in disk 30 originally, j), error-checking block P (j) and error-checking block Q (k) (step S32), adopt algorithm P ' (j)=P (j) D (i, j) D ' (i, j) calculate new P ' (j) (step S33), adopt algorithm Q ' (k)=(i, j) (i j) calculates new Q ' (k) (step S34) to D ' to Q (k) D.The D ' that central processing unit 1 writes needs (i, j) and this new P ' (j) and (j) Q ' (k) write (step S35) in the disk 30 respectively.This flow process finishes at last, thereby finishes the block 3210 of read-write disk 30 in disk array 3.
As shown in Figure 9, be that the error-checking block P method of utilizing of disk tolerance method of the present invention is rebuild the process flow diagram of single damage block.When the block D that finds disk 30 (i, j) during damage, can utilize in the error-checking block P3220 grouping on the same group other block 3210 and error-checking block P3220 as XOR calculate damage block D (i, j).Damage block D (i with this in central processing unit 1 reading disk 30, j) error-checking block P (j) (step S41) on the same group, read then that (i j) is other block 3210 (step S42) of same group in error-checking block P3220 grouping with this damage block D.Last XOR unit 2 with all block D that read (i, j) and P (j) make XOR, the gained result is exactly damage block D (i, j) (the step S43) that needs.
As shown in figure 10, be that the error-checking block Q method of utilizing of disk tolerance method of the present invention is rebuild the process flow diagram of single damage block.When the block D that finds disk 30 (i, j) during damage, also can utilize in the error-checking block Q3230 grouping on the same group other block 3210 and error-checking block Q3230 as XOR calculate damage block D (i, j).Damage block D (i with this in central processing unit 1 reading disk 30, j) same group error-checking block Q (k) (step S51), (i j) is other block 3210 (step S52) of k group in error-checking block Q3230 grouping then to read and damage block D.Last XOR unit 2 with all block D that read (i, j) and Q (k) make XOR, the gained result is exactly damage block D (i, j) (the step S53) that needs.
As shown in figure 11, be the single damage disk of the repairing process flow diagram of disk tolerance method of the present invention.When general disk array 3 runs into disk damage is arranged, can want to replace the damage disk with new disk, originally the data that were stored in the damage disk then need other member of disk array 3 and error-checking block P (j) or error-checking block Q (k) to rebuild, and the data of having rebuild just can write new disk.At first take out the damage disk, insert a new disk, and make prime number n>4, j=0 (step S61).Central processing unit 1 and XOR unit 2 utilize error-checking block P method or utilize error-checking block Q method to rebuild each the block D (i that is stored in originally on the damage disk 30, j) (step S62), and with the block D that rebuilds (i j) writes new disk (step S63).Central processing unit 1 is done the j=j+1 computing then, promptly prepares to repair the next block 3210 (step S64) of this damage disk 30.Whether last central processing unit 1 judges j less than (n-1), whether checks promptly that all are originally i data whether all rebuilt (step S65) of damaging on the disk 30.If illustrate that being stored in the data of i damage on the disk 30 does not in addition originally have rebuilt come out, and re-executes step S62 so; If not, illustrating that all were stored in originally that the data of i damage on the disk 30 are all rebuilt comes out, this flow process finishes so.
As shown in figure 12, be the process flow diagram of two damages of repairing disk of disk tolerance method of the present invention.At first make central processing unit 1 initiation parameter, even prime number n>4, a<b, y=b-a-1 and j=0, wherein a and b represent the numbering of two damage disks 30 respectively, and j represents to damage j data block 3210 on the disk 30, and y is an intermediate parameters (step S71).Central processing unit 1 is done k=((a+b) mod n) computing, and wherein k is an intermediate parameters (step S72).Central processing unit 1 and XOR unit 2 utilize error-checking block Q (k) method come data reconstruction block D (a, y) (step S73), and with the D that rebuilds (a y) writes a new disk 30 (step S74).Then central processing unit 1 and XOR unit 2 utilize error-checking block P (y) method come data reconstruction block D (b, y) (step S75), and with D (b y) writes another new disk 30 (step S76).Central processing unit is done y=((y+ (b-a)) modn) and j=j+1 computing then, promptly prepare to rebuild next damage block 3210 (step S77), and whether judge j less than n-1, i.e. all whether the block 3210 in the judgement damage disk 30 rebuilt finishing (step S78).If illustrate that the block 3210 of damaging in addition in the disk 30 does not have rebuilt finishing, and re-executes step S72 so; If not, block 3210 whole rebuilt finishing is described in the damage disk 30, whole procedure finishes so, finishes to repair two and damage disks 30.
When 30 damages of two disks are arranged in the disk array 3, available two new disks replace the damage disk, utilization is stored in other block 3210 of not damaging on the disk and reconstructs the block 3210 that is stored in damage disk 30 originally then, and how the explanation of below giving one example progressively repairs the step of each block 3210.Originally the block 3210 in the disk array 3 is as shown in table 3 below:
Table 3
Disk0 Disk1 Disk2 Disk3 Disk4 Disk5 Disk6
D(0,0) D(1,0) D(2,0) D(3,0) D(4,0) P(0) Q(0)
D(0,1) D(1,1) D(2,1) D(3,1) D(4,1) P(1) Q(1)
D(0,2) D(1,2) D(2,2) D(3,2) D(4,2) P(2) Q(2)
D(0,3) D(1,3) D(2,3) D(3,3) D(4,3) P(3) Q(3)
Q(4)
Suppose that damage disk 30 is respectively Disk0 and Disk3, its available (wherein block 3210 of " x " representative damage) as shown in table 4 below:
Table 4
Disk0 Disk1 Disk2 Disk3 Disk4 Disk5 Disk6
x D(1,0) D(2,0) x D(4,0) P(0) Q(0)
x D(1,1) D(2,1) x D(4,1) P(1) Q(1)
x D(1,2) D(2,2) x D(4,2) P(2) Q(2)
x D(1,3) D(2,3) x D(4,3) P(3) Q(3)
Q(4)
Check error-checking block P3220 grouping earlier:
P(0)=D(0,0)D(1,0)D(2,0)D(3,0)D(4,0);
P(1)=D(0,1)D(1,1)D(2,1)D(3,1)D(4,1);
P(2)=D(0,2)D(1,2)D(2,2)D(3,2)D(4,2);
P(3)=D(0,3)D(1,3)D(2,3)D(3,3)D(4,3);
Because the block 3210 of each group error-checking block P3220 all has two damages, so can't utilize error-checking block P method to repair at present.Reexamine error-checking block Q3230 grouping:
Q(0)=D(0,0)D(4,1)D(3,2)D(2,3);
Q(1)=D(1,0)D(0,1)D(4,2)D(3,3);
Q(2)=D(2,0)D(1,1)D(0,2)D(4,3);
Q(3)=D(3,0)D(2,1)D(1,2)D(0,3);
Q(4)=D(4,0)D(3,1)D(2,2)D(1,3);
Find that this group of Q (2) has only a data block D (0,2) damage, all the other are all intact, thus can utilize D (0,2)=Q (2) D (2,0) D (1,1) D (4,3) to repair block D (0,2), can be as following table 5 results after having repaired:
Table 5
Disk0 Disk1 Disk2 Disk3 Disk4 Disk5 Disk6
x D(1,0) D(2,0) x D(4,0) P(0) Q(0)
x D(1,1) D(2,1) x D(4,1) P(1) Q(1)
D(0,2) D(1,2) D(2,2) x D(4,2) P(2) Q(2)
x D(1,3) D(2,3) x D(4,3) P(3) Q(3)
Q(4)
Find this moment, again can by P (2) with and on the same group block 3210 repair block D (3,2), i.e. D (3,2)=P (2) D (0,2) D (1,2) D (2,2) D (4,2), can be as following table 6 results after having repaired:
Table 6
Disk0 Disk1 Disk2 Disk3 Disk4 Disk5 Disk6
x D(1,0) D(2,0) x D(4,0) P(0) Q(0)
x D(1,1) D(2,1) x D(4,1) P(1) Q(1)
D(0,2) D(1,2) D(2,2) D(3,2) D(4,2) P(2) Q(2)
x D(1,3) D(2,3) x D(4,3) P(3) Q(3)
Q(4)
Can utilize again this moment Q (0) with and on the same group block 3210 repair block D (0,0), i.e. D (0,0)=Q (0) D (4,1) D (3,2) D (2,3), can be as following table 7 results after having repaired:
Table 7
Disk0 Disk1 Disk2 Disk3 Disk4 Disk5 Disk6
D(0,0) D(1,0) D(2,0) x D(4,0) P(0) Q(0)
x D(1,1) D(2,1) x D(4,1) P(1) Q(1)
D(0,2) D(1,2) D(2,2) D(3,2) D(4,2) P(2) Q(2)
x D(1,3) D(2,3) x D(4,3) P(3) Q(3)
Q(4)
Find this moment, again can by P (0) with and on the same group block 3210 repair block D (3,0), i.e. D (3,0)=P (0) D (0,2) D (1,2) D (2,2) D (4,0), can be as following table 8 results after having repaired:
Table 8
Disk0 Disk1 Disk2 Disk3 Disk4 Disk5 Disk6
D(0,0) D(1,0) D(2,0) D(3,0) D(4,0) P(0) Q(0)
x D(1,1) D(2,1) x D(4,1) P(1) Q(1)
D(0,2) D(1,2) D(2,2) D(3,2) D(4,2) P(2) Q(2)
x D(1,3) D(2,3) x D(4,3) P(3) Q(3)
Q(4)
Can utilize again this moment Q (3) with and on the same group block 3210 repair block D (0,3), i.e. D (0,3)=Q (3) D (3,0) D (3,1) D (1,2), can be as following table 9 results after having repaired:
Table 9
Disk0 Disk1 Disk2 Disk3 Disk4 Disk5 Disk6
D(0,0) D(1,0) D(2,0) D(3,0) D(4,0) P(0) Q(0)
x D(1,1) D(2,1) x D(4,1) P(1) Q(1)
D(0,2) D(1,2) D(2,2) D(3,2) D(4,2) P(2) Q(2)
D(0,3) D(1,3) D(2,3) x D(4,3) P(3) Q(3)
Q(4)
Find this moment, again can by P (3) with and on the same group block 3210 repair block D (3,3), i.e. D (3,3)=P (3) D (0,3) D (1,3) D (2,3) D (4,3), can be as following table 10 results after having repaired:
Table 10
Disk0 Disk1 Disk2 Disk3 Disk4 Disk5 Disk6
D(0,0) D(1,0) D(2,0) D(3,0) D(4,0) P(0) Q(0)
x D(1,1) D(2,1) x D(4,1) P(1) Q(1)
D(0,2) D(1,2) D(2,2) D(3,2) D(4,2) P(2) Q(2)
D(0,3) D(1,3) D(2,3) D(3,3) D(4,3) P(3) Q(3)
Q(4)
Can utilize again this moment Q (1) with and on the same group block 3210 repair block D (0,1), i.e. D (0,1)=Q (1) D (1,0) D (4,2) D (3,3), can be as following table 11 results after having repaired:
Table 11
Disk0 Disk1 Disk2 Disk3 Disk4 Disk5 Disk6
D(0,0) D(1,0) D(2,0) D(3,0) D(4,0) P(0) Q(0)
D(0,1) D(1,1) D(2,1) x D(4,1) P(1) Q(1)
D(0,2) D(1,2) D(2,2) D(3,2) D(4,2) P(2) Q(2)
D(0,3) D(1,3) D(2,3) D(3,3) D(4,3) P(3) Q(3)
Q(4)
Find this moment, again can by P (1) with and on the same group block 3210 repair block D (3,1), i.e. D (3,1)=P (1) D (0,1) D (1,1) D (2,1) D (4,1), can be as following table 12 results after having repaired:
Table 12
Disk0 Disk1 Disk2 Disk3 Disk4 Disk5 Disk6
D(0,0) D(1,0) D(2,0) D(3,0) D(4,0) P(0) Q(0)
D(0,1) D(1,1) D(2,1) D(3,1) D(4,1) P(1) Q(1)
D(0,2) D(1,2) D(2,2) D(3,2) D(4,2) P(2) Q(2)
D(0,3) D(1,3) D(2,3) D(3,3) D(4,3) P(3) Q(3)
Q(4)
So, just respectively the block 301 of Disk0 and all damages of Disk3 has been rebuild.
Claims (20)
1. disk fault-tolerant system, it can repair the disk of two damages in disk array, and this system comprises:
One disk array, this disk array comprises a plurality of disks, these a plurality of disks logically are divided into:
A plurality of data segments, these a plurality of data segments comprise a plurality of block, are used to store a plurality of data; And
Two groups of error-checking sections are used for the error-checking of a plurality of data segments and the block of rebuilding the damage disk, and then repair the disk of damaging in this disk array;
One central processing unit is used to ask modulo operation, shift operation and address translation computing and control operation;
When being used to produce the error-checking block and rebuilding the block of damaging, does one XOR unit XOR;
Described central processing unit and XOR unit are connected with described disk array by a system bus.
2. disk fault-tolerant system as claimed in claim 1, it is characterized in that, described two groups of error-checking sections comprise an error-checking section P and an error-checking section Q, described error-checking section P comprises a plurality of error-checking block P (j), and described error-checking section Q comprises a plurality of error-checking block Q (k).
3. disk fault-tolerant system as claimed in claim 1 is characterized in that, described central processing unit also comprises asks modulo operation unit, a shift operation unit and an address conversioning unit.
4. disk fault-tolerant system as claimed in claim 1 is characterized in that, described a plurality of data segments and two groups of error-checking sections need be done a displacement rotation by described shift operation unit in disk array.
5. disk fault-tolerant system as claimed in claim 1 is characterized in that, described XOR unit is made up of a plurality of XOR gate.
6. disk fault-tolerant system as claimed in claim 1 is characterized in that, described XOR unit can be contained in the central processing unit, also can be independent of outside the central processing unit.
7. one kind in the data block of disk array group technology, (i j) logically need carry out the grouping of twice different grouping method respectively to its each block D, and one group is designated as error-checking block P grouping, another group is designated as error-checking block Q grouping, and this group technology comprises:
Indicate each error-checking block P (j);
With block D (i, j) (i j) is divided in the error-checking block P grouping block D that the j value in is identical with the label j of error-checking block P (j);
Indicate each error-checking block Q (k);
(i, j) (i j) is divided in the error-checking block Q grouping block D that ((i+j) mod n) value in is identical with the label k of error-checking block Q (k) with block D.
8. as claimed in claim 7 in disk array the group technology of block, it is characterized in that the data of described error-checking block P (j) are for belonging to the whole XOR values of all block in the error-checking block P grouping.
9. as claimed in claim 7 in disk array the group technology of block, it is characterized in that the data of described error-checking block Q (k) are all and the whole XOR values of block of the identical sign of this error-checking block Q (k).
10. method of block in the read-write disk in disk array, by using XOR, but the data of a data set in the fast reading and writing disk array, this method comprises:
Convert the logical address in the disk array to a physical address;
Read block original in the physical address, error-checking block P (j) and error-checking block Q (k);
Calculate one need write error-checking block P ' new in the described disk (j) and error-checking block Q ' (k);
The block that need are write, new error-checking block P ' (j) and new error-checking block Q ' (k) write in the physical address of this disk.
11. the method for in disk array, reading and writing block in the disk as claimed in claim 10, it is characterized in that, the method that described logical address converts physical address to is: which data set is the block that calculates this logical address earlier belong to, and then calculates the physical address of described block.
12. the method for in disk array, reading and writing block in the disk as claimed in claim 10, it is characterized in that the new error-checking block P ' method (j) of described calculating is: described original error-checking block P (j), original block and new block are made XOR.
13. the method for in disk array, reading and writing block in the disk as claimed in claim 10, it is characterized in that the new error-checking block Q ' method (k) of described calculating is: described original error-checking block Q (k), original block and new block are made XOR.
14. a disk tolerance method after each block in the disk array is logically carried out the grouping of twice different grouping method respectively, can be repaired the disk of two damages in disk array, this method comprises:
Check the wherein block and the error-checking block of two damage disks;
Utilize an error-checking block Q method to rebuild a block of first damage disk, and it is write a new disk;
Utilize an error-checking block P method to rebuild a block of second damage disk, and it is write another new disk;
Whether the block of judging these two damage disks is respectively all rebuild and is finished;
Do not finish if the block of these two damage disks is rebuild, re-execute above step so;
If all rebuilding, the block of these two damage disks finishes, so termination routine.
15. disk tolerance method as claimed in claim 14, it is characterized in that, the described block of utilizing error-checking block P method to rebuild damage is meant and utilizes in the error-checking block P grouping on the same group other not damage block and error-checking block P calculates the block of damage as XOR.
16. disk tolerance method as claimed in claim 14, it is characterized in that, the described block of utilizing error-checking block Q method to rebuild damage is meant and utilizes in the error-checking block Q grouping on the same group other not damage block and error-checking block Q calculates the block of damage as XOR.
17. disk tolerance method as claimed in claim 14 is characterized in that, two disks of described fault tolerant are meant can be repaired single damage disk and repair two damage disks.
18. disk tolerance method as claimed in claim 17 is characterized in that, can adopt described error-checking block P method during the single damage disk of described repairing.
19. disk tolerance method as claimed in claim 17 is characterized in that, can adopt described error-checking block Q method during the single damage disk of described repairing.
20. a disk fault-tolerant system, it can repair the disk of two damages in disk array, and this system comprises:
One disk array comprises a plurality of disks, and these a plurality of disks logically are divided into:
A plurality of data segments, these a plurality of data segments comprise that (i j), is used to store a plurality of data to a plurality of block D;
Two groups of error-checking sections are used for the error-checking of a plurality of data segments and the block of rebuilding the damage disk, and then repair the disk of damaging in this disk array, and these two groups of error-checking sections comprise:
One error-checking section P, this error-checking section P comprises a plurality of error-checking block P (j), the data of each error-checking block P (j) are and all block Ds (i, j) the whole XOR values of described error-checking block P (j) for same group;
One error-checking section Q, this error-checking section Q includes a plurality of error-checking block Q (k), the data of each error-checking block Q (k) are block D (i, all block D (i, whole XOR values j) that j) value of in ((i+j) mod n) is identical with label k value;
One central processing unit is used to ask modulo operation, shift operation and address translation computing and control operation;
XOR is done in one XOR unit when being used to produce error-checking block P (j), error-checking block Q (k) and rebuilding the block of damaging;
Described central processing unit and XOR unit are connected with described disk array by a system bus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB200410015361XA CN100419700C (en) | 2004-02-11 | 2004-02-11 | Disk faulttolerant system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB200410015361XA CN100419700C (en) | 2004-02-11 | 2004-02-11 | Disk faulttolerant system and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1655126A true CN1655126A (en) | 2005-08-17 |
CN100419700C CN100419700C (en) | 2008-09-17 |
Family
ID=34892156
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB200410015361XA Expired - Fee Related CN100419700C (en) | 2004-02-11 | 2004-02-11 | Disk faulttolerant system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100419700C (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100403249C (en) * | 2006-06-19 | 2008-07-16 | 威盛电子股份有限公司 | Magnetic disk array data configuration structure and data acces method thereof |
CN100410866C (en) * | 2006-09-06 | 2008-08-13 | 威盛电子股份有限公司 | Computer system with magnetic disk array control function and magnetic disk array control method |
CN101625652B (en) * | 2009-08-04 | 2011-06-08 | 成都市华为赛门铁克科技有限公司 | Multi-disk fault-tolerant system and methods for generating check block and recovering data block |
CN115562594A (en) * | 2022-12-06 | 2023-01-03 | 苏州浪潮智能科技有限公司 | Method, system and related device for constructing RAID card |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5522032A (en) * | 1994-05-05 | 1996-05-28 | International Business Machines Corporation | Raid level 5 with free blocks parity cache |
US5960169A (en) * | 1997-02-27 | 1999-09-28 | International Business Machines Corporation | Transformational raid for hierarchical storage management system |
KR100267366B1 (en) * | 1997-07-15 | 2000-10-16 | Samsung Electronics Co Ltd | Method for recoding parity and restoring data of failed disks in an external storage subsystem and apparatus therefor |
US6353895B1 (en) * | 1998-02-19 | 2002-03-05 | Adaptec, Inc. | RAID architecture with two-drive fault tolerance |
US6223323B1 (en) * | 1998-07-17 | 2001-04-24 | Ncr Corporation | Method for storing parity information in a disk array storage system |
-
2004
- 2004-02-11 CN CNB200410015361XA patent/CN100419700C/en not_active Expired - Fee Related
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100403249C (en) * | 2006-06-19 | 2008-07-16 | 威盛电子股份有限公司 | Magnetic disk array data configuration structure and data acces method thereof |
CN100410866C (en) * | 2006-09-06 | 2008-08-13 | 威盛电子股份有限公司 | Computer system with magnetic disk array control function and magnetic disk array control method |
CN101625652B (en) * | 2009-08-04 | 2011-06-08 | 成都市华为赛门铁克科技有限公司 | Multi-disk fault-tolerant system and methods for generating check block and recovering data block |
US8489916B2 (en) | 2009-08-04 | 2013-07-16 | Chengdu Huawei Symantec Technologies Co., Ltd. | Multi-disk fault-tolerant system, method for generating a check block, and method for recovering a data block |
CN115562594A (en) * | 2022-12-06 | 2023-01-03 | 苏州浪潮智能科技有限公司 | Method, system and related device for constructing RAID card |
CN115562594B (en) * | 2022-12-06 | 2023-03-24 | 苏州浪潮智能科技有限公司 | Method, system and related device for constructing RAID card |
WO2024119762A1 (en) * | 2022-12-06 | 2024-06-13 | 苏州元脑智能科技有限公司 | Raid card construction method and system, and related apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN100419700C (en) | 2008-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1201336C (en) | Method of encoding data signals for storage | |
CN1245689C (en) | Method and system for upgrading drive firmware in a non-disruptive manner | |
US10795590B2 (en) | Method and apparatus for flexible RAID in SSD | |
CN1058096C (en) | Apparatus for recording of arrays | |
US5754753A (en) | Multiple-bit error correction in computer main memory | |
CN101064162A (en) | Error correction device, encoder, decoder, method ,and information storage device | |
US20180121347A1 (en) | Flash memory apparatus and storage management method for flash memory | |
US20170317693A1 (en) | Flash memory apparatus and storage management method for flash memory | |
US5459742A (en) | Solid state disk memory using storage devices with defects | |
CN100345099C (en) | Method and system for increasing parallelism of disk accesses when restoring data in a disk array system | |
CN1848070A (en) | Data storage device, reconstruction controlling device, reconstruction controlling method, and storage medium | |
US5343426A (en) | Data formater/converter for use with solid-state disk memory using storage devices with defects | |
CN1801105A (en) | System and method for tolerating multiple storage device failures in a storage system using horizontal and vertical parity layouts | |
CN1808367A (en) | Storage system | |
CN1332459A (en) | Semiconductor integrated circuit and its storage repairing method | |
CN1959843A (en) | Device and method for regenerating information stored in memory medium | |
CN105159618A (en) | Optimization method and optimization device for single-disk failure restoration | |
CN1426583A (en) | Method and device for data on-line | |
CN1851635A (en) | Method and system for read-write operation to cheap magnetic disk redundant array | |
CN1862524A (en) | Sparse convolution of multiple vectors in a digital signal processor | |
WO2023184911A1 (en) | Data storage method and apparatus, and device and non-volatile readable storage medium | |
CN1893282A (en) | An inter-sequence permutation turbo code system and operation method therefor | |
CN1655126A (en) | Disk faulttolerant system and method | |
CN1959648A (en) | Data protection method | |
US7356757B2 (en) | Fault tolerance system and method for one or two failed disks in a disk array |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20080917 Termination date: 20140211 |