Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So I've been looking Synology and their idea of Hybrid RAID to make mixed drive RAID arrays both fault tolerant and efficient.

So, I'm testing an idea (performance isn't a concern here), with a mixed array of

  • 2x 2TB
  • 1x 250GB

I was thinking that if they were partitioned into half the size of the lowest denomination - that combining RAID with LVM could yield a redundant FS spanning 3 disks (or more) efficiently.

|     250GB     |   |       2TB      |   |       2TB      |
|---------------|   |----------------|   |----------------|
| 125GB | 125GB |   | 1.87TB | 125GB |   | 1.87TB | 125GB |
| sda1  | sda2  |   | sdb1   | sdb2  |   | sdc1   | sdc2  |
    |       |           |       |            |        |
    |       |           |       |            |        |
    |-------|-----------|-------|            |        |
            |    0      |                    |        |
                 0      |       1            |
                 0      |-------1------------| 
                 0              1  2
                md0           md1  md2

md0 = 125GB  + 125GB
md1 = 125GB  + 125GB
md2 = 1875GB + 1875GB

    = 2125GB Spanned RAID1 storage

So then, create a volume group on LVM comprising of physical volumes md0, md1 and md2 - then just create logical volumes on top.

In theory - this is completely fine - and I'm aware the'll be performance impacts (this isn't a concern).

So the next evolution is to be able to be add a disk of any size - and for it to do the maths automatically.

But where I'm hitting a small wall is how you would keep chopping up the primary disk partitions - on disks running active VG's

Ie. If you added a 500GB disk to the example above - it would require 2x 250GB partitions to be created on any of the other disks (or 2x 125 and 2x 250 - but lets not get into complications),

Its not like you can fdisk a running LVM volume group, take a 1875GB primary partition, then create a 1625GB and 250GB partition, set up the RAID array, then add them back to the existing volume group.

share|improve this question
Disks are cheap. Lost data (or time or both) is expensive. Why do you even consider creating such a complicated setup? –  SvW May 18 '13 at 14:59
Because I wanted to see how possible it would be to DIY replicate the Synology Hybrid RAID - seemed like an interesting project to tackle. –  choco-loo May 18 '13 at 15:25
Might be an interesting project for a hobbyists who doesn't care about his data, but not for a pro admin who wants to maintain his systems as reliable as possible. If you are a hobbyists, that's OK, but you would be on the wrong site - SF is for pro admins only (FAQ). –  SvW May 18 '13 at 15:28
You've completely mis-understood the point. This isn't a "risky project" - its a means to make a highly scalabale RAID1, based LVM vg. Where data integrity is paramount - but being able to scale across disk sizes is important (ie. what if you add a new disk to increase overall capacity). If you don't want to answer, then don't - your comments are not contributory. The underlying question is asking how to resize physical partitions without interrupting LVM. –  choco-loo May 18 '13 at 15:45
This doesn't seem like rocket science. Buzzwords-aside, you can use LVM to tie together any number of mirrored pairs. It seems like there are huge downsides to this approach and not really much upside. If you're in North America, hard drives are cheap and labor is expensive, so business-wise, not a very good solution. –  evilensky May 22 '13 at 13:58

2 Answers 2

There doesn't seem to be an actual question, but here are some thoughts:

  • This is only worthwhile if your time is valueless; otherwise, just buy another 2 TB hard disk, make them a 3-drive RAID 5 set and quit messing about.
  • If it were possible to grow software RAID 10 volumes under Linux, that would solve your issue, since you could just add the drive and it would sort it out. Unfortunately this doesn't seem to be the case (at least on the mdadm & md version on my system). But if you didn't care about growing the array, RAID 10 is definitely a better answer than your setup above.
  • And finally, there isn't really any way to add the 500 GB drive you mention without a lot of manual data movement. To accomplish it you could (but i wouldn't):
    • create 2 x 125 and 1 x 250 on the new drive (let's assume they're sdd1-3)
    • move sda1 to sdd1: add sdd1 to md0; change number of copies to 3; wait for resync; remove sda1 from md0; change number of copies to 2
    • repeat for sda2 -> sdd2 (md1)
    • remove sda2, resize sda1 to 250 GB
    • create md3 from sda1 and sdd3
    • add md3 to your volume group

Hope that makes sense.

Side note:

  • Dear HP, AutoRAID arrays were the best thing since sliced bread. Bring them back.
share|improve this answer

RAID-1 means you waste space and md0 is actually only 125G (as well as md1). There's nothing special in the schema you running around — you could have RAID-5 on sda and parts of sdb, sdc (or have RAID-10 on it, since Linux Software RAID can do this for you on odd number of disks); and the rest of sdb, sdc have as RAID-1, actually.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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