Consistency check (CC) is a mechanism or operation used in a redundant array of independent disks (RAID) firmware to verify whether all rows in a disk array associated with a redundant RAID level are consistent. In RAID 1, the data is mirrored when an inconsistent row is detected during a CC operation. In RAID 5 and RAID 6, parity data is recreated from peer drives during the CC operation. The CC operation may also include variant implementations and secondary RAID levels based on RAID 1, RAID 5 and RAID 6 and RAID 10, RAID 50, RAID 60.
Typically, two basic functions are performed during a CC cycle. The first one includes performing a read operation and the second one includes performing XOR operation on the read data to validate consistency. To perform the read operation, read requests are sent to all disks forming the disk array. RAID 1E disk array (also known as PRL 11) has been implemented in the RAID firmware as an extension of RAID 1 disk array. RAID 1E disk array can be considered as a collection of multiple RAID 1 disk arrays, where each RAID 1 disk array in the RAID 1E disk array is referred to as a mirror set.
During a CC operation on the RAID 1E disk array, a read operation is performed on all the mirror sets or physical arms in a row. Then, an XOR operation is performed on each mirror set to check whether the data is consistent with parity or mirror. The medium errors found during the read operation are not handled during the XOR operation of the RAID IE disk array. Existing techniques to handle medium errors in RAID 1 disk array cannot be extended to the RAID IE disk array, since the RAID 1 disk array includes only one mirror set while the RAID 1E includes multiple independent mirror sets.
Various embodiments are described herein with reference to the drawings, wherein:
The drawings described herein are for illustration purposes only and are not intended to limit the scope of the present disclosure in any way.
A system and method for performing mirror set based medium error handling during a consistency check operation on a RAID 1E disk array is disclosed. In the following detailed description of the embodiments of the present subject matter, reference is made to the accompanying drawings that form a part hereof, and in which are shown by way of illustration specific embodiments in which the present subject matter may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the present subject matter, and it is to be understood that other embodiments may be utilized and that changes may be made without departing from the scope of the present subject matter. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present subject matter is defined by the appended claims.
Each of the mirror sets includes a pair of disks. In each of the pair of disks, one disk is the mirror of other disk and is referred to as a mirrored disk. Further, each of the disks in the all the mirror sets in the RAID 1E disk array is divided into a plurality of rows. Each row may be formed using at least one data block (e.g., of 512 bytes) of each disk, where the data block stores data. The RAID 1E disk array may be a spanned RAID 1E disk array (e.g., as shown in
At step 102, a read operation is performed on a current row and a list of all medium errors found in the current row during the read operation is formed. For example, the read operation is performed during a first phase of the CC operation. At step 104, the medium errors found in the current row are grouped on a mirror set basis and the medium errors that do not have a corresponding medium error in a substantially same block in other disk in a mirror set are recovered during a second phase of the CC operation. In one example embodiment, one or more medium errors associated with a current mirror set are determined from the list of medium errors found in the current row. Then, the determined one or more medium errors for the current mirror set in the current row are recovered. The steps of determining and recovering are repeated for a next mirror set in the current row of the RAID 1E disk array.
At step 106, an exclusive -OR (XOR) operation is performed on the current row in all the mirror sets for determining data consistency between the pair of disks in each of the plurality of mirror sets. At step 108, data on a mirrored disk in the plurality of mirror sets is updated based on the outcome of the performed XOR operation. In one example embodiment, during the XOR operation, if it is found that data is not consistent in a current mirror set, then data on the mirrored disk is updated using other disk in the current mirror set. In another example embodiment, if the data is consistent in the current mirror set, then it is determined to see whether a next mirror set is available in the RAID 1E disk array that requires performing the XOR operation to determine data consistency.
Further, an XOR operation is performed on the next mirror set. If there are no more mirror sets in the current row in the RAID 1E disk array, then the CC operation on the current row is completed. At step 110, the steps of performing the read operation, grouping the medium errors, recovering the medium errors, performing the XOR and updating are repeated on a next row in the RAID 1E disk array until all the rows in the RAID 1E disk array are completed. The above-described mirror set based error handling may be also performed during a CC operation on a degraded RAID IE disk array.
During a first phase of a CC operation on the spanned RAID 1E disk array 200A, a read operation is performed on a first row. As shown in
Then, an XOR is performed on the mirror set 204A during a second phase of the CC operation. According to an embodiment of the present subject matter, during the second phase, it is determined whether there are any medium errors belonging to the mirror set 204A from the medium error table A. For example, the medium error table A is searched starting from its first entry to find the medium errors belonging to the mirror set 204A. If the first entry does not belong to the mirror set 204A, then the first entry is pushed back to the medium error table A. Similarly, it is determined whether a second entry belongs to the mirror set 204A. If the second entry also does not belong to the mirror set 204A, then the second entry is pushed back to the medium error table A. As shown, a third entry in the medium error table A indicates a presence of a medium error in the disk 202A of the mirror set 204A at data block A1.
Further, it is determined whether there is a medium error in a substantially same block in other disk of the mirror set 204A. That is, it is determined from the medium error table A whether there is a medium error entry for data block A1 of the disk 202B. If the medium error entry is found for the data block A1 in the disk 202B, then the medium errors in the mirror set 204A become unrecoverable. This is because of the presence of the medium errors at same data block of the disk 202A and the disk 202B in the mirror set 204A. The medium error entries for the data block A1 in the disk 202A and the disk 202B are deleted from the medium error table A. Further, all other entries of the medium errors belonging to the mirror set 204A are deleted and the medium error table A is reduced to a medium error table B as below.
Then, the CC operation proceeds to the mirror set 204B of the first row by skipping the XOR on the mirror set 204A. From the medium error table B, it is determined that there are two medium errors for the mirror set 204B. One medium error is at data block B3 of the disk 202C and other medium errors is at data block B1 of the disk 202D. Since both the medium errors of the mirror set 204B are at different data blocks, the medium errors are recoverable. Hence, the medium errors belonging to the mirror set 204B are recovered. Further, the medium error entries belonging to the mirror set 204B are deleted from the medium error table B and the medium error table B is reduced as medium error table C shown below:
Then, an XOR operation is performed on the mirror set 204B. In one embodiment, during the XOR operation, if data in the mirror set 204B is not consistent, then the mirrored disk 202D is updated using data from the disk 202C. In another embodiment, if the data in the mirror set 204B is consistent, then it is determined whether a next mirror set is available in the spanned RAID 1E disk array 200A for performing the XOR operation to determine data consistency. For all subsequent mirror sets in the first row, the medium errors are determined, recovered, and corresponding medium error entries are deleted from the medium error table C. Finally, all the medium errors found during the read operation on the first row are deleted and the medium error table C becomes empty. If there are no more mirror sets in the spanned RAID 1E disk array 200A, then the CC operation is completed on the first row.
Then, the CC operation on a next row (e.g., a second row) in the spanned RAID 1E disk array 200A is performed. In one exemplary implementation, a read operation is performed on the second row. Then, medium errors belonging to the second row is found and grouped on a mirror set basis. Further, recovery of the medium errors is performed. Finally, an XOR operation is performed on the second row which is similar to the XOR operation performed on the first row as described above. Further, based on the outcome of the performed XOR operation, the mirrored disks may be updated. Likewise, performing the read operation, grouping the medium errors, recovering the medium errors, performing the XOR operation, and updating the mirrored disks are repeated until all rows in the spanned RAID 1E disk array 200A are completed.
Further as shown, the computing device 302 includes a RAID controller 308 communicatively coupled to the RAID 1E disk array 314. According to an embodiment of the present subject matter, the RAID controller 308 includes a medium error handling module 312 stored in its memory 310 for performing the mirror set based medium error handling during a CC operation on the RAID 1E disk array 314. For example, the medium error handling module 312 may be stored in the form of instructions in the memory 310 that when executed by the computing device 302, causes the computing device 302 to perform the medium error handling during the CC operation as described in
Although the present embodiments have been described with reference to specific example embodiments, it will be evident that various modifications and changes may be made to these embodiments without departing from the broader spirit and scope of the various embodiments. Furthermore, the various devices, modules, and the like described herein may be enabled and operated using hardware circuitry, for example, complementary metal oxide semiconductor based logic circuitry, firmware, software and/or any combination of hardware, firmware, and/or software embodied in a machine readable medium. For example, the various electrical structure and methods may be embodied using transistors, logic gates, and electrical circuits, such as application specific integrated circuit.