Jump to content
  • entries
    3
  • comments
    5
  • views
    1,395

A More Flexible Way To RAID

wpirobotbuilder

833 views

In traditional RAID setups, the data is spread out across all drives in the RAID array. If you were running RAID 5 with six drives, for example you would have five drives worth of storage space, with the missing space being for parity data. If you lose one drive, you haven't yet lost all your data. Throw in a new drive, and rebuild your RAID array (and pray you don't run into an unrecoverable read error or silent corruption, because then you can kiss your data good-bye).

This has obvious advantages: It is space efficient for the amount of redundancy it provides, and can increase read/write performance with good hardware, since there are multiple drives to run I/O on. However, a single drive going down will kill all of your data.

What if you wanted to be able to choose how much overhead you wanted to use for parity calculations? Or what if you wanted a drive loss to not completely kill all of your data? Here's an approach.

Here, we have a single giant parity RAID setup. Each color represents pieces of data belonging to a single data chunk (e.g. all the red blocks represent a chunk, spread out over all the drives). This is how traditional RAID works.

blogentry-653-0-72539600-1395691968_thum

The proposed "betterRAID" method is to have a fixed parity ratio in a RAID array. For instance, if I want a RAID volume with N parity drive worth of space for every M drives worth of space, then I will have N/(N+M) for my overhead (for N = 1 and M = 4, I have a RAID 5 with five drives, pretty common). However, let me use any number of drives with this setup, and write a given chunk of data to 5 of those drives, then the next chunk to the next 5 drives, and so on, like this:

Here, the red data is written across five drives (twice as much data is written to an individual drive) instead of across all ten drives. The orange data gets written to the next five drives, then the green, etc.

blogentry-653-0-06588900-1395691974_thum

Notice that if I kill any two drives, I am guaranteed to have 50% of my data survive in the worst case, and 100% of my data survive in the best case. To gain this advantage over traditional RAID 5, I sacrificed one additional drive worth of space (one drive for every five, meaning two drives of the ten are reserved for parity). Obviously, for very large files that span tons of data chunks, they will become corrupted. For smaller files (which can fit inside of a single data chunk), they would survive if the chunk survived, and therefore would be recoverable.

Here is a slightly more complicated example. Black lines indicate dead drives.

blogentry-653-0-20632800-1395691981_thum

In this case, we write chunks of data across five drives (with 20% of that space used for single-parity), and have 18 drives total in our array. In this case, we can kill two drives, and in the worst case we have lost only 25% of our data.

To clarify: A "chunk" is not a complete file. A chunk is just a chunk of data (say, 512KB). If I was writing a 10KB file, it would fit within that chunk, and the next file I wrote might also fit within that chunk. When the chunk is completely full of data, the next one would start to be filled with new incoming data. Writing a multi-gigabyte file would span thousands of chunks.

There are obvious upsides to this, most notably the fact that losing more drives than there are parity will not destroy all data, though much of it would likely be corrupted if it spanned many chunks. This also makes disaster recovery a little bit better, ensuring that a failure will not necessarily kill absolutely everything. In addition, if we used dual-parity we could make it even harder to kill data.

The downside is that now it is harder to manage the data for an individual file, since you have to find which drives the data lives on.

This doesn't provide the same level of protection that dual-parity or triple-parity RAID does. It provides a measure of disaster recovery in case a RAID fails completely. I think it'd be really cool for a software RAID solution like ZFS to implement something like this for RAID Z1, Z2 and Z3.

3 Comments

I don't quite see the gain in your new betterRAID, or are you going to sacrifice drive count/usage for better "chances" of not losing your data? Would be a worthy research study but something tells me its been done but can't find it at the moment.

 

Have you looked at this? http://www.drobo.com/how-it-works/beyond-raid/ 

Yet another RAID type, I think it offers flexibility for consumers or an option. I have only used the first gen of their product and can say its slow as butt but does work (for others). We used it for a special type of backup and wrote tens of gigs every night, in one year we killed all four drives and replaced them of course but used consumer level drives. Maybe with enterprise level drives it would of faired better, they have more enterprise solutions now as well.

Link to comment
Link to post

Huh. Interesting.

I think the reason this doesn't exist already is that you can't be certain of what data will survive and what won't. It tends to be all or nothing, and I think companies would prefer it that way. 

For example, say I have a "betterRAID" array with 4TB of client files on it. And every file is important. If a drive should fail, I've increased the chance of losing something for lowering the chance of losing everything.

I'm pretty sure most companies aren't cool with losing anything. If they've bothered to put this much effort into backing up their data, they're probably only backing up things they can't afford to lose, which means increasing a chance of losing anything is a bad thing.

For consumers though, this might actually be interesting. People tend to use RAID 5 and such to backup things they can lose but don't want to be bothered in losing, i.e. media or things like that. 

However, I think the whole idea of this "betterRAID" is not for consumers either. The number of drives you use as examples is what I mean by this. The more drives you add, the better the chances are of not losing everything and the worse the chances are of losing something. 

The problem with that is it being expensive to buy multiple and many drives. Plus, considering that as you add drives (which would probably be consumer drives), your chances of any 1 of them failing goes up considerably, I don't think it's a good solution. It's sort of self defeating in that sense. You raise your chances of losing some data (i.e. more drives = greater chance of a failure) in order to raise your chances of losing some data (i.e. more drives = lesser chance of total loss but greater chance of partial loss).

Sure, I could get lots of cheap 1TB or 500GB drives, but that also creates more maintenance overhead due to drive failures and redownloading (or whatever) what you keep losing. 

It sounds like it creates more work for little benefit to 90% of consumers and it seems not of much use to businesses. 

Enthusiasts might like it, but I wouldn't call it "betterRAID". I'd call it "otherRAID" as the positives and negatives balance out, I think.

Still, good idea nonetheless. I enjoyed reading it and I'm glad people are still trying to think of better, safer, ways to store data.  

Supplemental idea: What would come of mixing traditional Parity RAID and this idea for RAID? Or, better yet, RAID 1 + this. Now that sounds interesting.

You could have the RAID 1 to prevent partial data loss and this RAID for "If everything else fails, we still have something." Which is better than nothing.

The problem with that is the obvious issue of resources. That literally doubles the required drives for no storage increase, so odds are, only businesses would use that (and extreme enthusiasts like Looney or us). 

Link to comment
Link to post

Huh. Interesting.

I think the reason this doesn't exist already is that you can't be certain of what data will survive and what won't. It tends to be all or nothing, and I think companies would prefer it that way.

It does exist on some SAN solutions like Dell Compellent (page 18), which I'm still learning more about. However, they tend to be ones where a single RAID pool could be many dozens of devices.

 

In Compellent's case, you only have two fixed options, RAID 5-5 (RAID 5 across 5 segments) or RAID 5-9 (RAID 5 across 9 segments), rather than being able to choose how many segments.

 

I agree, it's not very optimal for consumers, but it's very flexible.

 

I'd also like to see the ability to have quad-parity or more (we choose), regardless of the performance impact. More choice is good.

Link to comment
Link to post
×