Section 9.1. RAID

   

9.1 RAID

RAID stands for "redundant array of independent disks" (originally the term inexpensive was used instead of independent ). RAID was invented at the University of California in what is now famously termed "The Berkeley Paper" in 1988. It is a common offering from many vendors. In 1993, the RAID Advisory Group formed the RAID Conformance Program whereby vendors would ensure that their hardware passed the conformance test in return for certification by the RAID Advisory Board, including permission to use the official RAID logo on their devices. The different versions of RAID provide different levels of performance and data protection, and the implementations used differ for those particular needs.

An idea that is common to almost all the RAID implementations is the notion of striping . Striping consists of defining a basic unit of I/O (which is typically in a range between 512 bytes and 4MB or 8MB) [1] and then defining how these I/O units are physically placed on different disks to provide a logical block for higher-level clusters and so on. Thus the first unit could be on disk 1, the second unit on disk 2, and so on.

[1] There are exceptions. For example, a supercomputer at Thinking Machines used 16-byte stripes in its RAID 3 storage subsystem.

RAID can be implemented in hardware or in software, in the following ways:

  • In host (server) software

  • In an HBA connected to the host (server)

  • In the storage device

In some cases a single corporation uses a combination of these varieties of RAID. For example, the corporation may have RAID implemented in the host, as well as, say, inside storage devices.

Windows NT Logical Disk Manager is one example of software that implements RAID functionality in software. Host-based RAID , also referred to as software RAID , has the following advantages:

  • Hardware costs are lower because the storage units can be relatively dumb.

  • It has interoperability in terms of being able to use dumb disks from multiple vendors

  • When implemented in a volume manager “like solution, virtualization services are provided that overcome hardware limitations; for example, multiple smaller disks can be combined so that they look like a single large disk.

  • The configuration is more flexible. For example, software-based RAID can apply mirroring across two independent RAID systems, consolidate LUNs into a single larger logical LUN, or divide a single large physical LUN into multiple smaller logical storage volumes .

Software-based RAID also has some shortcomings, which include the following:

  • The parity calculations and other calculations that are needed take a fair amount of CPU time. Some Microsoft applications discourage the use of software RAID as being too CPU expensive.

  • For each write operation, two write operations flow across the I/O bus ”one for data and one for parity.

  • With software-based RAID, two levels of indirection can add a fair amount of complexity and overhead:

    1. The file system abstracts file-based I/O to volume-relative block I/O.

    2. The volume manager (software RAID implementer) adds another level of indirection, translating volume-relative blocks to physical disk-relative blocks. In the case of a distributed file system, this also means that two levels of locks must be obtained, either physically or virtually (e.g., a file opened in exclusive mode may be treated as if virtually locked).

There are several different types of RAID implementations. These are discussed in Sections 9.1.1 through 9.1.7.

9.1.1 RAID 0

RAID consists of simply striping data across multiple disk drives . Thus, RAID 0 can provide some performance advantages, but it does not provide redundancy or data protection.

As Figure 9.1 shows, data is written in turn to different disks when RAID 0 is deployed. The application in this figure issues multiple write requests. For the sake of simplicity, assume that the application always issues write requests with a fixed- size buffer and that this buffer size exactly matches the stripe size ”that is, the amount of data that the RAID configuration deals with as an integral unit. Figure 9.1 shows that the data is sprayed onto multiple disks in a round- robin fashion (each number inside a box represents a different write request).

Figure 9.1. RAID 0

graphics/09fig01.gif

RAID 0 is extremely efficient in terms of delivering I/O performance because disk read and write operations to the independent disks can happen in parallel. However, the biggest problem with RAID 0 is that it is not fault tolerant. Thus, if any single disk drive in a RAID 0 configuration fails, one is faced with a total loss of data, which explains the saying "lose one, lose all."

Further, striping can increase performance, but when used excessively or in the wrong situations, it can actually decrease performance. Transaction-oriented applications typically do I/O in small blocks of 1K or less. Streaming media applications tend to do I/O in much larger blocks. Nevetheless, storage devices tend to achieve their highest throughput when the I/O block size is much larger, typically about 512K. If one were to apply an eight-way stripe in this situation, the I/O block size per disk would be reduced to just 64K, and that would likely reduce the throughput in this case.

9.1.2 RAID 1

RAID 1 is essentially a solution in which write operations mirror onto primary and secondary drives. Figure 9.2 shows a RAID 1 configuration. The application issues a request to write a buffer denoted as buffer-1 . The data in buffer-1 is written to two separate physical disks. Similarly, the application issues another request to write buffer-2. This data is also written to not one but two separate physical disks.

Figure 9.2. RAID 1

graphics/09fig02.gif

Under ideal conditions, the primary and secondary drives would be identical. This means that read operations will perform very efficiently if they are split across the primary drive and the secondary drive. RAID 1 delivers the best data read performance, bar none, of all the various RAID configurations. The disadvantage is that RAID 1 requires a lot of storage space ”twice the space required by other RAID implementations. The reduction in disk prices somewhat mitigates this drawback. The big advantage with RAID 1 is that the data is instantaneously available from the secondary drive if the primary drive fails. RAID 1 is the only choice if the disk array can involve only two disks.

9.1.3 RAID 2

RAID 2 is no longer used. RAID 2 computes ECC (error correction code) information across stripes, but modern disk drives already store and compute ECC information across disk stripes.

9.1.4 RAID 3

RAID 3 is also referred to as striping with dedicated parity . In this RAID implementation, the parity is always stored in a particular dedicated disk while the data is spread across multiple drives.

Figure 9.3 shows a RAID 3 configuration. The application issues a single write request that consists of data in buffers 1, 2, and 3. This data ends up on different disks. RAID 3 also computes a parity (P1) that encompasses all three buffers, and this parity is written to yet another disk that is different from the disk where data buffers 1, 2, and 3 are written. Similarly, data buffers 4, 5, and 6 are written to different disks, and the parity corresponding to these buffers is called P2; the buffers 7, 8, and 9 are also written to different disks, and the parity corresponding to these buffers is called P3; and so on. Note that all the parity buffers are written to the same disk.

Figure 9.3. RAID 3

graphics/09fig03.gif

RAID 3 typically requires that a single read or write operation will involve all drives in the array. If a drive fails, a new drive is inserted into the array and the data on the lost drive is recovered from the data on the other drives and the parity information. Although RAID 3 has limited support in the PC world (e.g., Adaptec controllers do not support it), it has been used in the ultra -high-performance world of supercomputers.

9.1.5 RAID 4

RAID 4 is similar to RAID 3, except the disk drive stripe used is relatively large. Read operations overlap between different drives; however, write operations do not occur in parallel. RAID 4 has limited support from vendors; for example, Adaptec controllers do not support it.

9.1.6 RAID 5

RAID 5 , also referred to as striping with distributed parity, is the most successful of RAID data-striping implementations. The only technical difference between RAID 3 and RAID 5 is that whereas RAID 3 stores the parity on a dedicated drive, RAID 5 distributes the parity across all participating drives.

Figure 9.4 shows a RAID 5 configuration. The application issues a single write request that consists of data in buffers 1, 2, and 3. This data ends up on different disks. RAID 5 also computes a parity that encompasses all three buffers, and this parity (P1) is written to yet another disk that is different from the disk where data buffers 1, 2, and 3 are written. Similarly, data buffers 4, 5, and 6 are written to different disks, and the parity corresponding to these buffers is called P2; buffers 7, 8, and 9 are also written to different disks, and the parity corresponding to these buffers is called P3; and so on. Note that unlike RAID 3, the parity is also sprayed across different disks and not confined to a single disk.

Figure 9.4. RAID 5

graphics/09fig04.gif

RAID 5 offers a good balance between performance and data protection. With RAID 5, read operations can be handled in parallel by multiple disks. Write operations typically involve at least two disks ”one for data and one for parity. RAID 5 is the most commonly used scheme in practice. RAID 5 requires the use of at least three drives. It also requires some effort to rebuild when a drive goes bad and needs to be replaced .

9.1.7 Dual-Level RAID

Dual-level RAID is also sometimes referred to as hybrid RAID . Dual-level RAID schemes combine the basic RAID implementations in different ways, attempting to preserve and build on the advantages, while minimizing the drawbacks. We will look briefly at RAID 10, RAID 30, and RAID 50.

As shown in Figure 9.5, RAID 10 combines RAID 0 and RAID 1 features. Data is written in stripes to two different disks, while each of these disks is mirrored. This is also called striping of mirrored arrays . RAID 10 requires a minimum of four disks, but it can tolerate the failure of two disks without data availability being affected. RAID 10 is fairly popular because it provides redundancy and high performance but is also simple to implement.

Figure 9.5. RAID 10

graphics/09fig05.gif

RAID 30 combines RAID 0 and RAID 3 features (see Figure 9.6). With RAID 30, data stripes across different disks (RAID 0) and a dedicated parity disk. This is also referred to as striping of dedicated parity arrays . RAID 30 requires a minimum of six disks to implement and can tolerate the loss of two disks, one per array. RAID 30 is typically used when the data consists of large files that are accessed sequentially ”for example, in video streaming.

Figure 9.6. RAID 30

graphics/09fig06.gif

As shown in Figure 9.7, RAID 50 combines RAID 0 and RAID 5 features. With RAID 50, data stripes across different disks as in RAID 0, and parity is written to all the disks involved in a round-robin fashion, as in RAID 5. This is referred to as striping of nondedicated or distributed parity arrays . RAID 50 needs a minimum of six disks and can tolerate failure of up to two disks, one per array. Unlike RAID 30, RAID 50 is geared toward data files that are relatively small.

Figure 9.7. RAID 50

graphics/09fig07.gif

Some RAID controllers have the capability to act as multiple SCSI identifiers; that is, a single RAID controller can use multiple SCSI identifiers. The RAID controller also supports the concept of multiple LUNs per SCSI device, or multi- LUN support .


   
Top


Inside Windows Storage
Inside Windows Storage: Server Storage Technologies for Windows 2000, Windows Server 2003 and Beyond
ISBN: 032112698X
EAN: 2147483647
Year: 2003
Pages: 111
Authors: Dilip C. Naik

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net