Hardware RAID vs. Software RAID

Matej Ha?u?, 143350<at>mail<dot>muni<dot>cz

Content

RAID

RAID acronym stands for Redundant Array of Inexpensive/Independent Disks. It means, that you somehow store data on more than one disk.

RAID was developed for

RAID is not substitution for regular backup. It can prevent data loss during disk failure (according to RAID level), but it will not sustain accidental "rm -rf /" or when filesystem corruption occurs.

Software RAID

In linux kernel is RAID supported from version 2.4.0. There are patches available for kernel version 2.2.X. One of advantages of software RAID is that you can create RAID array over different devices (e.g. IDE and SCSI).

With software RAID you can simple create nested raid levels like 01, 10 or 50. This feature is implemented mainly in expensive high end RAID controllers.

Disadvantage is booting. In linux you can boot only from RAID 1 partition. But it is not big problem. You can create RAID 1 /boot partition and rest of the system on desired RAID level.

Huge disadvanage is performance on RAID 5 and RAID 6. These levels use parity, which must be computed. Computation of parity cost CPU time. Result is, that HW RAID will outperform SW RAID in RAID levels above, for RAID 0 and RAID 1 there is no such dramatic difference.

Mdadm (man 8 mdadm) is utility for creating, monitoring and managing RAID arrays.

Hardware RAID

To build hardware RAID, you need to plug special device to computer - RAID controller. It may be special card (PCI, PCIe) or built into motherboard. Card contains CPU unit, to compute parity. Because of this, computer`s CPU doesn`t need to worry about parity computation.

Next important thing on RAID controller is read/write cache which can improve performance again. Cache can be battery protected. On power failure no pending write operations are lost, because they are executed when power supply is restored.

There is no problem with booting, because system "see" only one logical disk.

Each vendor has its own administration utility. This is proprietary software and typically it is not open source.

Bibliography