Can I set up a RAID 5 with a bunch of drives of different sizes?

31

7

I currently have 3 1TB drives, a couple 500GB ones and some 750GB ones. Can I put them all in a RAID 5 configuration or do they need to be of same size?

n0pe

Posted 2012-01-19T12:54:49.307

Reputation: 14 506

This should work fine, you would just be limited to about (n - 1) x 500GB of usable space in total, where n is the total number of drives. – sblair – 2012-01-19T13:09:32.313

1not exactly. If you put 2 x 500gb partitions on the 1TB drives, youll end up with more than n-1 x 500. – Sirex – 2012-01-19T13:13:23.630

6Never split up one drive into multiple parts, only combine separate drives into one larger group. In the case of @Sirex, if the 1TB drive fails your RAID5 cannot be recovered (two 'disks' lost at once). – parasietje – 2014-01-22T11:17:29.830

1sure. I probably should have mentioned it being a terrible idea, 'twas more to illustrate a flaw in the math. – Sirex – 2014-01-22T18:54:41.530

Answers

21

There are a couple of methods to do this.

1) Use every drive as a separate node in the RAID-5 array. Only 500GB is used in every disk, the other space is wasted. This is typically the only option in a hardware raid controller.

2) Use a software RAID system combined with a logical volume system like Linux LVM. Using LVM, you can create a virtual drive of 1TB by combining two 500GB drives. This virtual drive can serve as a single drive in your RAID-5 array. Once one of these drives fails, the whole virtual drive is considered faulty. So please note you will need 3 virtual disks of the same size.

3) Use a RAID system that allows redundant storage on non-equal volumes. ZFS is a good example of this.

parasietje

Posted 2012-01-19T12:54:49.307

Reputation: 606

2

It depends on the RAID controller (hardware or software) that you are using. Some will allow different sizes & types of drives while others require identical drives (not just size, but spin rate, throughput, etc). Some of the controllers that will allow you use different sizes will force you to the least common denominator. In your case, that kind of controller would find you with 5 500GB drives set up, which may or may not allow you to access the remaining space on those larger drives separately.

Unfortunately, the only answer will be to investigate various RAID controllers, starting with whatever you might have built in to your OS or motherboard and see if you can determine what configurations they will allow. After that, you might research other controllers that are available.

BBlake

Posted 2012-01-19T12:54:49.307

Reputation: 5 120

I'm actually planning on using a software raid on CentOS or maybe even use FreeNAS. It's for a home server. – n0pe – 2012-01-19T13:29:07.237