Community member Anthony Dominello offered to put together a RAID Explained article following our discussions on the podcast recently. Over to you Anthony…
Lets Start With Basic Storage
In order to understand what RAID is, it would be helpful to have a deeper understanding of digital storage technology. Most of us know in general terms what disk storage is in its simplest terms, but a brief review will help make the next steps easier to understand. Disk storage stores data in the same way, whether it’s a CDROM, DVD, or a hard drive on your computer. It’s all data consisting of ones and zeroes whether it’s a Pro Tools session, audio files, a movie, an application, or vacation photos. Most disk storage computer users are familiar with is fairly straightforward: You save something, it is written to the disk. Open something, it is read from the disk. This can be illustrated like this:
Then There Is A Volume Manager
There is, however, another way for computers to store information on disks, and that is via what is sometimes called a Volume Manager. What a Volume Manager does is take two or more physical disk drives, and presents them to the computer as one large disk, as illustrated below…
It’s Easy Just Add Drives
The nice thing about volume managers is that if you want to add storage, you just add another physical disk to the volume manager, and the computer thinks it suddenly has more space on an existing drive. No need to create another volume, format the disk, and re-organize your files across the new drive.
It’s Not That Simple, Data Loss Is Possible
However there’s a problem. Either way, you’re still vulnerable to hard drive failure. But if any of the physical drives in the Volume Manager fail, whatever data was on that disk will be lost. Furthermore, since the Volume Manager was organizing the disks and not the file system (as in a standard single-disk connection), there’s no real way of telling what data was lost, and you can loose everything on all the disks from a single disk failure.
RAID stands for “Redundant Array of Independent (or Inexpensive) Disks.” In RAID, as in a volume manager, a group of disks are seen by the host computer as one single large disk. The difference is in the way data is stored on the disks. There are many types of RAID with numbers from 0 through 10 (computer people like to start numbering from zero), but for the purposes of this article, we’ll only deal with RAID 5 and its variants, which are the most useful types for failure-resistant storage and backup solutions.
What Is a RAID 5 System?
A RAID 5 system consists of three or more disks in what is called a RAID Array. We’ll discuss a three-disk solution for simplicity’s sake. In the simplest form a RAID 5 Array, similarly to a Volume Manager, presents multiple disks to the computer as one large disk— but with a difference. In the background, the RAID Array only uses two disks for data storage, and stores what is called “Parity Data” on the third. Simply put, Parity Data allows RAID to do its magic. If any one disk fails in the array, you get a notification that there was a disk failure and which disk failed. You then replace the failed disk with a new empty disk, and the RAID Array reconstructs the lost data on the new disk, and you’re off and running.
Hot Spare Option
Furthermore, some RAID 5 systems allow you designate a fourth disk as a “hot spare.” In the event of a single disk failure, the recovery of the bad disk begins immediately once the failed drive is detected. You can then replace the failed drive at your convenience, at which point that new drive becomes the hot spare ready in case of another failure.
So How Does One Drive Protect The Data On 2 Drives?
What sorcery is this which allows an entire disk to fail without losing any data. Remember in the beginning I stated that all data on a computer disk is just ones and zeroes. A RAID array looks at a section of the disk and compares it to the same section of another disk. For our example we will use eight bits, or binary digits. In reality these sections are much longer. Let’s say on the same section of disk 1 and disk 2 the data is as follows:
The RAID controller performs what is called an Exclusive OR operation on each single digit of both sections. An Exclusive OR means the following:
- If both bits are zeroes, then the parity bit is zero
- If one bit is zero and the other is one, the parity bit is one
- If both bits are ones, the parity bit is zero
Given those rules, the parity bits for the above section of the first two disks would be:
Now let’s say Disk 2 crashes. We have no idea what data was stored in this section now. Fortunately, we have the parity data. The RAID controller does the same Exclusive OR operation on disk 1 and the parity data and gets the following result:
As you can see, the New Data is exactly the same as the lost data from Disk 2. When the controller gets a new disk drive, it can then recreate the old data from the non-failed Disk 1 and the Parity Data. So what you lose in storage space in a RAID 5 array, you gain in insurance against data loss.
Most RAID arrays used in backup devices don’t actually have a dedicated parity drive, but store user data and parity data across all volumes. This allows for more efficient usage of available disk space, especially as more drives are added to the array.
Hardware RAIDs Are Best
There are also types of arrays which have so-called “Dual Parity” systems in place that can protect data even in the unlikely event of two simultaneous disk drives. RAID 5 is best handled by an external device which contains a RAID controller. The controller is usually a piece of hardware attached to your computer. This has many advantages, chief among which is the computer’s performance will be significantly reduced if it has to do all the various calculations and maintenance tasks that it takes to operate a RAID system.
There are software RAID solutions out there, but they are nowhere near as efficient as a dedicated hardware controller. Also, a dedicated RAID controller will protect your data even in the event of a computer failure or crash. Software RAID won’t do that. For all my ranting about software being the way everything usually goes, dedicated hardware RAID controllers have been the standard since the late 1980s. For the purposes of backup and protection against data loss, RAID is the way to go.
What Are The Downsides of Using A RAID?
The only disadvantage is additional cost, both of the hardware storage unit itself and the extra disk drives; but these are both easily justified by the safety gained by using them.
Two related technologies are SAN and NAS. These palindromic acronyms stand for “Storage Area Network,” and “Network Attached Storage.” They sound similar and are similar in many ways. Either can be single-drive or RAID arrays. The primary difference is how they are presented to your computer.
What Is A NAS Drive?
A NAS device looks like a storage server on your network. These devices can be small under-the-desk units or full-rack implementations. They basically have a simple computer system on board (usually running a version of Linux or other free OS) that maintains the network connection and manages the array.
What Is A SAN Drive?
A SAN is the same type of unit, except that it connects to your computer via eSATA or Fiber Channel or sometimes proprietary connection, and it appears to your computer like one or more disks that are actually on your computer. In fact, some SAN units are simply the same underlying system as a NAS, but with different connectors and controllers.
What Is The Difference Between NAS & SAN?
Cost is the main difference here. Since NAS use simple network connections, the data transfer rates don’t need to be as fast. They are excellent for on-site backup drives and large sample libraries— especially if these need to be shared between several computers. Unless you are running a large facility where many people need access to data and you don’t want to lose any of it regardless of which workstation it originates from, the cost of most SAN solutions may not be justifiable due not only to the units’ cost but the cost of running high-speed fibre channel or similar-speed networking throughout an office.
RAID Is Best
RAID Arrays are simply the best insurance you have against disk failures for on-site storage. And if you’re using any cloud-based services, I can pretty well guarantee that those service providers have multiple redundancy built into their storage systems, and at the heart of that redundancy is some form of RAID technology. Of course, any technology is useless if you don’t use it.
I will repeat Mike Thornton’s oft-quoted mantra that if it isn’t backed up in three places, including one off site, it’s not truly backed up. However, if you have a large amount of data that you need constant access to that is irreplaceable, then RAID deserves serious consideration. 10 years ago, RAID 5 technology was prohibitively costly. Now RAID 5 capable multi-disk enclosures are available for less than US$1,000. The important thing when purchasing is to find a dealer that you trust to guide you through the selection process. Just because a piece of hardware says it’s RAID capable, doesn’t mean it’s RAID 5 capable. Recall the other RAID numbers. RAID 0 is designed for increased throughput, but has no failure protection. RAID 1 simply keeps a mirrored copy of your data on another disk. That might be enough for you, or it may not. best to find a dealer who will take the time to talk with you and discuss your needs to come up with the most cost-effective solution for you.
Thanks Anthony for explaining this for us, I for one have a much clearer understanding.