This invention relates to error detection in redundant storage systems.
In the field of this invention it is known to employ, typically periodically, data scrubbing (examining blocks of stored data and reconstructing data in any bad blocks found) in a RAID (Redundant Array of Independent Disks) array to maintain/improve the integrity of the array's stored data.
From patent publication no. WO 02/088922 A2 that data scrubbing may be performed on a storage array of multiple disk drives and controllers by reading data from within a data range from at least one of the disk drives, calculating a new Exclusive-OR (XOR) checksum for the data, comparing the new checksum with a pre-existing checksum for the data, and determining an error if the checksums are not equal.
However, this approach has the disadvantage(s) that it results in significant data traffic on a controller link.
A need therefore exists for scrubbing disk arrays with multiple redundancy wherein the abovementioned disadvantage(s) may be alleviated.
In accordance with a first aspect of the present invention there is provided a storage controller for error detection in an array of a plurality of storage units, comprising: means for receiving from each of the units in the array a value derived from data in a desired segment of the unit; means for comparing the received values from the different units; and means, responsive to the means for comparing, for determining an error in data from one of the units.
Preferably, the value derived from data in a desired segment of the unit is a linear XOR logic combination of the data.
Preferably, the array is a multiply redundant array.
Preferably, the storage units comprise disk drives.
Preferably, the storage controller further comprises means, responsive to the means for determining an error, for reconstructing the erroneous data and for re-writing it to the erroneous segment.
In a second aspect of the present invention, there is provided a method of error detection in an array of a plurality of storage units, comprising: receiving from each of the units in the array a value derived from data in a desired segment of the unit; comparing the received values from the different units; and determining, responsive to the step of comparing, an error in data from one of the units.
Preferably, the value derived from data in a desired segment of the unit is a linear XOR logic combination of the data.
Preferably, the array is a multiply redundant array.
Preferably, the storage units comprise disk drives.
The method preferably further comprises reconstructing, responsive to the step of determining an error, the erroneous data and re-writing it to the erroneous segment.
The present invention may preferably be embodied as an integrated circuit comprising the storage controller of the first aspect.
The present invention may preferably be embodied as a storage controller, for error detection in an array of a plurality of storage units.
In its preferred embodiment this invention improves the background data scrub process for RAID storage systems, by improving data integrity without a significant increase in link data traffic.
One method and disk controller for scrubbing disk arrays with multiple redundancy incorporating the present invention will now be described, by way of example only, with reference to the accompanying drawings, in which:
Disk arrays with single redundancy, such as RAID-5, can survive the failure of one disk without loss of data. However, if even one small part of one of the remaining disks cannot be read, some data will be lost. For this reason, it is common to ‘scrub’ the disks of a RAID-5 array. This entails reading all the data on every disk, so that any unreadable part can be found while the array is complete and the unreadable data can be re-created. It would be possible to read the data and corresponding parity from all the disks of the array and check that the parity matched the data. However, if a mismatch was found, there would be no way to tell which disk was incorrect, and so no correction could be made. For this reason it is normal only to check that the data can be read.
To avoid transferring the data from the disk to a storage controller, and thereby using bandwidth in the connection, the SCSI (Small Computer Systems Interface) standard for disk commands includes a VERIFY command which will confirm that the data can be read, but not transfer it to the controller.
To provide a higher level of data protection, it is possible to construct disk arrays with multiple redundancy, so that they can survive the loss or two of more disks. In these arrays, the data scrubbing can correct errors, since there are multiple ways to re-create any segment of data. If one check does not match, each segment involved can be checked against another disjoint set of segments to determine which segment is in error. This repair is clearly valuable, and is desirably implemented in any multiply redundant array.
However, if all the data segments from the disk are read into the controller, a lot of connection bandwidth will be used.
Referring now to
Referring now also to
It will be appreciated that for a single parity drive, checking for consistency of the XOR values with a parity generation algorithm can be achieved by XORing the XOR values together and checking that the result is zero, which can be done without hardware support, i.e., directly by the disk controller processor (not shown).
To see this, consider a system with 3 disks (A, B and C) and one parity drive (P). Each of the disks has N bytes per sector, where A1 is the first byte on disk A, etc . . . .
The linear XOR of a sector on the A drive is given by:
AP=A1+A2+A3 . . . AN (1)
The linear XOR of a sector on the B drive is given by:
BP=B1+B2+B3 . . . BN (2)
The linear XOR of a sector on the C drive is given by:
CP=C1+C2+C3 . . . CN (3)
The linear XOR of a sector on the P drive is given by:
PP=P1+P2+P3 . . . PN (4)
where “+” represents XOR.
Also,
P1=A1+B1+C1,P2=A2+B2+C2 . . . PN=AN+BN+CN (5)
because this is how the parity is stored on the parity drive.
Therefore, subsitituting (5) into (4) gives:
PP=(A1+B1+C1)+(A2+B2+C2)+ . . . (AN+BN+CN) (6)
Now computing AP+BP+CP+PP by adding (1), (2), (3) and (6) gives:
It will be understood that the disk controller 160 will typically be implemented in the form of an integrated circuit (not shown).
It will be appreciated that although the above example uses a linear XOR logical combination for each compared value, other types of associative logical combination may alternatively be used.
It will further be appreciated that this approach can still be of value in the case of an array with a single parity drive (such as RAID-3, RAID-4 or, most commonly, RAID-5), as it is clearly still useful to know that the data and its parity have become inconsistent. The error can be logged, and a user may still be able to recover data from a backup.
It will further be appreciated that although the above example has been described in the context of disk drives, it could alternatively be applied to an array of other kinds of storage units.
In summary, it will be understood that the above preferred embodiment provides a way of detecting and correcting “write mis-compares”, where a drive claims to have performed a write of data but in fact has not. The embodiment provides a way of implementing the ‘detection’ step without consuming significant bandwidth on the link between disks and storage controller.
In conclusion, it will be understood that the above-described scheme for scrubbing disk arrays with multiple redundancy described above provides the following advantages:
Number | Date | Country | Kind |
---|---|---|---|
0322424.3 | Sep 2003 | GB | national |