1. Technical Field
The present invention relates in general to read and write commands to nonvolatile memory devices within a data processing system and in particular to read and write commands from a controller to a Redundant Array of Independent Disks within a data processing system. Still more particularly, the present invention relates to reducing the number of parity read and write commands between a controller and a Redundant Array of Independent Disks, Level 6.
2. Description of the Related Art
A Redundant Array of Independent Disks ("RAID") is an array, or group, of hard disk drives controlled by a single array controller and combined to achieve higher transfer rates than a single, large drive. Even though multiple drives are controlled by one adapter, the RAID device appears as one drive to the data processing system. Depending on the configuration, the RAID device will increase the level of protection and storage capacity for a data processing system over a single, hard disk drive. The primary functions of the RAID system are to increase the availability, protection and storage capacity of data for a data processing system.
RAID technology generally distributes data across the drives according to the format of the particular RAID classification (RAID 1, 2, 3, 4, 5 or 6). Copies or portions of data for a particular file may be written in segments on more than one disk drive, a process referred to as "striping." By storing the data and instructions on multiple drives, higher data transfer rates are enhanced by the ability of the controller to schedule read and write commands to multiple drives in parallel.
RAID 5 reads and writes data segments across multiple data drives and writes parity to the same data disks. The parity data is never stored on the same drive as the data it protects, allowing for concurrent read and write operations. Within any stripe of a five drive RAID 5 configuration, all drives contain data information and parity information. If one of the data drives were to fail, the remaining four data drives and the parity on each remaining may be used to regenerate user data which improves improving data protection.
RAID 6 improves the data protection of RAID 5 by providing two parity drives. The original technique for data protection in RAID 6 was to copy the parity drive onto a parallel parity drive, or "mirror" the parity drive. This protects the RAID 6 device from a parity drive failure, but does not protect the group from failure of two data drives. In order to protect against multiple data drive failures, RAID 6 changes the configuration so that the second parity drive will protect across different drive groups. For instance, parity drives are arranged so that each data drive has parity stored on two parity drives. A RAID 6 device with this configuration would be depicted as having multiple rows and multiple columns of data drives with each row and column ending with a parity drive. Parity of each data drive would then be stored on two drives.
In large arrays the increase in the number of additional drives is substantial, but not prohibitive. If the array is a ten by ten array, of 120 drives only 20 are parity drives. However, in small arrays the percentage increase is large. For example, if the RAID subsystem contained a four by four array of data drives, a parity drive would be added for each row of data drives. In addition, parity drives would be added for each column. Therefore, for an array containing sixteen data drives, there would be eight parity drives--a fifty percent increase in the number of drives.
A RAID 6 device provides extra data protection but, at a somewhat prohibitive cost. The two group version of RAID 6 requires that a single data disk belong to two parity groups. If a data drive stripe were to be updated, the parity information of all parity drives affected would also need to be updated resulting in many more reads and writes.
In FIG. 5, a RAID 6 configuration is depicted, showing the first several data stripes on the individual drives. The letter "D" in the diagram indicates that DATA is stored in that location and "P" indicates that PARITY is stored in that location. The number indicates the data segment stored in that location. For example, to calculate the parity information stored in P05, a RAID 6 device would need to read D01, D02, D03, and D04. It would then calculate the parity and write the results to P05.
In the two group version of RAID 6, a single disk belongs to two parity groups. In this instance, D01 belongs to a horizontal parity stripe and a vertical parity stripe. In order to update D01, parity information stored at P05 and P21 also needs to be updated.
Using the two parity group version, a RAID 6 device could handle up to three drive failures without losing any information. For example, if D01 failed, its information could be retrieved using either the horizontal rank or vertical rank parity drives. If P21 also failed, the vertical rank would not contain enough information to regenerate D01. However, the horizontal rank would be available to regenerate D01. On the other hand, if on the horizontal rank, P05, were to fail then the vertical rank parity drive could be used to regenerate D01. If both the vertical rank, P21, and the horizontal rank, P05, were to fail before D01 were regenerated, then D01 could not be regenerated from either the horizontal or vertical ranks.
A significant problem with RAID 6 devices is the number of parity updates that must be generated. When a data drive is updated, parity needs to be calculated for two drives. This procedure, referring again to FIG. 5, requires a read to the data drive D01 and the parity drives P05 and P21. In addition, a write is required to the data drive D01 and both parity drives, P05 and P21. This is for a single drive stripe write.
An example of a full stripe write, in a RAID 6 configuration, is depicted in FIG. 6 (assuming the four by four disk array in FIG. 5). The process begins with step 600, which depicts the host sending a write command to the RAID 6 controller. The process passes to step 602, which illustrates the controller sending a read command to D01, D02, D03, D04 and Parity drives P21, P22, P23, and P24. The process proceeds to step 604, which depicts the controller XORing the old data, the new data and the old parity. This new parity is then written to the parity drives, P21, P22, P23, and P24, in segments across the vertical parity drive stripe. The process then continues to step 606, which illustrates the controller sending a write command to the data drives DO, D02, D03, and D04 and the parity drives P05, P21, P22, P23, and P24. The process then passes to step 608, which depicts the controller sending a completion signal to the host.
In summary, the write command requires a read to segments on each of four data drives, e.g., R(1,2,3,4), where R(1,2,3,4) are reads to segments DO, D02, D03 and D04. In addition, reads to the Parity drives R(21,22,23,24) are required for vertical parity calculations, writes W(1,2,3,4,5,21,22,23,24) are needed to write out the user data and all of the parity data (referring to FIG. 5). A read to each of four parity drives and a write to each of the parity drives and data drives are required. A minimum full stripe write to a four by four disk array requires eight Read operations and 9 Write operations, even where the RAID 6 subsystem leverages its horizontal parity by eliminating the need to write to the horizontal parity drive.
It would be desirable, therefore, to provide a method for reducing the number of parity writes for RAID 6 devices.
It would also be desirable, to reduce the Input/Output load on the controller which will provide room for additional drives in the RAID 6 device controller.