Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

To quote the Wikipedia article on RAID:

A RAID 0 can be created with disks of differing sizes, but the storage space added to the array by each disk is limited to the size of the smallest disk. For example, if a 100 GB disk is striped together with a 350 GB disk, the size of the array will be 200 GB (100 GB × 2).

The article doesn't, however, state why it can't RAID them together and use up the entire disk space. I understand that the striping writes between the two, but surely it shouldn't prevent writing to the later sectors of the second disk, whilst running in degraded performance? Is there an alternative RAID system (e.g. software RAID) that offers such a feature?

share|improve this question
Im not sure if this would work with some hardware raids but with software raids, In order to take advantage of some aspects of raid 0 while using more of available space on two dissimilar sized drives like one 100GB and one 350GB you you might try creating 3 100GB partitions on the larger drive, and stripe the 100KB partition on the first and the 3 100GB partitions on the second drive. Raid level 0 will give you 400 gigs to use while providing some read/write performance increase, but it would probably be less than if you striped two 200GB drives. – Keith Reynolds Jul 7 '15 at 18:46
Normally you would not want to do this, For demonstration purposes I set up a RAID0 using one 1G and 16G flash drives. I made an extended partitions filling up each disk. Then I made a 981MB partitions on each drive until they were full. Then I made a raid using the 16 partitions with the command on linux mdadm --create --verbose /dev/md0 --chunk=512 -l0 -n16 /dev/sdd5 /dev/sde5 /dev/sde6 /dev/sde7 /dev/sde8 /dev/sde9 /dev/sde10 /dev/sde11 /dev/sde12 /dev/sde13 /dev/sde14 /dev/sde15 /dev/sde16 /dev/sde17 /dev/sde18 /dev/sde19. I ended up with less space than had I just used the 16GB drive – Keith Reynolds Jul 7 '15 at 19:15
up vote 2 down vote accepted

The reason for size being limited to the size of the smallest disk has to do with the fact that stripes are written "alternately" and must be the same size.

In a two disk system, all odd stripes are on one disk, the even ones on the other. Writes alternate between disks, odd/even/odd/even/...

Since stripes must be the same size, and paired (for two disks), you are limited to a maximum usable space of 2 * (size of smallest disk).

share|improve this answer

You can use the remaining space. You can create a volume using the remaining space, or even use it as part of another RAID. However, using this extra space will degrade the performance that RAID 0 gives you, since two different processes might be trying to access the same physical controller and disk.

Why cant you add this extra space to the original RAID? Well, without going into to much detail, its because of the algorithms RAIDs use. RAID 0 writes to the first disk in the RAID then the next. This increases performance, as it doesnt have to wait for the previous disk to finish reading or writing. If the 250 GB in your post was used, the majority of the write would be to the first disk, pretty much eliminating any performance gain.

RAID might not be the solution you are looking for, if you want to use all the space of the drives you should be spanning volumes. Spanning lets you take many volumes and concatenate them together in one big volume. Spanning offers no performance increase or redundancy.

share|improve this answer
This doesn't explain why it can't use all of the two drives in one volume. Also, the separate volumes part won't cause a performance issue at all - the disk IO control at the low level is handled by interrupts via disk.sys, so the read / write requests are pipelined anyway, and Windows supports overlapped IO too. – Polynomial Jul 4 '13 at 18:05
Ok, you update still didn't explain it. I'm familiar with how striping works, but that doesn't explain why it can't just drop to single-disk mode (with standard single-disk performance) once the smaller disk is full. Thanks for mentioning volume spanning though - that looks useful. – Polynomial Jul 4 '13 at 18:09
Because thats how RAID works. If you really wanted to, you could RAID 0 what you could, then create a volume with the free space, then span the RAID and the extra volume. But I dont think any RAID controllers will let you do that. You may be able to do that with a combination of hardware and software RAID. – Keltari Jul 4 '13 at 18:17
-1 "This increases performance, as it doesnt have to wait for the previous disk to finish reading or writing" the same could be said for two hard disks of different sizes in RAID 0 – Celeritas Jul 4 '13 at 18:41
@Polynomial That wouldn't be RAID 0. You asked why RAID 0 can't use all the disk space and then you respond "why can't it just ...". It can't because it's RAID 0. If it did something else, it would be something else. – David Schwartz Oct 7 '14 at 21:53

RAID is a pseudo standard that describes how data can be stored on an array of disks. The standard describes four different ways to store data (technically more, but mostly nobody cares about the others):

Raid-0: Striping. Each block of data is split across each member of the RAID device. No redundancy, so it is more of just an Array of Inexpensive Disks, not Redundant array of inexpensive disk.

Raid-1: Mirroring. Each block of data is stored on every disk in the array. This only really makes since with two disks. RAID 1/0 or just RAID 10 is a combination of mirroring and striping and can be used to take advantage of more than two disks.

Raid-5: Parity. Each block of data is split across each member of the RAID device + one disk is dedicated to parity.

Raid-6: Double Parity: Same as Raid-5, but with two parity disks.

That's it. Raid doesn't describe what to do about size mis-matches or anything, but striping only really works with equally sized disks. Typically the way to get around this is that you could use the left over space as a separate disk drive.

Stepping away from RAID as a way of creating a large disk array, you can use things like ZFS and just add disks to a storage pool. ZFS would always try to use both disks as efficiently as possible, and you could tell ZFS what level of redundancy you are happy with.

Prior technologies are things like volume mapping (i.e. LVM, or it's windows equivalent), which abstract the idea of mapping blocks to disk to a higher level. With LVM you can span across disks, expand partitions, have non-contiguous partitions and so on. Volume mapping is not RAID, and rather than increasing performance as you increase disks it just will randomly pick to write to one disk or the other depending on where you are in the file system. This is referred to as spanning and is typically better than RAID if you are going for IOPS rather then raw performance.

share|improve this answer
A RAID 0 can be created with disks of differing sizes, but the storage
space added to the array by each disk is limited to the size of the
smallest disk.

This can be true and will be true for most RAID0 implementations. However not for all.

There are two reasons for using RAID 0:

  1. Concattenate multiple disks into one big volume.
  2. Performance.

Option 2 is the most common and I think it is used in almost all current RAID 0 implementations. The techinical explanation is that information is written alternating between disk.

IN a non technical way: think of the disks as two books. These books have limited access (read/write) speeds. So rather then two 100 page books we reformat them into two books but renumber the pages so that all even numbers are written in one book and all odd numbers in the other book.

Now our new 'R0 book' behaves are if it a single book with twice the number of pages and twice the speed.

Option 1 can be as simple as 'glue to books back to back'. In which case you have no speed gain but you can glue books with different page count. I seem to recall some 'RAID0' implementations like that around 1990. But it is not what most people would consider 'proper RAID 0'.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .