RAID Storage Levels Explained
Back when I was a novice service tech and barely knew anything about system administration, one of the few topics that we were always expected to know cold was RAID Redundant Array of Inexpensive Disks.
It was the answer to all of our storage woes. With RAID we could scale our file systems larger, get better throughput and even add redundancy, allowing us to survive the loss of a disk, which, especially in those days, happened pretty regularly.
With the rise of NAS and SAN storage appliances, the skill set of getting down to the physical storage level and tweaking it to meet the needs of the system in question are rapidly disappearing. This is not a good thing. Just because we are offloading storage to external devices does not change the fact that we need to fundamentally understand our storage and configure it to meet the specific needs of our systems.
A misconception that seems to have entered the field over the last five to ten years is the belief that RAID somehow represents a system backup. It does not. RAID is a form of fault tolerance.
Backup and fault tolerance are very different conceptually. Backup is designed to allow you to recover after a disaster has occurred. Fault tolerance is designed to lessen the chance of disaster. Think of fault tolerance as building a fence at the top of a cliff and backup as building a hospital at the bottom of it. You never really want to be in a situation without a both a fence and a hospital, but they are definitely different things.
Once we are implementing RAID for our drives, whether locally attached or on a remote appliance on a storage network, we have four key RAID solutions from which to choose today for business: RAID 1 (mirroring), RAID 5 (striping with parity), RAID 6 (striping with double parity) and RAID 10 (mirroring with striping).
There are others, like RAID 0, that only should be used in rare circumstances when you really understand your drive subsystem needs. RAID 50 and 51 are used as well but far less commonly and are not nearly as effectively. Ten years ago RAID 1 and RAID 5 were common, but today we have more options.
Looking at RAID Levels
Let's step through the options and discuss some basic numbers. In our examples well use n to represent the number of drives in our array and we will use s to represent the size of any individual drive. Using these we can express the usable storage space of an array, making comparisons easy in terms of storage capacity.
RAID 1In this RAID type, drives are mirrored. You have two drives and they do everything together at the same time, hence "mirroring." Mirroring is extremely stable as the process is so simple, but it requires you to purchase twice as many drives as you would need if you were not using RAID at all, as your second drive is dedicated to redundancy.
The benefit is that you have the assurance that every bit that you write to disk is being written twice for your protection. So with RAID 1 our capacity is calculated to be (n*s/2). RAID 1 suffers from providing minimal performance gains over non-RAID drives. Write speeds are equivalent to a non-RAID system while read speeds are almost twice as fast in most situations, as during read operations the drives can access in parallel to increase throughput. RAID 1 is limited to two drive sets.
RAID 5Striping with Single Parity, in this RAID type data is written in a complex stripe across all drives in the array with a distributed parity block that exists across all of the drives. By doing this RAID 5 is able to use an arbitrarily sized array of three or more disks and only loses the storage capacity equivalent to a single disk to parity. But the parity is distributed and does not exist solely on any one physical disk.
RAID 5 is often used because of its cost effectiveness, due to its lack of storage capacity loss in large arrays. Unlike mirroring, striping with parity requires that a calculation be performed for each write stripe across the disks and this creates some overhead. Therefore the throughput is not always an obvious calculation and is dependent heavily upon the computational power of the system doing the parity calculation.
Calculating RAID 5 capacity is quite easy: it is simply ((n-1)*s). A RAID 5 array can survive the loss of any single disk in the array.