RAID: Create & manage arrays
Avoiding puns about insect sprays, Neil Bothwick shows you how to make multiple disks fly and how to fix them when things go wrong.
Last month we looked at using LVM [ seeTutorials,p72, LXF205] to manage partitioning and multiple disk drives. There is another technology used when multiple drives are involved called RAID. To give it it’s full name, Redundant Array of Inexpensive Disks combines multiple disks into a single block device to give extra capacity or redundancy in case of failure. The simplest form of RAID is two disks in what is called a RAID 1 array. In this case the two disks are mirrors of each other. All writes take place to both disks (buffering makes sure this does not impact performance) while reads are performed from whichever drive is able to serve the data the fastest. This means you get a slight boost in read performance, no noticeable difference in write performance and the same capacity as with only one disk. Where you benefit is in data security. Because everything is written to both disks, if one should fail your data is still available from the other. Not only that, but when you remove the faulty disk and add a new one to the array, data will be automatically copied to it in the background so you regain the security of two copies of everything as quickly as possible.
Types of RAID
There are various levels of RAID, which describe the way in which data is spread across the various disks ( seeRAIDlevels inbrief). There are also three different ways of implementing RAID: Hardware RAID, Software RAID and FakeRAID. Hardware RAID, as its name implies, is implemented entirely in hardware, either via a controller card or on the motherboards of some server systems. No matter how many disks you connect to a hardware RAID, you only have one show up in the OS. Hardware RAID is fast but has two drawbacks: it’s expensive and it uses its own disk format. That means that if your controller fails you will need a compatible replacement to be able to read your disks.
Software RAID does everything in software and is implemented in the Linux kernel. With modern hardware, the performance is similar to hardware RAID but far more flexible in the control it offers, and the ability to read disks on a different system. This is what we are looking at here.
If your motherboard claims to support RAID but didn’t cost hundreds of pounds, it’s most likely to be what is called