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

15,095

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.

Share:
15,095

Related videos on Youtube

jrwren
Author by

jrwren

I work at Cisco Systems Inc. on Threatgrid. I worked at vivint.smart.home on streety. I previously was employed by Canonical USA and I work on Juju and things related to www.jujucharms.com. Before that, I worked at Arbor Networks on things related to ATLAS, which is now decommissioned. From 1998 to 2008, I wrote custom software solutions for integrating Windows and Unix. My blend of traditional system administration and custom software solutions has allowed numerous enterprises to transcend platform dependence. I have written software to manage specific applications deployed across hundreds of Unix servers and thousands of Windows servers remotely via a Web Management Interface. The system works without an agent utilizing standard Unix remote management protocols such as SSH. I've been an independent contractor working on Windows Forms applications for tuning embedded software control modules for a US auto manufacturer. I spend my free time writing more software, baking, and watching far too much television. Baking is great. I highly recommend growing your own yeast. All that is nice, but I should start at the beginning. I was born. I begged to be taught to read, but waited until formal school. Around age 6 - I’m not exactly sure when - I learned TRS-80 compatible basic on a Sharp 1500 (Radio Shack PC2) pocket computer. My parents encouraged this by borrowing a VIC20 from my uncle for a few months before purchasing the family an Atari 800XL for Christmas around the time I was 7 or 8. Atari 800XL was WAY better than Commodore 64 in the only area that mattered to me: BASIC. I had drawing primitives. LINE, CIRCLE and PAINT functions - or were they called subroutines - were available. I loved me some drawing. In 1987 around the time I turned 10, my family upgraded to a used Amiga 1000, with the 512K option. Thanks to the AmigaBasic 1.2 and 1.3 provided by Microsoft, I was now writing basic without line numbers. This was like QBasic or QuickBasic on a PC available years later. I struggled endless hours trying to make the North C compiler compile my hello world app. I never succeeded. Age 14 in 1990, Dad buys the family - me - my first “PC”, a 4

Updated on September 18, 2022

Comments

  • jrwren
    jrwren almost 2 years

    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?

    • Admin
      Admin about 11 years
      You can try using BTRFS, it supports dynamic subvolumes...
  • BeowulfNode42
    BeowulfNode42 over 10 years
    I think for SHR-2 they only use raid 6's though I do believe mdadm lets you also make a raid 1 with 3 disks to maintain 2 disk redundancy. Some insights can be garnered from using their raid calculator tool and putting in mixed sized disks. eg. put in 3x or 4x 2TB drives with 3x 3TB drives with SHR-2 and watch the unused space
  • BeowulfNode42
    BeowulfNode42 over 10 years
    there are lots of comments around the net saying "raid 1 is only for 2 disks" this is not true with mdadm so a 5 disk system made from 2x 2TB and 3x 3TB could be made with a RAID 6 taking 2TB from each disk and a RAID 1 with the last TB on each of the 3TB disks to give a total of 7TB of usable storage with 2 disk redundacy. Though that extra 1TB on each of the 3TB drives may be required for expanding the drives later with some combo I haven't thought of.