You are hereBlogs / Joseph Kexel's blog / To Stripe or Not to Stripe, That Is the Question.

To Stripe or Not to Stripe, That Is the Question.

By Joseph Kexel - Posted on 09 June 2009

Recently, a client found himself in the midst of a severe data loss. It came down to his hardware configuration that made data recovery extremely difficult.

The client had a PC put together by a friend. Unfortunately, that friend made a configuration choice that doomed my client from the start. The friend used RAID 0 (non-redundant striping) of 2 physical hard disks into one logical drive. It seems like a great idea at first glance. Instead of two hard disks as separate drive letters (volumes), the OS, in this case Windows, sees just one large drive. This logical volume can even offer better performance, because you can read data off both drives at the same time.

However, this configuration comes at a very high price. You can think of how it works like this. If, you have 2 decks of playing cards, one blue backed and one red backed, you can start to shuffle them. When you stop at the first step after you had one deck in each hand and you perfectly interleaved one card of each color throughout both decks, you have a close analogy of how the hard disk in striping looks to Windows or Linux, for that matter.

You have twice as much space (cards) in a single deck. Sounds great until one of the decks fails and suddenly all the blue or red cards are removed from your large deck. Now, it can be clearly seen that with virtually every file spread across both decks of cards, when you lose one of the real decks of cards (hard disks), you lose all the files. That was the predicament my client found himself in. At that point, the only wise course of action will be to send both drives to a firm specializing in data recovery and pray the bad drive can be revived. Most striped drive sets will go offline as soon as any disk begins to fail. The striped set of drives is an all or nothing proposition most of the time.

With a non-striped hard disk system, you usually have a failing drive that is limping along allowing you to have a file system to read data off from. In fact, there are free tools in addition to more advanced tools to force operating systems to read as much as possible off a bad drive. Of course, any drive can fail catastrophically at any time, but there are far more possibilities for low cost recovery with a standard disk configuration than with striped drives.

There are RAID options that can provide better protection for your data. First there is RAID 1 (mirroring) where 2 drives are made to look as one drive, but it is done differently than striping. Each drive has an entire copy of every thing, so there are actually 2 copies of everything. Even though there are two drives, the total usable volume size is whatever the smaller drive offers. If, we look at the playing card analogy, think of it like two decks that are kept seperate, but each has all the same information stored across them. If, a deck is missing a card (smaller drive), obviously the mirror can only be as big as the smaller deck. The great advantage of mirrored drives is when you lose either deck (hard drive) and you can still do everything you were doing before.

When you compare RAID 0 with RAID 1, RAID 0 doubles your risk for data loss for any disk failing brings on the pain. RAID 1 halves your risk for BOTH drives must fail before you are crying like a baby.

Another option is RAID 5, where there is striping. However, there are at least 3 drives and through the magic of mathematics any single drive failure will be compensated for due to the data being written in a way each piece of data is encoded as 3 pieces of data which are spread across all 3 disks. The fancy math can recreate the data with data from any two drives. Many RAID 5 systems allow for a hot spare which can be swapped in automatically for a bad drive, so 2 drives would have to fail before you are forced to go to your backup media.

To sum up, RAID 0 provides no redundancy and greatly increases both the risk of data loss and the potential scope of the loss. The only good reasons to use RAID 0 is you need the fastest performance or your data sets are too big to fit on a single volume (less likely today, but possible). For example, DVD authoring would benefit from RAID 0 in both ways. DVDs are compressed, so the original digital video files may be huge and may not fit on a single drive (think back to 20 gig drives). The rendering (compressing the data into a DVD format) takes a very long time, so any performance boost would be welcomed. The one caveat is backups must be done regularly.

I will close with this, "A good backup is a beautiful thing!"