How to do the equivalent of Synology Hybrid Raid on Linux myself?

http://forum.synology.com/wiki/index.php/What_is_Synology_Hybrid_RAID%3F

Synology is just Linux and uses LVM.

How do their tools automate LVM to achieve what they call their Hybrid Raid?


Solution 1:

It looks like the system splits up each drive into as many partitions as needed to create a series of RAID5 and/or RAID1 arrays that minimize the amount of unused space on the drives. Those RAID arrays then become physical volumes under LVM, which, in turn, presents all that storage as a single logical volume.

Current versions of mdadm do allow you to add devices to RAID5 arrays and to reshape RAID1's into RAID5's, so it is possible to add disks to this thing to grow the available storage "on the fly". Adding a new disk would be a matter of creating the appropriate partitions on the disk, and then adding its partitions to existing RAID5's and/or RAID1's, or creating new RAID1's with unused space from other disks. You can also increase your storage space by replacing a smaller disk with a larger one. I haven't thought too deeply about all the possible corner cases, but I imagine there will be a number of them.

Presumably, Synology has automated all this with their own custom programming, but I don't see why it couldn't be set up manually. Perhaps someone out there has already come up with the equivalent scripts? (I don't know.)

Keep in mind that this thing's failure mode is going to be just like RAID5: If a single drive fails, and then another one fails during the resync, bye-bye data. So I wouldn't use this configuration with more than, say, 5 or 6 drives, at the very most.

Solution 2:

True in the past. However, as of Synology DSM 3.1, Synology Hybrid RAID will now have the ability for two redundant drives. This makes the Synology solution much more appealing to me, since I prefer to reuse older, excellent drives over buying four to six new drives every few years. This also allows for expansion by removing the smaller drives and replacing them with larger drives in the future. I find the technology highly compelling.