I have a bunch of mismatched disks, configured in raid 5. The trick is to split the disk into uniform partitions and create the raid on those partitions. As long as no two partition from the same disk are in the same array, then you still have redundancy. I created the arrays initially with 6 disks, 2 120G (hda,b), 2 160G (hdc,d), a 200 (hde) and a 250 (hdf). So I picked 40G as the partition size and got:
3 200G raid 5 arrays (6-1 x 40G) md0, 1 and 2 from partitions 1, 2 and 3 from all drives
1 120G raid 5 array (4-1 x 40G) md3 from partition 4 of drives c-f
1 40G raid 1 array (2/2 x 40G) md4 from partition 5 of drives e and f
1 40G spare partition 6 of drive f
10G leftover (used for boot partition and swap space)
I added the 4 raid 5 arrays together using LVM to get a 720G volume group.
When I replace a disk, with a larger disk, I can swap around partitions between the raid arrays and create new space. For example, say a 120G drive (hda) dies and I replace it with a 300G.
300G = 7 partitions
hda1, 2 and 3 go into md0, 1 and 2 to replace the failed partitions from the old 120.
I now have enough partitions on separate drives to create a 5 partition raid to replace md3.
So, I create a new 5 partition (160G) raid array (md5) using the 4 remaining partitions in my new hda 4, 5, 6, 7 with the 6th partition from hdf (not redundant yet, that part comes later).
Now, I add md5 into the logical volume, and use pvmove to clear any used space in md3 (md5 has more than enough room to hold it).
Next, I extract md3 from the logical volume and stop it.
Now, I can start replacing the partitons in md5 with the ones that used to be in md3.
Similarly, I can create a new 3 drive array from hda, e and f, by replacing hde5 in md4 with hda5.
End Result:
hda 300, hdb 120, hdc 160, hdd 160, hde 200, hdf 250
3 200G raid 5 arrays (6-1) x 40G md0, 1 and 2 from partitions 1, 2 and 3 from all drives
1 160G raid 5 array (5-1) x 40G md5 from partition 4 of hda, c, d, e and partition 6 of hdf
1 80G raid 5 array (3-1) x 40G md6 from partitions hda6, hde5 and hdf4
1 40G raid 1 array (2/2 x 40G) md4 from partition 5 of drives a and f
1 40G spare partition hda7
10G leftover (used for boot partition and swap space)
It's a little work to add a new drive, but I don't have to waste the extra space on a drive, just because of my smallest drive.