A redundant array of independent disks (RAID) may undergo input/output (I/O) operations from a host computer and maintenance operations for disks in the RAID.
Certain exemplary embodiments are described in the following detailed description and in reference to the drawings, in which:
As explained above, a redundant array of independent disks (RAID) may undergo input/output (I/O) operations from a host computer and maintenance operations for disks in the RAID. These operations are performed by a controller that includes a write data cache for host I/O operations and a discrete buffer for maintenance operations. Host I/O operations and maintenance operations cannot be performed concurrently. For example, the write data cache used for host I/O operations may be disabled when the RAID is performing a maintenance operation. As disk drives increase in size, managing these operations becomes increasingly difficult and time consuming, as host I/O operations and maintenance operations can come into conflict and block each other from accessing data stored on disk, thus slowing down performance.
The present disclosure relates to performing operations in a redundant array of independent disks (RAID). In accordance with embodiments, a RAID controller can perform maintenance operations using a dual purpose cache that is also used for host input/output (I/O) operations, thus eliminating the need to use a discrete buffer for maintenance operations, and allowing both host I/O operations and maintenance operations to be performed simultaneously. The system and method disclosed herein improves the speed and efficiency of performing operations in the RAID controller with host I/O.
As used herein, host I/O operations refer to operations in which a host processor communicatively coupled to the RAID controller either reads data stored on a disk array, or writes data to a disk array. As used herein, maintenance operations refer to operations that relate to or affect the redundant storage of data. Maintenance operations can include rebuild operations, transformation operations, and initialization operations.
The array of disk drives 104 may include one or more disk drives 110. In some embodiments, the array of disk drives 104 includes a parity drive 112. Each of the disk drives 110 is configured to store data that can be accessed by the RAID controller 102. The data stored in the disk drives 110 can be loaded onto the dual purpose cache 108.
The parity drive 112 can contain data or logic that can be used to regenerate data should a disk drive 110, or a portion of a disk drive 110, fail. The data in the parity drive 112 can recreate lost data based on existing data remaining of disk drives 110 that are still functional.
Arrows 204 indicate the path of maintenance operations from the array of disk drives 104 to the dual purpose cache 108. During a maintenance operation, a block of data stored in a disk drive 110 in the array of disk drives 104 can be copied and written to the dual purpose cache 108, where the block of data can be accessed by the host 106. The block of data may contain metadata, which may contain identification for the data's logical block address (LBA) as well as special instructions for flushing the data from the cache. The metadata can also contain instructions for how changes made to the block in data in the dual purpose cache 108 are applied to corresponding data stored in the array of disk drives 104. In one example, a block of a data is loaded onto the dual purpose cache 108 from a first disk drive in the array of disk drives 104, and the block of data is to be copied onto a second disk drive in the array of disk drives 104. The metadata for that particular block of data would not only contain the LBA for both disk drives, but also instructions so that changes made to the block of data in the dual purpose cache 108 are also applied to the corresponding block of data in both the first disk drive and the second disk drive in the array of drives 104.
In some embodiments, the storage system 100 can allow for a user to configure various parameters associated with the transfer of data from the array of disk drives 104 to the dual purpose cache 108. The user can configure the parameters by interfacing with the storage system 100 through the host 106. Examples of parameters include the size of the block of data to be stored in the dual purpose cache 108 and the frequency in which the block of data is read.
Arrows 206 indicate the path of both host I/O operations and maintenance operations between the dual purpose cache 108 and the array of disk drives 104. The dual purpose cache 108 allows for host I/O operations and maintenance operations to be performed simultaneously without having to restrict or delay the progression of one operation to facilitate the other. The RAID controller 102 may load a block of data from a disk drive 110 in the array of disk drives 104 into the dual purpose cache 108 for a maintenance operation. During the maintenance operation, the RAID controller 102 can also perform host I/O operations on the block of data in the dual purpose cache 108 while the maintenance operation is working in the data block's logical block address. Upon conclusion of the maintenance operation, the block of data can be flushed from the dual purpose cache 108 to the disk drive 110 in the array of disk drives.
At block 302, the RAID controller performs maintenance operations using a dual purpose cache. Maintenance operations can include a rebuild operation, a transformation operation, or an initialization operation.
In a rebuild operation, the RAID controller reads data from a first disk drive or a parity drive to regenerate data in a second disk drive. This type of operation can be used to recover data after a disk drive failure occurs. The portion of the second disk drive that is to be regenerated can be loaded into the dual purpose cache. The data in the first disk drive or parity drive can also be loaded into the dual purpose cache to be read. The RAID controller can use the data or logic contained in the first disk drive or parity drive to determine the content of the data that is to be regenerated. In some embodiments, the RAID controller can rebuild multiple disk drives simultaneously.
In a transformation operation, the RAID controller alters the arrangement of the array of disk drives. The RAID controller may rearrange data segments within the disk drives, or transfer data from one disk drive to another. The data segments that are to be modified can be loaded into the dual purpose cache. The metadata for the data segments can be altered to give them new LBAs.
In an initialization operation, the RAID controller reads data in the array of disk drives to calculate parity data. Parity data contains logic that can be used to regenerate missing data in another disk drive. The parity data can be created and temporarily stored in the dual purpose cache. The parity data can be given an LBA such that when the parity data is flushed, it is written into a parity drive in the array of disk drives.
At block 304, the RAID controller performs host I/O operations on the dual purpose cache. The host I/O operations may occur during maintenance operations, wherein the RAID controller is concurrently modifying data in the array of disk drives. In some embodiments, the RAID controller reads a data block that has been loaded onto the dual purpose cache from the array of disk drives. In some embodiments, the RAID controller writes data in the dual purpose cache with a specific LBA pointing to a location within the array of disk drives. In some embodiments, the RAID can overwrite a data block that has been loaded onto the dual purpose cache from the array of disk drives. It is to be noted that when flushing a data block in the dual purpose cache, the RAID controller can simply write to the portion of the array of disk drives specified by the data block's LBA, rather than write to every disk drive in the array of disk drives. In other words, the data block can be flushed directly to the LBA(s) indicated by the data block's metadata.
At block 306, the RAID controller flushes the data block from the dual purpose cache to the array of disk drives. This may occur after a maintenance operation has concluded. In some embodiments, the data block has been modified in the dual purpose cache. In some embodiments, the data block has been newly written into the dual purpose cache. The data block stored in the dual purpose cache may contain metadata that identifies the data block's LBA. The metadata can also specify how changes applied to the data block in the dual purpose cache is applied to corresponding data stored in the array of disk drives. The data block is flushed from the dual purpose cache to its corresponding location among the array of disk drives.
The various software components discussed herein may be stored on the tangible, non-transitory, computer-readable medium 400. A first region 406 on the tangible, non-transitory, computer-readable medium can include a maintenance operations module to perform a maintenance operation using a dual purpose cache. A region 408 can include a host I/O operations module to perform a host I/O operation on the dual purpose cache. A region 410 can include a data flush module to flush data from the dual purpose cache to a disk drive. Although shown as contiguous blocks, the software components can be stored in any order or configuration. For example, if the tangible, non-transitory, computer-readable medium is a hard drive, the software components can be stored in non-contiguous, or even overlapping, sectors.
While the present techniques may be susceptible to various modifications and alternative forms, the exemplary examples discussed above have been shown only by way of example. It is to be understood that the technique is not intended to be limited to the particular examples disclosed herein. Indeed, the present techniques include all alternatives, modifications, and equivalents falling within the true spirit and scope of the appended claims.