I currently run a small home media server on a Windows machine. I'd like to swap it to a small compute stick of some sort running a thin linux distro.

However, the reason I chose Windows to begin with was because of the Storage Spaces feature. Many will say "it's just LVM" but from what I've read on the features of LVM, it's lacking at least this feature I want:

Slices of data and that store a parity slice on some drive other than the 2 drives they're stored on for data access. This effectively allows me to mix-and-match drives of different sizes/types any-which-way I want and still have at least a parity backup of my data. This being just a media server, I don't really care about whether raid 10 levels of resilience or how fast the storage really is (so long as I can stream a 4k compressed video off it reliably via the single USB 3 connection to the external enclosure with multiple drives, I'm good).

What I care about is that if I add another drive to my pool, I don't have to add 3 identical drives. This is true of Storage Spaces since it'll find some way to distribute the 256MB slices+parity across many drives.

Is there any such feature in Linux? From what I've read, LVM can't really do this.

  • What did you end up doing? I'm also a fan of Windows Storage Spaces but I need the performance of ext4 Jan 6 '18 at 5:05
  • I stuck with Windows. I realize I don't change my configuration often enough that I can use LVM. But I've been too lazy.
    – jkang
    Jan 7 '18 at 7:09

You seem to be asking for a software RAID solution. There's two ways you can do this:

First, you can use RAID and LVM separately. You configure software RAID on Linux with mdadm. You'll want to create a RAID array across all of your drives, and then create your LVM setup on top of the RAID array. See https://raid.wiki.kernel.org/index.php/RAID_setup for more details on this solution.

Second, LVM does actually have some mirroring support. You can get what's effectively RAID 1 by passing -m1 when you do lvcreate. https://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/LV_create.html#mirror_create explains this in a bit more detail.

If you're wondering about the pros and cons of each of these approaches, see RAIDing with LVM vs MDRAID - pros and cons?.

  • 1
    Thanks for the answer. Storage Spaces in Windows is a software RAID but it does so somewhat differently than hard-partitioned RAID volumes. Rather, it makes data slices and backs them up on different physical volumes for redundancy. This allows RAID with any number of drives and different drive sizes as well as the ability to add or remove drives of any size and still have it be backed up. I suppose I could manually create smaller partitions (say 1GB each) and manually configure the individual RAID5 configs every time I add or remove a drive but....that's kinda cumbersome.
    – jkang
    Mar 13 '17 at 23:04
  • LVM's built-in mirroring doesn't do chunks, but it sounds like what you want as far as not worrying about sizes. Mar 13 '17 at 23:30
  • Also Windows Storage spaces logically maps multiple drives together to appear as one disk. This virtual disk could be RAID 0. For example I have a 10TB storage space in windows from 10 different drives with no redundancy. Feb 15 '18 at 2:38

Im also looking for something for linux since i am using a windows server evaluation. storage spaces is actually awesome. im running a Dell tower server which a perc h710 card that was reflashed into IT mode so i can use the raid card as an HBA and still provides some performance of hardware raid to the storage spaces management/control layer. does LVM take advantage of HBAs?

New contributor
daniel is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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