RAID Information
Posted in 1995
Hello group, In the few weeks that I have been reading c.d.i., I noticed that RAID questions have come up a couple of times. The following is an overview of RAID that I had posted on comp.databases.oracle a few months ago. I am not an expert on RAID. I just thought that I would share my research and experience (i.e. I had to do the research and write the stuff already, why not shoot it out for everyone else?). If anyone finds this helpful, I also have some further observations (not as long-winded), as well as a RAID reading list/bibliography. Let me know if it's worth posting. Lou Avrami ( attmail!lavrami ) Any opinions stated are my own, not my company's. WHAT IS RAID? ------------- The term RAID originally stood for Redundant Array of Inexpensive Disks. The RAID Advisory Board officially defines RAID as Redundant Array of Independent Disks. I guess they recognized that these systems weren't as cheap as they thought. RAID is a collection of hard disks electronically tied together in a single system that makes absolutely sure that if a single disk drive crashes, that the contents of that disk are protected. There are six basic levels levels of RAID, 0 through 5. A higher number does not mean that the RAID performance is higher, it simply is a different strategy for accomplishing data storage and protection. The RAID Advisory Board defines RAID as "a disk array in which part of the storage capacity is used to store redundant information about user data stored on the remainder of the storage capacity. The redundant information enables REGENERATION of user data in the event that one of the array's member disks of the access path to it fails." FAULT TOLERANCE --------------- Before going into the different RAID levels, the issue of failed components/data availability/downtime should be discussed. There are four different ways in which a failed component (in our case, a failed disk or controller) can be replaced: Cold Swap System operation must stop, and electrical power must be removed before the component is replaced. Warm Swap System operation must stop, but electrical power does not have to be removed before component replacement takes place. Hot Swap System operation does not need to stop, but human intervention is required for component replacement. Automatic Swap If a component can be hot swapped, and a replacement component is pre-installed so that no human intervention is needed to bring it into service. Automatic swapping is common with RAID Level 1, 3, 4 and 5 arrays. The level of data availability that a system requires is important to determine. It could have an impact of the price of a RAID system, how that system performs, as well as how long a system may be unavailable to users if there is a failure. HARDWARE/SOFTWARE ISSUES ------------------------ When implementing RAID, different combinations of hardware and software solutions can be utilized: Software-based The least expensive solution. This approach steals array CPU cycles from the host computer to do the array processing. Depending on the host's load, this may or may not affect performance. Bus-based A co-processor is installed on the server to handle array array processing. Multi-processor platforms may dedicate one or more processors to RAID. Hardware-based An array processor is located in the disk array array storage system. A hardware-based array ensures the least impact on the system if a drive fails; the software approach offers the least protection. Another hardware issue is the reliability of the disk drives and the controllers. The MTBF (Mean Time Between Failure) rate of the disks and the controllers is very important. The higher the number, in hours, the better. The controllers used by the RAID system are an important factor. Today, the best performance is offered by controllers that meet the SCSI-2 Fast-Wide protocols. Also, the best-performing controllers are those with a powerful on-board CPU. BASIC RAID LEVELS ----------------- As I said earlier, there are six basic levels of RAID. Two of them, RAID 2 and RAID 4, are usually not used in commercial applications. RAID 2 uses bit-interleaving, which breaks data down into bit-sized blocks and distributes it across the different disk drives. Additional disks perform error detection tasks. It takes a lot of disks to perform the error checking, and a lot of computer power. For expensive applications, like oil exploration on a Cray supercomputer, RAID 2 makes sense. It's just too many disks, and too expensive for normal business applications. RAID 4 uses a parity drive, which stores the error-checking that takes up many drives in RAID 2. This parity drive becomes a major bottleneck when performing write operations, since all writes have to go through this parity drive. As a result, RAID 4 arrays are generally not available. The RAID Advisory Board states that "application requirements that RAID Level 4 serves ... are unconditionally better served by RAID Level 5." So, that leaves RAID Levels 0, 1, 3 and 5: RAID 0 Technically, RAID 0 is not really RAID, because it does not provide any data redundancy. RAID 0 is an array which stripes data across a number of disks while treating them all as a single unit. If a disk fails, data can rarely be retrieved since it has been spread across several disks, and there is no redundancy of data. Disk striping supposedly increases I/O performance. RAID 1 Disk drives are mirrored; identical data is written to two identical drives so that each piece data is stored twice. RAID 1 can read data faster than a single disk because a read request can be handled by either drive, or two requests can be serviced concurrently - whichever read head is closer to the data reads it. Data must be written twice, to each disk, but if the system takes this into account when it is designed, the impact can be minimized. RAID 1 offers very high data reliability and improved performance for read-intensive applications. However, it does not offer total system fault tolerance because the disk drives are only part of the system. Also, it can be expensive, since storage requirements are doubled (2x of disk space is needed to store 1x of data). RAID 3 RAID Level 3 is similar to RAID 4; there are a number of data drives, and a dedicated parity drive which does error-checking. RAID 3 interleaves data on a