Can I create a hybrid software-RAID array with disks of different sizes?
I am wondering if I can acheive a similar "hybrid RAID" with Ubuntu? or another linux distro?
Yes, you can using a combination of LVM and software raid (md
).
I will begin by populating it with 3 X 3TB to give me 6TB usable.
OK, so you start with 3 disks in RAID 5 giving you 6 TB.
so at this stage I would add a 4th 4TB disk
On this, create TWO partitions - 3TB and 1TB. As you stated, this will initially give a 4-disk RAID5 with 9 TB of space.
When I next run out of space I will change one of the original 3TB disks with a 4TB disk giving me an additional 1TB of space.
Again, on this disk, create two partitions of 3TB and 1TB. Rebuild the RAID5 array onto the 1st partition. Then use mdadm
to create a RAID-1 array from the two 1TB partitions on disks 3 and 4. Add this array to your logical volume, and voila! you have 10 TB of redundant storage.
Rinse and repeat :)
Related videos on Youtube
stueng
Updated on September 18, 2022Comments
-
stueng over 1 year
Products such as Synology offer something called Synology Hybrid RAID
http://www.synology.com/us/products/features/RAID.php
This RAID type allows you to make best use of your disks available by using all the disk space available as long as at least two disks share the same increased size where a typical RAID setup would simply "throw away" the extra space
I would like to build a NAS with 4 disks available. I will begin by populating it with 3 X 3TB to give me 6TB usable. By the time I have filled this 6TB I imagine that 4TB disks will have come down in price, so at this stage I would add a 4th 4TB disk to give me an additional 3TB of space. When I next run out of space I will change one of the original 3TB disks with a 4TB disk giving me an additional 1TB of space.
This is not possible with a typical RAID configuration, only with these "hybrid RAID" types
I am wondering if I can acheive a similar "hybrid RAID" with Ubuntu? or another linux distro?
-
j0h about 9 yearsthe OS synology offers is an Open Source Project. Perhaps those tools are already built in. Or you could request support from your vendor, for the addition of features that would make their hardware more desirable.
-
-
stueng almost 12 yearsthanks, can I horizontally expand the RAID 1 array when I get a fouth 4TB disk into a second RAID 5 array?
-
BeowulfNode42 over 10 yearsyou can convert RAID 1 to 5 or 5 to 6 if needed with mdadm. Also, RAID 5 only needs 3 disks. You can also add an additional disk to increase the number of drives in a RAID 1/5/6 with mdadm, though extra drives in a raid 1 is simply another mirror, but for raid levels 5 and 6 they give you extra storage when you add the extra disk.
-
Felipe about 4 yearsGreat answer! I'm in a similar situation and will attempt to do this. Following up on the RAID 1 to 5 conversion, after upgrading one disk at a time to get to 4x4TB disks, is there a way instead of having two RAID5 arrays (4x3TB and 4x1TB) which I can combine with LVM for a total of 12TB, to just having one RAID5 array of 4x4TB without losing data?