Is it possible to use Linux software raid with different sized hard drives? What will happen?



Yes it is possible. Linux software raid works at the partition level not disk level.

Yyou have to use partitions with the same size on both disks wasting space on the larger disk.

From a theoretical point of view you could even use multiple partitions from the same disk but this is not recommended and it will decrease the reliability.

| improve this answer | |
  • 1
    You don't need to "waste" the space on the larger disk. You can still use it. It just won't have the RAID protection against failure. Also, using it will affect the performance of the RAIDed partitions. – Slartibartfast Nov 18 '10 at 5:06
  • That is right, what I meant by wasted is that it wouldn't we part of the array. You could use it as a swap partition for example. – rjlopes Nov 18 '10 at 14:50

yes, if you partition the disks to be the same size. Basically what'll happen is the usable area of each disk will equal the size of the smallest.

| improve this answer | |

You can do this, but the Linux md driver is going to only be able to use the space of the smallest drive on each drive. You can partition the larger drives with partitions equal to the smallest drive. You could even in theory create multiple partitions on a single disk and add them to the array. This is likely not what you want as with most RAID levels losing a disk with two partitions will result in data loss.

If you partition the disk you could use the space for other uses. Perhaps data you care less about. Of course this could impact performance.

This is the same as most hardware raid controllers. ZFS will have similar issues as well.

Using something like btrfs will have better results. Although you will still lose some space if one disk is larger than the rest of your disks. Also there is some debate about the stability of raid5.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.