8.9. Introduction to RAID

RAID (which stands for Redundant Array of Inexpensive Disks) is a method for combining multiple partitions on different disks into one large virtual device, also known as a RAID array. This has several advantages:

  • You can create a single filesystem that is as big as all your existing hard disks, instead of needing to mount each one separately at a different mount-point directory.

  • In most cases, reading to and writing from a RAID device is faster than accessing a single disk, because the data being read or written is spread across multiple drives.

  • With the right configuration, data on a RAID device can survive even if any one of the hard disks fails. This is done by spreading redundant information across all drives, and comes at the cost of some disk space.

The different types of RAID configuration are called levels. The levels supported by Linux are:

Concatendated or Linear In this mode, all the partitions in the RAID array are combined end-to-end into one large virtual device. Data written to the device will fill up the first disk and then go on to the second disk, and so on. Linear mode does not generally make data access any faster, as all the blocks of a file being read or written are likely to be next to each other on the same disk.

RAID 0 or Striped As in linear mode, multiple partitions in striped mode are also combined into one large device. Data written to the array, however, will be spread evenly across all disks so that reading or writing a single large file is much faster. Ideally, if you had 5 disks in your striped RAID array, then accessing data would be 5 times faster. The only problem with this mode is that it does not deal well with disks that are not all the same size—any space on a disk that is larger than the rest will still be used, but only at its normal speed.

RAID 1 or Mirrored In mirrored mode, every partition in the array contains exactly the same data. This means that in the event of a disk failure, your data is safe even if only one disk survives. The down side is that under normal conditions most of the disks are wasted and the usable space on the array is only as big as the smallest partition. Reading from a mirrored array is as fast as reading from a striped array, but writing will be as slow as the slowest disk due to the need to write all data to all disks simultaneously.

RAID 4 or Parity Parity mode is rarely used, as it offers no real advantage over RAID 5. It provides protection against a single disk failure and increases read speed but not write speed. A RAID 4 array can survive the loss of any one disk because it dedicates one disk to the storage of parity information, which can be used to re-construct data on other disks if one of them fails. Because all writes to the array cause a write to this disk, it becomes a bottleneck that slows done the entire array.

RAID 5 or Redundant This is the most useful RAID mode as it provides protection against a disk failure, increases read and write speeds, and combines multiple partitions into one large virtual device. A RAID 5 array can survive the loss of any one disk without the loss of all data, but at the expense of sacrificing some space on all the disks for storing redundant information. It is faster than linear mode, but not quite as fast as striped mode due to the need to maintain redundancy.

This chapter only covers the RAID configuration software on Linux. If your system has a separate RAID controller card or external array, you will need special software to set it up. Virtual RAID devices on hardware controllers will show up in the Partitions on Local Disks module for partitioning, just like any real hard disk would. They will not be visible or configurable in the Linux RAID module.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.240.75