The content of the invention
In view of this, the present invention provides a kind of RAID data processing unit, and applied in computer system, the RAID includes
N+m member's disk, the wherein each sticks of the RAID are divided into w subelement, and each band includes k in the RAID
According to subelement and j verification subelement, wherein j=wxm, k=wxn, wherein n, m and w are natural number, and w is more than 1;Each
Verification subelement is under the jurisdiction of a verification group, and each verification group also includes the data sub-element collection that multiple data sub-elements are constituted
Close, the data sub-element set of each verification group is different in each band;It is multiple in each verification group in each band
Position of the data sub-element in band is uniquely corresponding to multiple in default RAID generator matrixes correspondence a line effectively identify
Position;The device includes writing processing module and reads processing unit;Wherein:
Processing module is write, for handling the write order from user side, when failure member number of disks is less than or equal to m
When, determine the data sub-element write the need for write order correspondence;Update the number of users in the data sub-element for needing to write
According to, and update the verification data in verification group belonging to all data sub-elements in verification subelement using default checking algorithm;
Processing module is read, for handling the read command from user side, when failure member number of disks is less than or equal to m
When, the data sub-element read the need for read command correspondence is determined, the data sub-element if desired read is located at normal condition
Member's disk on, corresponding user data is read from the data sub-element, the data sub-element if desired read be located at therefore
Hinder on member's disk, then current addressable data sub-element and syndrome list in the recovery group according to belonging to the data sub-element
Data in member recover the user data in the data sub-element using the default checking algorithm.
Further, it is using the specific formula of default checking algorithm renewal verification data:
Subelement wherein in the formula where all data constitutes a verification group, and h is the natural number less than or equal to j;x
It is the natural number less than or equal to k with y;chRepresent to verify the verification data in subelement in the band in h-th of verification group;
dx......dyFor the user data in multiple data sub-elements in the verification group, every number wherein in data sub-element set
Multiple positions effectively identified in h rows are corresponded respectively in the RAID generator matrixes according to position of the subelement in band;Represent XOR.
Further, the generator matrix of the RAID is the matrix of a j rows k row, wherein the i-th column element of h rows ahiIt is right
I-th of data sub-element in band is answered, if ahiFor effectively mark, represent band in i-th of data sub-element belong to h-th
Verification group;If ahiFor invalidated identification, represent that i-th of data sub-element is not belonging to h-th of verification group.
Further, having between the generator matrix of the RAID and selected m row n row Galois Field constant matrices is reflected
Relation is penetrated, its mapping relations is:Generated after each constant in the constant matrices is converted into the embedded matrix of a w rows w row
Matrix be the RAID generator matrixes, wherein w is the Galois Field constant matrices Galois Field bit wide.
Further, the constant matrices is full rank, and any submatrix of the matrix is also full rank.
Further, wherein the n is more than or equal to the w powers that m, n and m sum are less than or equal to 2.
Further, it is using the specific formula of the default checking algorithm restoring user data:
Wherein, u is the natural number less than or equal to j;X is the natural number less than or equal to k;All data compositions one in the formula
Individual recovery group, dwFor the user data in the data sub-element of inaccessible in a recovery group;Cu...... it is the recovery group
In it is addressable verification subelement in verification data;Dx...... represent in the recovery group in addressable data sub-element
User data;Represent XOR;Position of each subelement on disk corresponds to RAID recovery squares in one recovery group
Multiple effective marks in battle array in a line.
Further, the RAID recovers the matrix that matrix is a j rows s row, and wherein s=w ×(m+n);The RAID is extensive
The i-th column element of h rows a in complex matrixhiI-th of subelement in correspondence band, if ahiFor effectively mark, represent band in
I-th of subelement belongs to h-th of recovery group;If ahiFor invalidated identification, represent that i-th of subelement is not belonging to h-th of verification group.
Further, in addition to matrix disposal module, the matrix disposal module is used for according to default RAID extended matrixes
Generate the RAID and recover matrix, the process of generation includes:By row progress pair corresponding with failed disk in RAID extended matrixes
Angling processing recovers matrix to generate the RAID;The diagonalization that the RAID extended matrixes are arranged by RAID generator matrixes and j rows j
Check matrix docking is formed;Include an effectively mark in the check matrix per a line, effective mark is in check matrix
Position and RAID generator matrixes to dock position of the corresponding verification subelement of row in band corresponding.
Further, in addition to rebuild processing module, wherein the reconstruction processing module using the default checking algorithm it is extensive
Multiple verification data, and specifically formula is:
Wherein, u is the natural number less than or equal to j;X is the natural number less than or equal to k;All data compositions one in the formula
Individual recovery group, cvFor the verification data in the verification subelement of inaccessible in a recovery group;cu... in being the recovery group
Verification data in addressable verification subelement;dx... represent the use in addressable data sub-element in the recovery group
User data;Represent XOR;Position of each subelement on disk corresponds to RAID recovery matrixes in one recovery group
Multiple effective marks in middle a line.
The present invention also provides a kind of RAID data processing method, applied in computer system, the RAID include n+m into
Member's disk, the wherein each sticks of the RAID are divided into w subelement, and each band includes k according to sub single in the RAID
Member and j verification subelement, wherein j=wxm, k=wxn, wherein n, m and w are natural number, and w is more than 1;Each syndrome
Unit is under the jurisdiction of a verification group, and each verification group also includes the data sub-element set that multiple data sub-elements are constituted, each
The data sub-element set of each verification group is different in band;Multiple data in each band in each verification group is single
Position of the member in band is uniquely corresponding to multiple positions effectively identified in default RAID generator matrixes correspondence a line;The party
Method comprises the following steps:
Step A, handles the write order from user side, when failure member number of disks is less than or equal to m, it is determined that this is write
The data sub-element write the need for order correspondence;The user data in the data sub-element for needing to write is updated, and using pre-
If checking algorithm updates the verification data in verification subelement in verification group belonging to all data sub-elements;
Step B, handles the read command from user side, when failure member number of disks is less than or equal to m, determines the reading
The data sub-element read the need for order correspondence, the data sub-element if desired read is located at member's disk of normal condition
On, corresponding user data is read from the data sub-element, the data sub-element if desired read is located at failure member's disk
On, then in the recovery group according to belonging to the data sub-element current addressable data sub-element and verification subelement in data
The user data in the data sub-element is recovered using the default checking algorithm.
Further, it is using the specific formula of default checking algorithm renewal verification data:
Subelement wherein in the formula where all data constitutes a verification group, and h is the natural number less than or equal to j;x
It is the natural number less than or equal to k with y;chRepresent to verify the verification data in subelement in the band in h-th of verification group;
dx......dyFor the user data in multiple data sub-elements in the verification group, every number wherein in data sub-element set
Multiple positions effectively identified in h rows are corresponded respectively in the RAID generator matrixes according to position of the subelement in band;Represent XOR.
Further, the generator matrix of the RAID is the matrix of a j rows k row, wherein the i-th column element of h rows ahiIt is right
I-th of data sub-element in band is answered, if ahiFor effectively mark, represent band in i-th of data sub-element belong to h-th
Verification group;If ahiFor invalidated identification, represent that i-th of data sub-element is not belonging to h-th of verification group.
Further, having between the generator matrix of the RAID and selected m row n row Galois Field constant matrices is reflected
Relation is penetrated, its mapping relations is:Generated after each constant in the constant matrices is converted into the embedded matrix of a w rows w row
Matrix be the RAID generator matrixes, wherein w is the Galois Field constant matrices Galois Field bit wide.
Further, the constant matrices is full rank, and any submatrix of the matrix is also full rank.
Further, wherein the n is more than or equal to the w powers that m, n and m sum are less than or equal to 2.
Further, it is using the specific formula of the default checking algorithm restoring user data:
Wherein, u is the natural number less than or equal to j;X is the natural number less than or equal to k;All data compositions one in the formula
Individual recovery group, dwFor the user data in the data sub-element of inaccessible in a recovery group;Cu...... it is the recovery group
In it is addressable verification subelement in verification data;Dx...... represent in the recovery group in addressable data sub-element
User data;Represent XOR;Position of each subelement on disk corresponds to RAID recovery matrixes in one recovery group
Multiple effective marks in middle a line.
Further, the RAID recovers the matrix that matrix is a j rows s row, and wherein s=w ×(m+n);The RAID is extensive
The i-th column element of h rows a in complex matrixhiI-th of subelement in correspondence band, if ahiFor effectively mark, represent band in
I-th of subelement belongs to h-th of recovery group;If ahiFor invalidated identification, represent that i-th of subelement is not belonging to h-th of verification group.
Further, in addition to:
Step C, generates the RAID according to default RAID extended matrixes and recovers matrix, the process of generation includes:Will
Row corresponding with failed disk carry out diagonalization processing to generate the RAID recoveries matrix in RAID extended matrixes;The RAID
The diagonalization check matrix docking that extended matrix is arranged by RAID generator matrixes and j rows j is formed;Per a line bag in the check matrix
An effectively mark is included, the position of effective mark in check matrix syndrome list corresponding with RAID generator matrixes docking row
Position of the member in band is corresponding.
Further, in addition to:Step D, verification data is recovered in process of reconstruction using the default checking algorithm, and
Specifically formula is:
Wherein, u is the natural number less than or equal to j;X is the natural number less than or equal to k;All data compositions one in the formula
Individual recovery group, cvFor the verification data in the verification subelement of inaccessible in a recovery group;cu... in being the recovery group
Verification data in addressable verification subelement;dx... represent the use in addressable data sub-element in the recovery group
User data;Represent XOR;Position of each subelement on disk corresponds to RAID recovery matrixes in one recovery group
Multiple effective marks in middle a line.
In terms of existing technologies, the present invention realizes the RAID that same checking algorithm supports multiple check disks, and
Verify calculating process relatively easy, it is not necessary to complicated calculating process.
Embodiment
In view of the shortcomings of the prior art, the present invention proposes a kind of brand-new RAID implementations, is supported using single algorithm
Multiple disks break down simultaneously when, remain able to recover data, and to multiple faulty disks without requirement in logic, lift RAID
The flexibility used and robustness.In realization, data cell or school are used as relative to using a stick in traditional RAID stripe
Stick is further subdivided into smaller subelement by the design of verification certificate member, the present invention, and the subelement of storage user data is referred to as number
According to subelement, in the verification data write-in verification subelement that data XOR is obtained in multiple data sub-elements, data is single
First and corresponding verification subunit constitutes a verification group.In the following description, unless otherwise noted, the word of all expression quantity
Mother is natural number.
Fig. 2 is refer to, in a preferred embodiment, the present invention provides a kind of applied to enhanced in computer system
RAID data processing unit, the RAID includes n+m member's disk, and the wherein each sticks of the RAID are divided into w son list
Each band includes k according to subelement and j verification subelement, wherein wherein j=wxm, k=wxn, n, m in member, the RAID
And w is natural number, w is more than 1;Each verification subelement is under the jurisdiction of a verification group, and each verification group also includes many numbers
The data sub-element set of each verification group is different in the data sub-element set constituted according to subelement, each band;Often
Position of multiple data sub-elements in band in individual band in each verification group is uniquely corresponding to default RAID generations square
The multiple position effectively identified devices include writing processing module and read processing unit in battle array correspondence a line.RAID processing dresses
Put including:Write processing module and read processing module.The computer system refers to the equipment for including several member's disks, its
It is probably any form of computing system, such as work station, either server or the special network storage equipment, or even can
It can be personal main frame.It should be noted that RAID data processing unit can use software to realize, hardware can also be used to realize,
The such as form such as RAID plug-in cards, it might even be possible to realized using the mode of soft or hard combination.The processing procedure of the device includes following step
Suddenly:
Processing module is write, for handling the write order from user side, when failure member number of disks is less than or equal to m
When, determine the data sub-element write the need for write order correspondence;Update the number of users in the data sub-element for needing to write
According to, and update the verification data in verification group belonging to all data sub-elements in verification subelement using default checking algorithm;
Processing module is read, for handling the read command from user side, when failure member number of disks is less than or equal to m
When, the data sub-element read the need for read command correspondence is determined, the data sub-element if desired read is located at normal condition
Member's disk on, corresponding user data is read from the data sub-element, the data sub-element if desired read be located at therefore
Hinder on member's disk, then current addressable data sub-element and syndrome list in the recovery group according to belonging to the data sub-element
Data in member recover the user data in the data sub-element using the default checking algorithm.
N represents the number of the data disks in a RAID stripe as previously described, and m represents the verification list in a RAID stripe
The upper limit of the patient failed disk number of first number, the i.e. RAID.In addition to n and m, also introduce Galois Field bit wide w this
Individual parameter, in the case of being not particularly illustrated below, each parameter for characterizing quantity is natural number.Above-mentioned parameter in RAID
It is generally necessary to meet formula(1)With(2)Basic constraints:
n≥m (1)
2w≥n+m (2)
In the present invention, w × m verification group will be included in a RAID band, each verification group includes a school
Test subelement.The corresponding relation of data sub-element and verification subelement can be by a RAID generator matrix come table in verification group
Reach.The RAID of this in Fig. 4 generator matrixes from m rows n row original constant matrices, element in the original constant matrices by
Element in selected Galois Field is constituted, and generally meets following 2 conditions:
Condition one:Constant matrices is full rank, i.e., constant matrices is that reversible, each row is all linear incoherent.
Condition two:Any submatrix of constant matrices is also full rank, i.e. any submatrix of constant matrices is reversible, each
Row is all linear incoherent.
Meeting the original constant matrices of above-mentioned condition has a variety of, and one of which matrix may be selected when realizing and make by developer
For original constant matrices.Each constant can be exchanged into a unique corresponding w rows w and arrange by " 0 " in the original constant matrices chosen
The embedded matrix that " 1 " is constituted, obtains matrix after all original constant matrices conversions and is referred to as RAID generator matrixes.The RAID is generated
Matrix is j row k column matrix, wherein, j=(w×m), k=(w×n), such as formula(3)It is shown:
The i-th column element of h rows a in RAID generator matrixeshiI-th of data sub-element in correspondence band, if ahiTo have
Criterion is known, and represents that i-th of data sub-element belongs to h-th of verification group in band;If ahiFor invalidated identification, i-th of number is represented
H-th of verification group is not belonging to according to subelement;The wherein a in preferred modehiValue correspond to and invalidated identification and have respectively for 0 or 1
Criterion is known.All data sub-elements are numbered in order in a RAID band, and all verification subelements are in sequence
It is numbered.The line number of RAID generator matrixes is represented to verify the numbering of subelement, and the element of all numerical value 1 is constituted in the row
One effective mark group.After having a RAID generator matrixes, it is possible to according to formula(4)Subelement is verified to calculate in verification group
Verification data.
The wherein formula(4)In subelement where all data constitute a verification group, h is the nature less than or equal to j
Number;X and y is the natural number less than or equal to k;chRepresent to verify the verification data in subelement in the band in h-th of verification group;
dx......dyFor the user data in multiple data sub-elements in the verification group, every number wherein in data sub-element set
Multiple positions effectively identified in h rows are corresponded respectively in the RAID generator matrixes according to position of the subelement in band;Represent XOR.
Illustrated below by taking the RAID of 8 disk compositions as an example.Assuming that the RAID includes 5 data disks;3 check disks;
The decile of band 3;Now n=5, m=3, w=3, j==m × w=9, k=n × w=15, it is assumed that original constant matrices is such as formula(5)Institute
Show:
The transformational relation shown in Fig. 3 is refer to, each constant in original constant matrices is done into embedded matrix converts, and this is original
Constant matrices obtains corresponding RAID generator matrixes such as formula after above-mentioned conversion(6)It is shown:
It refer to shown in Fig. 4, it is assumed that middle de, f represent the user data in data sub-element, cp, q represents to verify subelement
In verification data.According to above-mentioned RAID generator matrixes, the relation in each verification group between verification data and user data can
To pass through formula group(7)In 9 verification groups description.
Figure 4, it is seen that in first verification group, check the 1st row of RAID generator matrixes it is recognised that the 1st,
4th, 5,9,10,11,12, the numerical value of 14 is 1, and this 8 numerical value can be understood as RAID corresponding with first verification subelement
Effective mark group in generator matrix in the 1st row.So participate in calculating verification data c0,0 in first verification group in band 1
User data is respectively the 1st, the user data in 4,5,9,10,11,12,14 data sub-elements, and then can obtain formula
Group(7)In first operation relation.The calculation of other verification datas is similar, repeats no more.
In the case of all disks are in place and normal in RAID, when receiving read command from user side, directly read
User data in corresponding data sub-element.When receiving write order from user side, it is necessary to according to formula(7)First count
Verification data is calculated, can be handled according to below step:
(1)It is determined that the verification group involved by write-in data, determines to need data for participating in calculating single in those verification groups
First user data, for the data sub-element without write-in, the user data in the retaking of a year or grade data sub-element;
(2)According to formula(7)Calculate the new verification data of those verification groups;
(3)New user data is write corresponding data sub-element, verification data write-in correspondence verification subelement.
It is worth noting that, in the present invention, multiple schools may be influenceed by updating the user data in some data sub-element
Group is tested, therefore formula will be obtained when calculating verification data(7)In multiple verification computing formulas, calculate the verifications in multiple verification groups
Data, and it is written to corresponding verification unit.
As it was previously stated, RAID of the present invention supports m check disk, i.e., 1 to arrive in the case of m disk failure, user data is not
It can lose.Under normal circumstances, read user data and be not related to verification data;But after disk failure, read write command will be related to school
Test processing.When receiving read command from user side, if the read command data cell to be accessed may have access to, number can be directly read
According to;If the data cell of read command hit can not be accessed, the number by addressable data cell and verification unit is needed
According to being recovered.Same reason, if there is disk failure in RAID, equally influences whether the processing of write order, as it was previously stated, writing
Order may be related to the user data in back read data subelement, and the user data probably due to disk failure and can not read
Take.Either handle during read command or write order, if the user data in data sub-element can not be read, can adopt
User data is recovered with following manner.
Continuation illustrates restoring user data read procedure with identical example, it is assumed that disk3 failures, corresponds to band 1, i.e.,
Stick D3 loses, including d3,0, d3,1 and d3, the user data in 2 three data sub-elements.Choose verification formula group(7)In
First three verification group formula(8)To solve equation, d3 in equation, 0, d3,1 and d3,2 be unknown number, other are given data.
Solve formula(8), the 2nd row is added to other two rows, here plus actually xor operation, obtain formula(9):
Again by formula(9)In the 3rd row be added on the 1st row, obtain formula(10):
According to formula(10)Data original in d3,0, d3,1 and d3,2 can be calculated.
Introduce the data recovery under a kind of extreme case again below, it is assumed that m disk failures in RAID.Continue above-mentioned
Example, it is assumed that loss is tri- data disks of disk1, disk2, disk3, corresponds to band 1, and the data of loss include d1,0,
D1,1, d1,2, d2,0, d2,1, d2,2, d3,0, d3,1, d3,2 totally 9 data cells, according to above-mentioned thinking, changes verification group
Formula can obtain formula(11):
According to formula(11)Solve equation can calculate d1,0, d1,1, d1,2, d2,0, d2,1, d2,2, d3,0, d3,1,
Original data in d3,2.As long as the quantity that can be seen that failed disk by both the above example is less than or equal to m, the present invention
It can go out need the user data recovered based on same checking algorithm Reverse recovery, only the quantity of failed disk is got over
Greatly, the amount of calculation of backwards calculation is corresponding bigger in calculating process, solves that formula is more complicated, but the algorithm in solution procedure according to
It is so the same, simply direction is reverse solves.
Furthermore, it is contemplated that trigger the problem of calculating complicated when failed disk is more, the present invention is in preferred implementation
A kind of more succinct reset mode is provided in mode, it is substantially still above-mentioned checking algorithm, simply introduce RAID and recover
Matrix carrys out simplified operation process.Based on above-mentioned RAID generator matrixes, a RAID extended matrix is pre-created.In present embodiment
In, said apparatus also includes matrix disposal module, and the matrix disposal module is used to generate institute according to default RAID extended matrixes
State RAID and recover matrix, the process of generation includes:Row corresponding with failed disk in RAID extended matrixes are carried out at diagonalization
Reason recovers matrix to generate the RAID;The RAID extended matrixes verify square by RAID generator matrixes and j rows the j diagonalization arranged
Battle array docking is formed;Include an effectively mark in the check matrix per a line, the position of effective mark in check matrix
It is corresponding that position of the corresponding verification subelement of row in band is docked with RAID generator matrixes.
As it was previously stated, the RAID extended matrixes are docked with check matrix by RAID generator matrixes and formed.The RAID expands
Exhibition matrix is j × r, wherein r=k+j.A RAID extended matrix is created based on the example in Fig. 4, the matrix such as Fig. 5 is
Example, it is assumed that now two disk failures of disk1 and disk2, understands with reference to Fig. 4, recovers in matrix any one in 4-9 row
Individual effective mark all points to a data sub-element that can not be accessed, that is, d1,0、d1,1、d1,2、d2,0、d2,1、d2,2This six
User data subelement where user data can not be accessed.In the present embodiment, carried out around 4-9 row at diagonalization of matrix
Reason, final target is to realize that matrix has 4-9 row all only one of which in 6 rows effectively to identify, that is, only one of which data is single
User data in member is unknown data, can be solved followed by once verification computing and obtain the user data.
The diagonalization of matrix process shown in Fig. 6 is refer to, its target is that 4-9 row are carried out into diagonalization processing, that is,
Row corresponding with failed disk carry out diagonalization processing in RAID extended matrixes.For the 4th row, a line, selected line are chosen first
Criterion knowledge must be there are on the 4th, it can be found that the 4th data of the 1st row are 1 from Fig. 6, criterion knowledge is there are.Now
4th row can be understood as treating zero row, and target is to allow the 4th to arrange the element value of other rows in addition to the 1st row to be all zeroed, also
It is to be changed into invalidated identification.XOR now is carried out with the 3rd, 4,7,8,9 rows respectively with the 1st row, the newline gone out with XOR is distinguished
Replace the original 3rd, 4,7,8,9 rows, the first intermediary matrix is formed after the completion of replacement.Next the 5th row are arranged as waiting to be zeroed,
A line is chosen again, it is desirable to which the 4th column data of selected line is that the 0, the 5th column data is 1, now chooses the row of behavior the 3rd, with the 3rd row point
XOR is not carried out with the 1st, 4,5,8 rows, the second intermediary matrix is formed after replacement.So circulation go down until the 9th row be also zeroed,
Ultimately form a RAID and recover matrix.From fig. 6 it can be seen that it is to present that RAID, which recovers matrix in 4-9 arranges this six row,
Go out diagonalization, i.e. the upper only one of which element of the row of any of which one is 1(Effectively identify).Effective mark is expert at(Computing row)
In, only have the element to be 1 in the 4-9 element, other all 0(Invalidated identification).So because other row are corresponding
Disk is all that only one of which effectively identifies corresponding data sub-element and can not accessed on the disk of normal condition, computing row,
And other data effectively identified in corresponding data sub-element or verification subelement can all be accessed, therefore can be quick
Ground is recovered the user data in the data sub-element by XOR algorithm.
Process more than is it can be concluded that number of users when disk failure thereon in any one data sub-element
According to can be according to formula(12)Recover.
Wherein, u is the natural number less than or equal to j;X is the natural number less than or equal to k;All data compositions one in the formula
Individual recovery group, dwFor the user data in the data sub-element of inaccessible in a recovery group;Cu...... it is the recovery group
In it is addressable verification subelement in verification data;Dx...... represent in the recovery group in addressable data sub-element
User data;Represent XOR;Position of each subelement on disk corresponds to RAID recovery matrixes in one recovery group
Multiple effective marks in middle a line.
Please continue to refer to Fig. 6, the 4th element for recovering the 1st row of matrix for RAID is 1, is effective mark, shows bar
User data d in band in the 4th data sub-element1,0The verification computing of recovery group is participated in, because it is on failed disk disk1,
Therefore the user data seeks to the data recovered.Remaining data for needing to participate in the verification computing of recovery group is d successively0,1、d3,0、
d3,1、d3,2、c0,0、c0,1、c1,0、c2,0, it is all known on normal disk to be all due to these data, is brought into formula 11
It can solve d1,0, it refer to the example of formula 13.
It can be seen from the above that the subelement where the data of computing are participated in a recovery group is in band
Position is to recover effective mark group in matrix a line by RAID to be determined.And it is basis that RAID, which recovers matrix, as previously described
The generation of RAID extended matrixes.As it was previously stated, the process of generation is will be each corresponding with failed disk in RAID extended matrixes
Row carry out diagonalization processing, and finally causing RAID to recover in matrix, only one of which effectively identifies corresponding data on any one row
What unit was inaccessible by.It is worth noting that, when realizing, RAID extended matrixes can substitute RAID generation squares in fact
Battle array, because including RAID generator matrixes in RAID extended matrixes.The embodiment of verification data in foregoing calculating verification group
In can also use RAID extended matrixes, and in fact formula(7)A RAID extended matrix is substantially reflected.
Embodiment more than, which can be seen that the present invention, can not only use single algorithm to support that multiple disks are same
When break down, and the algorithm be fairly simple XOR.In general, the present invention improves RAID flexibility and is good for
Enable to depart in style, and implementation cost is relatively low.So that a RAID includes eight disks as an example, in the scene of high reliability is needed, n can
Think 4, and m can be 4, as long as now the disk of simultaneous faults is no more than 4 in RAID, then user data will not be lost,
And 4 faulty disks can be any disk, no logical requirements.Needing reliability and Capacity Ratio more in a balanced way in scene, n can be with
For 6, and m can be 2;Assuming that all disk sizes are all identical, then can deposit the available capacity of user data can reach
The 75% of all disk sizes.Certain reliability is being needed, but in the scene of limited consideration capacity, n can be 7, and m can be
1.For the developer of field of storage, it no longer needs the difference because RAID, and develops and safeguard many sets and calculate
Method, can be greatly lowered development cost.And for a user, it has broken the inflexible problem of m quantity in the prior art,
Disk is more in RAID, and its flexibility problem is more prominent, and the present invention has no the limitation of this respect.
Furthermore, it is understood that the present invention can further include synchronous processing module and rebuild processing module, for
For RAID synchronizing characteristics, it is to calculate verification data write-in verification subelement, therefore can equally be calculated using foregoing formula
Go out in each verification group the verification data verified in subelement, write corresponding verification subelement.Certainly, one in the present invention
Individual bar, which takes, has multiple verification groups, it is necessary to all verifications in the data and the write-in that calculate multiple verification units respectively, the band
After the verification data of unit writes successfully, just think that the band is synchronously completed.For RAID reconstructions, before equally may be referred to
State and recover the process of data to calculate data original in the data cell that can not be accessed or verification unit, write-in rebuilds disk and is
Can.
In a preferred embodiment, present invention additionally comprises synchronous processing module and reconstruction processing module.The synchronization
Processing module, the verification data calculated according to above-mentioned same checking algorithm in each verification subelement realizes RAID synchronization.
The reconstruction equally applicable above-mentioned checking algorithm of processing module is extensive by the user data in each data sub-element in failed disk
Appear again and come and be written on HotSpare disk in corresponding data sub-element.In process of reconstruction, for the check number in failed disk
According to;The reconstruction processing module can equally use the checking algorithm to be come out data recovery is verified, and its specific formula is formula
(13):
Wherein, u is the natural number less than or equal to j;X is the natural number less than or equal to k;All data compositions one in the formula
Individual recovery group, cvFor the verification data in the verification subelement of inaccessible in a recovery group;cu... in being the recovery group
Verification data in addressable verification subelement;dx... represent the use in addressable data sub-element in the recovery group
User data;Represent XOR;Position of each subelement on disk corresponds to RAID and recovered in matrix in one recovery group
Multiple effective marks in a line.More specifically realize, its principle is consistent with foregoing restoring user data process, no longer go to live in the household of one's in-laws on getting married
State.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
God is with principle, and any modification, equivalent substitution and improvements done etc. should be included within the scope of protection of the invention.