Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Absolute BSD - The Ultimate Guide To FreeBSD (2002).pdf
Скачиваний:
25
Добавлен:
17.08.2013
Размер:
8.15 Mб
Скачать

Chapter 17: RAID

One of the big features of SCSI systems is their ability to use RAID, or Redundant Array of Independent Disks.[1] The "I" in the definition used to mean "Inexpensive," but that's kind of relative. A one−terabyte RAID array costs far less than a single one−terabyte disk, but it is still very expensive.

A RAID system splits data between the drives to improve performance or reliability. RAID works either in hardware or software.

Hardware vs. Software RAID

FreeBSD supports both hardware and software RAID. Hardware RAID is managed by the SCSI controller, and host adapters that can handle RAID are called RAID controllers. When you run RAID in hardware, the controller handles all the computations of how to arrange data on the hard drives, thus reducing the load on your system. Most hardware RAID system are very stable, and a hardware controller is unquestionably the best way to handle RAID.

Software RAID is managed by the operating system, and the OS is left to figure out how to arrange data on the disks. This method increases system load but uses less expensive equipment than hardware RAID.

It's much simpler to use hardware RAID than it is to use software RAID because, typically, all you need to do is follow the manual. There's usually a simple menu−driven RAID BIOS that allows you to set partition sizes and restore damaged disks, and that's all you need to know. Software RAID, on the other hand, demands that sysadmins actually know what they're doing. We'll discuss software RAID in detail in this chapter. Hardware RAID has the same theory, but there's really not much to discuss beyond the theory and which menu option to select.

[1]You can also have IDE RAID systems, but they suffer from all the disadvantages of IDE. If you want a recap, we discussed those disadvantages at great length in Chapter 1.

RAID Levels

RAID comes in a variety of types. RAID−0, RAID−1, and RAID−5 are the most popular.

RAID−0 is more commonly called striping, and technically isn't RAID at all. It requires at least two disks, and data is shared between the disks in a way that increases throughput and disk size, but without redundancy. You could use RAID−0 to combine several 100GB drives to create one massive virtual disk, for example, but a hard drive failure will destroy data on the one drive, and any striped system that requires that drive will become useless when that one drive fails. You'd need to restore from backup in order to access any information. RAID−0 is useful if you need a single filesystem that's really, really large, but it provides no reliability benefits.

RAID−1 is called mirroring, where the content of one disk is duplicated on another. (You need disks in multiples of two.) This is a good method to use for low−cost reliability.

In RAID−5, data is partially duplicated across all the drives and arranged in such a manner that the loss of any one drive will not destroy any data. In "hotswappable" systems, the damaged drive can even be replaced and rebuilt while the system is running. Again, you need two disks or more.

391