Integrated sector format-error correction code system and method for efficient writing in a disk array system

A system and associated method efficiently complete write commands in an ISF disk drive/RAID system with minimal disk accesses to the underlying disk drives. The system updates data in a parity-based disk array system by receiving a write command to write new data. The present system minimizes the number of disk accesses. The present system completes the same or comparable write commands in a total of four accesses to the disk drives. This is realized by combining the read-modify-write operation of updating one or more sectors in an ISF cluster with the read-modify-write operation associated with updating one or more sectors in a parity-based array system, such as a RAID-5 system.

FIELD OF THE INVENTION

The present invention relates to the field of data storage, and particularly to disk array systems. More specifically, this invention relates to a system and associated method for efficiently executing write commands when using an integrated sector format (ISF)—error correction code (ECC) system in a parity-based disk array system.

BACKGROUND OF THE INVENTION

In Redundant Arrays of Independent Disk (RAID) systems, data files and related parity are striped across multiple disk drives. In storage subsystems which manage multiple hard disk drives as a single logical direct access storage device (DASD), the RAID logic is implemented in the controller of the subsystem.

RAID storage methodologies have also been implemented in software for execution on a single host computer. This allows the single host computer, such as a personal computer, to implement RAID storage techniques on local hard disk drives.

One challenge in shared disk systems implementing a parallel, shared disk RAID architecture is to provide a system for insuring that data and parity data are properly updated to disks in the system.

The Integrated Sector Format (ISF) disk drive is a relatively new standard for improving the error correcting capabilities of a disk drive. Current disk drives have a single level of error correcting code (ECC) for each individual sector. ISF improves this architecture by grouping every eight (8) consecutive sectors into a cluster and adding a second and a third level of ECC to each cluster. The third level ECC is computed over all 8 sectors. These two levels of additional ECC's provide the additional error correction capabilities above and beyond those provided by the first level of ECC. An exemplary ISF method is described in U.S. patent application, titled “Multiple Level (ML), Integrated Sector Format (ISF), Error Correction Code (ECC) Encoding And Decoding Processes For Data Storage Or Communication Devices And Systems,” Ser. No. 10/040,115, filed on Jan. 3, 2002, supra.

In an ISF disk drive when a fraction of a cluster is updated (i.e., written), the drive first reads the cluster into its buffer memory, inserts the new sectors that are updated, re-computes the new ECCs, and then writes the cluster back to the disk media. This process which is referred to as a read-modify-write action, adds one revolution to the time of the write command at a performance penalty.

The most common RAID systems are based on parity schemes to provide added fault tolerance. For illustration purpose only, the RAID-5 system will be described to illustrate the invention, with the understanding that other parity-based disk array systems may be used.

In a RAID-5 system, to update (or write) a small piece of data, the RAID controller first reads the old data in that location, reads the corresponding old parity from the corresponding parity drive, and XOR (exclusive OR) them with the new data to generate the new parity, after which it can write the new data to the data drive and the new parity to the parity drive. In other terms, the RAID controller needs to do read-modify-write of the data drive and the parity drive. Again, the read-modify-write procedure imposes a performance penalty to the write command execution.

In the combination of ISF disk drives used in a RAID-5 system, it could take for example a total of six disk accesses to complete a write command: three accesses to the data drive and three other accesses to the parity drive. What is therefore needed is a system and associated method for minimizing the accesses to the ISF data drive to complete a write command.

SUMMARY OF THE INVENTION

The present invention satisfies this need and presents a system, a computer program product, and an associated method (collectively referred to herein as “the system” or “the present system”) for completing write commands in an ISF disk drive/RAID system with minimal disk driver accesses. As In the example above where six accesses are required, the present system completes the same or comparable write commands in a total of four accesses to the disk drives.

The foregoing and other features and advantages of the present invention are realized by combining the read-modify-write operation of updating one or more sectors in an ISF cluster with the read-modify-write operation associated with updating one or more sectors in a parity-based array system, such as a RAID-5 system.

In a first preferred embodiment, a parity-based disk array system updates data by receiving a write command to write new data. Thereupon, an array controller issues a read command to a data storage device to read a data block containing the data to be updated, and further issues a read command to a parity storage device to read a parity block containing a parity to be updated that corresponds to the data to be updated.

The controller reads the data block containing the data to be updated, and saves the data block in memory. The controller also reads the parity block containing the parity to be updated, and saves the parity block in memory. Both the data block and the parity block are ISF clusters of the underlying disk drives.

The controller then generates a new parity that corresponds to the new data. The new data is inserted into the data ISF cluster replacing the old data, and the new parity is inserted into the parity ISF cluster replacing the old parity. Thereupon, the controller writes the new data block on the data drive, and the new parity block on the parity drive. Because the disk drives receive writes that are ISF clusters, new ISF ECC can be calculated and the clusters written without having to do any read.

Another preferred embodiment is similar to the prior embodiment but distinguishes thereover in that the array controller issues a new “read with intent to update” command instead of the standard read command, for both the data and the parity. The array controller then generates a new parity that corresponds to the new data, and writes the new data on the data drive, and the new parity on the parity drive.

Upon receiving a “read with intent to update” command, a disk drive reads the entire ISF cluster containing the requested sectors and saves the cluster in its buffer memory. When it subsequently receives the write command for those sectors, it replaces those sectors in its buffer with the new data and calculates the new ISF ECC for the cluster, which then can be written to the disk.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

FIGS. 1,1A and1B illustrate an exemplary environment in which a system10and associated method for efficiently writing commands using an integrated sector format (ISF)—error correction code (ECC) system in a parity-based disk array system. A host computer20is connected to an array controller30of system10.

FIG. 1Aillustrates a disk drive1comprised of a head stack assembly12and a stack of spaced apart magnetic, optical and/or MO data storage disks or media14that are rotatable about a common shaft16. The head stack assembly12includes a number of actuator arms19that extend into spacings between the disks14, with only one disk14and one actuator arm19being illustrated for simplicity of illustration. The disk drive1further generally includes a preamplifier44, a read/write channel48, a disk cache memory49, and a hard disk controller50. The disk drive1is attached either to a computer or a storage system controller, such as array controller30, through an interface60. Examplary interfaces include but are not limited to SCSI, IDE, FC, and Firewire.

The head stack assembly12is generally comprised of an E-shaped block24and a magnetic rotor26attached to the block24in a position diametrically opposite to the actuator arms19. The rotor26cooperates with a stator (not shown) for the actuator arms19to rotate in a substantially radial direction, along an arcuate path in the direction of an arrow A. Energizing a coil of the rotor26with a direct current in one polarity or the reverse polarity causes the head stack assembly12, including the actuator arms19, to rotate around axis P in a direction substantially radial to the disks14. A head disk assembly33is comprised of the disks14and the head stack assemblies12.

A transducer head40is mounted on the free end of each actuator arm20for pivotal movement around axis P. The magnetic rotor26controls the movement of the head40in a radial direction, in order to position the head40in registration with data information tracks or data cylinders42to be followed, and to access particular data sectors on these tracks42.

FIG. 1Bis an example of ISF formatting. An ISF cluster of eight sectors is depicted. Each sector is protected with a first level of error correcting code (ECC), C1. The first group of four sectors of the cluster is protected with a second level of ECC, C2. Similarly, the second group of four sectors is protected with a second level of ECC, C2. Lastly, the entire group of eight sectors of the ISF cluster is protected with a third level of ECC, C3.

FIG. 2is an example of a four-disk RAID-5 data layout, where the letters A, B, C, D, and E designate data blocks of different stripes, and Px designates the parity block for the three x data blocks of its stripe. The array controller30manages drives100,200,300,400and thus knows the boundaries of the array data blocks and the boundaries of the parity blocks. Thus, for illustration purpose only, array block A1could be comprised of ISF clusters A11, A12, A13, A14, etc., and array block A2could be comprised of ISF clusters A21, A22, A23, A24, etc., and parity block PA could be comprised of ISF clusters PA1, PA2, PA3, PA4, etc.

In a first preferred embodiment, the array controller30is cognizant of the fact that the storage devices100,200,300,400, use ISF format, and it also knows the boundaries of the ISF clusters in those storage devices. It should be noted that the blocks in a stripe of a RAID-5 system have no correlation with the clusters of ISF formatting. In a second preferred embodiment, the array controller30does not have to know the boundaries of the ISF clusters of the underlying storage devices.

An exemplary write command operation or method302according to one embodiment of the present invention will now be explained with further reference to FIG.3. As indicated earlier, the disk array blocks and ISF clusters are independent entities.

The RAID controller30inFIG. 3is cognizant of the fact that the storage devices100,200,300,400, use ISF format and it also knows the boundaries of the ISF clusters in those storage devices.

The RAID or array controller30receives a Write command to write new (or updated) data k′ from the host computer20at step305. At step306, the array controller30issues a Read command to the data drive, i.e., drive1(100), to read the cluster, i.e., A12, containing the old data k. While in this example data k is contained entirely within one ISF cluster, if it spans multiple clusters, then the Read command will read all those clusters. Thus, when the array controller30implements a read-modify-write operation, instead of reading just the sector to be updated that contains the old data k, the array controller30reads the cluster containing this sector, which in turn, contains the old data k.

At step310, the data drive, i.e., drive1, reads the requested cluster A12containing the old data k, and returns it to the array controller30, which, in turn, saves this data block in memory35(FIG.1).

Similarly, at step312, the array controller30issues a Read command to the parity drive, i.e., drive4(400) to read the cluster, i.e., PA2, containing the old parity p that corresponds to the old data k. At step315the parity drive, i.e., drive4, reads the requested cluster PA2containing the old parity p, and returns it to the array controller30, which, in turn, saves this parity block in memory35.

At step320, the array controller30implements an exclusive OR operation onto the old data k, the new data k′, and the old parity p, to generate the new parity p′, as indicated by the following expression (1):
p′⊕k+k′⊕p(1)

At step325, the array controller30writes the new data k′ onto the cluster A12in its memory35that contains the old data k, to form an updated cluster A′12. Similarly, at step330, the array controller30concurrently writes the new parity p′ onto the cluster PA2in its memory35that contains the old parity p, to generate an updated cluster P′A2.

At step335, the array controller30issues a Write command to the data drive1(100) to write the updated cluster A′12that contains the new data k′. Concurrently, at step337, the array controller30further issues a Write command to the parity drive4(400) to write the updated cluster P′A2that contains the new parity p′.

At step345, the controller50for the data drive1(100) computes the new error correction codes (ECCs) for the updated cluster A′12, using methodology that is known or available. At step350, the controller50of data drive1(100) writes the updated cluster A′12with its new ECC onto the disk14of data drive1(100). At step355, the data drive controller50reports to the array controller30that the write operation of the updated data block A′1has been successfully completed.

Similarly and concurrently with steps345,350,355, the controller50for the parity drive4(400) computes the new error correction codes (ECCs) for the updated cluster P′A2. At step353, the controller50of parity drive4(400) writes the updated cluster P′A2onto the disk14of parity drive4(400). At step357, the parity drive controller50reports to the array controller30that the write operation of the updated cluster P′A2has been successfully completed.

Subsequently, at step360, the array controller30reports to the host computer20that the write operation of the new data k′ has been completed.

FIG. 4illustrates an exemplary write command operation or method402according to another embodiment of the present invention. The RAID or array controller30receives a Write command to write new (or updated) data k′ from the host computer20at step405. This embodiment introduces a new command called “Read With Intent To Update,” which will be referred to herein as “RWIU.” This RWIU command can be implemented using a new command code, or it can be implemented by assigning an unused bit in the command register of an existing read command code as its flag.

The purpose of this new RWIU command is to provide a hint to the disk drive controller that the read command will be followed shortly by a write command to the same block as part of some read-modify-write operation. The use of this RWIU command is in system10. The array controller30is cognizant of the fact that the underlying disk drives are ISF drives, but it does not need to know where the ISF cluster boundaries are.

Then, at step406, instead of issuing Read command to read the old data k to the data drive1(100), array controller30issues a RWIU k command to read the old data k and hint its intent to update it. Similarly, at step412, instead of issuing a Read command to read the old parity p to the parity drive, the array controller30issues a RWIU p command to read the old parity p and hint its intent to update it.

On receiving the RWIU k command, the data drive controller50reads the ISF cluster containing k into its buffer memory49at step410, and tries to store it there until it has been modified. This can be accomplished, as an example, by placing that entry at the top of its most-recently-used (MRU) list.

Similarly, at step415, on receiving the RWIU p command, the parity drive reads the ISF cluster containing the parity p into its buffer memory49and tries to store it there until it has been modified. At steps416and417, the data drive1(100) and the parity drive4(400) return old data k and the old parity p, respectively, to the array controller30.

At step420, after receiving the old data k and parity p, the array controller30implements an exclusive OR operation (XOR) on the old data k, the new data k′, and the old parity p, to generate the new parity p′, as indicated by expression (1) above.

At step425, the array controller30issues a write command to the data drive1(100) to write the new data k′. Similarly, at step430, the array controller30concurrently issues a write command to the parity drive4(400) to write the new parity p′.

Because the ISF cluster containing k is already in the buffer49of the data drive1(100), the data drive controller50can directly replace the old data k in the ISF cluster containing k with the new data k′ in the buffer at step435. Then, at step445, the data drive controller50computes the new error correction codes (ECCs) for the updated ISF cluster containing k′, using methodology that is known or available.

At step450, the controller50of data drive1(100) writes the updated ISF cluster containing k′ onto the disk14of data drive1(100). At step455, the data drive controller50reports to the array controller30that the write operation of new data k′ has been successfully completed.

Similarly, and concurrently with steps435,445,450,455, since the ISF cluster containing p is already in the buffer49of the parity drive4(400), the parity drive controller50can directly replace the old parity p in the ISF cluster containing p with the new parity p′ in the buffer at step437. Then, at step440, the parity drive controller50computes the new error correction codes (ECCs) for the updated ISF cluster containing p′, using methodology that is known or available.

At step453, the controller50of parity drive4(400) writes the updated ISF cluster containing p′ onto the disk14of parity drive4(400). At step457, the parity drive controller50reports to the array controller30that the write operation of new parity p′ has been successfully completed.

Subsequently, at step460, the array controller30reports to the host computer20that the write operation of the new data k′ has been completed.

It is to be understood that the specific embodiments of the invention that have been described are merely illustrative of certain application of the principle of the present invention. Numerous modifications may be made to the system and associated method described herein, without departing from the spirit and scope of the present invention. For example, while the present invention has been described herein in connection with a disk array system, it should be clear that the present invention is similarly applicable to shared disk systems.