Linux – Best redundant way to set up multiple drives of different sizes

hard drivelinuxlvmmdadm

I have a linux server (running Ubuntu 12.04 Server currently) that I need to set up multiple hard drives of differing sizes in primarily for media/backup purposes.

The sizes are:

  • 1x2TB
  • 1x1TB
  • 2x500GB
  • 2x3TB

And I'll probably add more at some later date.

I've set up quite a few servers in the past running software RAID1 across only two disks, which works well, but they were always the same size and couldn't be expanded anyway, so RAID1 was the right option.

Here I have been reading up on LVM and/or LVM2, and from what I can tell I have quite a few options, some of which I can think of are:

  1. put RAID1 at lowest level, partition 2TB drive to 1x1TB, 2x500GB partitions
    • mirror the 2x3TB together /dev/md0
    • mirror 1TB and 1TB partition on 2TB drive /dev/md1
    • mirror 500GB and 500GB partition on 2TB drive /dev/md2
    • mirror 500GB and 500GB partition on 2TB drive /dev/md3
    • I can then:
      1. use LVM to combine /dev/md* to a single volume and put my filesystem on that
      2. format and mount them all separately, then use unionfs-fuse to present a single 'view' of them
  2. LVM(2?) group all the drives with mirroring enabled (not actually sure how to do this)
  3. LVM group the smaller ones and put RAID1 over top of it (I've seen people say mdadm over LVM isn't advised, but no reasons why)
  4. RAID0 the smaller ones and put RAID1 over top of that

For a filesystem I'd probably go with ext4 by default, unless there is a reason to go with something else.

Can anyone give me some ideas or pointers in the right direction? Thanks!

Best Answer

I'd try to get drives of the right or similar sizes... Why complicate things?

What is your actual storage requirement? If it's less than 3TB, then a mirror of 3TB disks is the path of least-resistance.

Related Topic