Understanding RAID

RAID-Redundant Array of Inexpensive (or Independent) Disks-is a set of industry standards that defines storage solutions involving more than one hard disk. RAID is not unique to the Solaris environment, or even UNIX for that matter.

There are two common ways to implement RAID: hardware-based and software-based. Hardware-based RAID requires you to purchase storage units (or storage devices) that have RAID-aware controllers built directly into them. For example, you might see a hardware RAID storage cabinet of 20 hard disks. This cabinet will likely have its own processor and memory, in addition to hot-swappable hard disks. Fault tolerance is built in, and hardware RAID solutions are usually very fast in terms of disk I/O. The downside to hardware RAID is that it's usually prohibitively expensive. You can easily spend tens of thousands of dollars just for storage. For some administrators this isn't a big deal, but for most people, spending the money just isn't justifiable.

Software RAID is controlled by an operating system. Many popular network operating systems, including Solaris, other UNIX versions, Linux, and Windows NT and 2000 support software RAID. Instead of purchasing independent hardware devices, you can use your existing hard disks and implement RAID through the operating system. Software RAID is a bit slower and not quite as efficient as hardware RAID, but a very cost-effective solution. After all, you already own the operating system!

A number of RAID levels are defined, including RAID 0 through RAID 7, RAID 10 (also called RAID 1+0), and RAID 0+1. Many RAID vendors will combine RAID levels in their products, so you might see something like RAID 53, which means RAID 5 plus RAID 3. All of these implementations can make learning about and implementing RAID confusing. The three most common levels, and the levels supported by Solaris Volume Manager, are RAID 0, RAID 1, and RAID 5.

RAID 0

RAID 0 is known as disk striping. Solaris also implements a concatenation version of RAID 0. In RAID 0, data is written evenly across all disks that are part of the set, making the data appear as a "stripe" across all involved disks. To implement RAID 0, you need at least two hard disks.

The advantages of RAID 0 are that it provides fast disk I/O (the fastest of any RAID level), it has a simple design, and it's easy to implement. The negative to RAID 0 is that it does not provide fault tolerance. Fault tolerance means that if one disk fails, the computer can still operate properly. Without fault tolerance, if one of the disks in the volume fails, the entire RAID 0 volume will cease to operate. RAID 0 is the only one of the RAID levels that does not provide fault tolerance. Figure 12.1 illustrates what a RAID 0 striped volume logically looks like.

click to expand
Figure 12.1: RAID 0

To summarize RAID 0, it's fast, but it doesn't provide fault tolerance.

RAID 1

RAID 1 is known as disk mirroring. In a RAID 1 volume, file systems (or entire hard disks) are mirrored onto one or more additional hard disks. Consequently, in order to use RAID 1, you need at least two hard disks. If one of the disks fails, another disk containing the same information is available for use. Of course, if a disk fails and its mirror fails at the same time, you then have a serious problem. For this reason, even if you use a mirrored volume, always maintain current data backups (just as if you had no fault tolerance).

Note 

You will sometimes hear people refer to RAID 1 as disk duplexing. The difference between disk mirroring and disk duplexing is which disk controllers the hard disks are located on. If both disks in your set are on the same controller, it's a mirror. If they're on different controllers, it's a duplex. The difference is really only a technicality, as setting up a mirror is no different from setting up a duplex in Solaris.

Most RAID 1 implementations are slow when it comes to writing data to the disk (because the data has to be written to two or more disks), but comparatively fast when reading (because data can be read from one or more disks at the same time). It's still not as fast as RAID 0 for disk reads, though.

One of the advantages of RAID 1 is that it can be used to mirror system partitions (such as the root or /usr), whereas other RAID versions cannot contain these file systems.

The biggest downside to RAID 1 is that it's very inefficient. For example, to provide a complete mirror of 10GB of disk storage, you need to purchase 20GB of hard disk space. It's a trade-off: you get complete fault tolerance but you waste disk space. Figure 12.2 shows a RAID 1 volume.

click to expand
Figure 12.2: RAID 1

Solaris 9 supports combinations of RAID 0 and RAID 1, known as RAID 0+1 and RAID 1+0. How to implement these is covered later in this chapter ("Combining RAID 0 and RAID 1").

RAID 5

RAID 5 is called disk striping with parity. In a RAID 5 volume, data is written across the disks in stripes, just as it is in RAID 0. But unlike RAID 0, RAID 5 provides fault tolerance. Each stripe contains parity information, which provides data redundancy. A RAID 5 volume requires at least three components to implement, and parity is equally distributed among the three components. Although it's possible to create a RAID 5 volume with two or more components on the same hard disk, it's recommended that you use at least three separate hard disks. If one of the components fails, the computer can continue to operate normally, albeit slowly. If more than one component fails in a RAID 5 volume, the entire volume fails.

Note 

The term component is used in this chapter to refer to any individual slice, soft partition, or hard disk used to create a volume.

RAID 5 is slower than RAID 0 when writing to disk, because RAID 5 needs to calculate and write the parity information. Reading from a RAID 5 volume is as fast as RAID 0; however, if anyone asks you which is the fastest, because of the write speed differences, always answer RAID 0.

In a RAID 5 volume, you lose storage space equivalent to one component, for parity purposes. If you have three 10GB hard disks in a RAID 5 volume, you will have a 30GB volume capable of storing 20GB of data. If you have fifteen 10GB hard disks, you will have a 150GB volume capable of holding 140GB of data. Figure 12.3 shows a simple RAID 5 volume.

click to expand
Figure 12.3: RAID 5

In terms of storage space, RAID 5 is more efficient than its fault-tolerant counterpart, RAID 1. In fact, the more disks you use in a RAID 5 volume, the more efficient your storage usage becomes. However, when you use more disks, you assume a greater risk of a single disk failure.

Note 

RAID levels are not mutually exclusive on one computer. In other words, you can have a RAID 1 and a RAID 5 volume on the same computer, depending on your storage needs.




Solaris 9. Sun Certified System Administrator Study Guide
Solaris 9 Sun Certified System Administrator Study Guide
ISBN: 0782141811
EAN: 2147483647
Year: 2003
Pages: 194

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