Kernel Configuration – Part XII
Depending on who you talk to, RAID can stand for “Redundant Array of Independent Discs” or “Redundant Array of Inexpensive Discs.” No matter. They both point to the same theory and practice in Linux; data storage redundancy. That’s today’s kernel configuration section – Multi-Device Support.
Let’s talk first about the principles behind a RAID setup. RAID uses multiple discs for speed, increased data storage, or data redundancy. Fundamentally, there are 5 levels of RAID in Linux; Linear, RAID-0, RAID-1, RAID-4, and RAID-5.
Linear RAID uses two or more discs, appending data from one to another. In other words, when disc 1 is full, disc 2 steps in to store data. There is no redundancy in Linear RAID – only an increase in storage capacity. Further, there’s no marked increase in data access speed because you’re accessing one drive in the RAID array at a time.
RAID-0 “stripes” data across the RAID drives. Some data will be written to the first drive, some to the second, etc. Like Linear RAID, RAID-0 provides no redundancy. Because the data has been written in parallel across the drives, not all data exists on all drives. Lose a drive and your data is gone. RAID-0 will, however, decrease data access time. Your system will run more quickly.
RAID-1, unlike Linear and RAID-0, does provide data redundancy. This is the first level in which data is “mirrored” across the drives in the RAID array. All data that exists on one drive exists on all the others. RAID-1 requires at least two drives and they should be of equal size, otherwise, your overall RAID array will be the size of the smallest drive. Performance with RAID-1 can actually be slower than with a single drive or RAID-0, as all the data is written across multiple discs.
RAID-4 is, for the most part, pretty useless. It reserves one disc for parity information while striping the data across the others. This is much like Linear mode, with an additional disc thrown in for parity data. Parity data can be used to reconstruct and retrieve the data on the other drives, but this really isn’t a redundant method of data storage. Consequently, RAID-4 is probably the least used of the RAID schemes.
RAID-5 is designed for 3 or more discs and provides both redundancy and speed. Like RAID-4, RAID-5 pays close attention to parity data. However, rather than reserving a device in the RAID array for this data, it’s written across the array. Because the parity data is written across the array, data recovery can be accomplished fairly quickly. In fact, using a “spare disc” configuration will allow RAID-5 to reconstruct the data to the spare disc immediately after the failure of a drive. Because of it’s increased speed and redundancy, RAID-5 is probably the most common setup for multiple storage devices.
With all that in mind, you’ll need to make a choice in your kernel configuration. Do you have mutliple drives of the same size that you’d like to configure as a RAID array? The Multi-Device Support section of the kernel configuration will allow you to do this. In fact, you’ll be able to set the RAID level, as well. Again, evaluate your needs and select the appropriate option.
Tomorrow, it’s on to networking options in your kernel configuration.