1

I have a server I would like to use explicitly for running virtual machines under Ubuntu Server 12.04. It has plenty of RAM, 64GB and three large identical HDD´s. I would like redundancy through software.

How would you recommend I set it up storage?

4
  • I added an answer myself, too see if I can get a better one.
    – Deleted
    Sep 12, 2012 at 20:04
  • Do you plan on adding a second server? You might want to look at something like Ganeti. Ganeti allows you to have redundancy without a SAN.
    – Zoredache
    Sep 12, 2012 at 21:00
  • You seem to be primarily asking about storage setup right? Or at least that is what you included in your answer. You might want to adjust your question so that your 'answer' is actually an answer to the question.
    – Zoredache
    Sep 12, 2012 at 21:07
  • @Zoredache: Thanks! You are completely correct. I changed the question. And I do not plan on adding another server or any other additional hardware in the foreseeable future. I´ll still check it out to learn what it is. :-)
    – Deleted
    Sep 13, 2012 at 9:43

1 Answer 1

0

Thought process:

  • Software RAID is fast enough, with the added advantage of zero hardware dependency.
  • RAID 1 is faster and more trustworthy than RAID 5.
  • RAID 10 requires an additional drive.
  • Ext4 was picked as it´s popular and has little if any less performance then XFS, JFS et. al.
  • The swap area is located last, in the slowest part of the HDDs. I first thought I would skip swap altogether, but decided it could be nice to have and HDD space is cheap. At the same time, I´ll turn down swapiness and expect very little swapping. Thus making it all right to put last on the HDDs.

Follow these steps: (Tested in a VM)

  1. Partitioning method: Manual
  2. Select each HDD and create an empty partition on them.
  3. Select the FREE SPACE on each HDD and create a new primary partition taking up the entire disk minus RAM + 1MB (which is left for a swap area), used as a physical volume for RAID with the bootable flag on.
  4. Select the FREE SPACE on each HDD and create a new primary partition taking up the rest of the disk (RAM + 1MB), used as a physical volume for RAID with the bootable flag off.
  5. Configure software RAID
  6. Create an MD device with RAID1 as Software RAID device type. Set the number of active devices for the RAID1 array to 2 and the number of spare devices for the RAID1 array to 1. Select the first two devices of equal size not intended for a swap area as active in the RAID1 array and the last one (of equal size to the first two) as a spare.
  7. Create an MD device with RAID1 as Software RAID device type. Set the number of active devices for the RAID1 array to 2 and the number of spare devices for the RAID1 array to 1. Select the first two devices of equal size intended for a swap area as active in the RAID1 array and the last one (of equal size to the first two) as a spare.
  8. Finish the software RAID configuration.
  9. Select the #1 slot under RAID1 device #0 (you may have a small slot which is marked as unusable, don´t mind it). Use as Ext4 journaling file system with mount point set to / and typical usage set to largefile4.
  10. Select the #1 slot under RAID1 device #1 (you may have a small slot which is marked as unusable, don´t mind it). Use as swap area.
  11. Finish partitioning and write changes to disks.
  12. Answer Yes to the question if you want to boot the system if your RAID becomes degraded.
3
  • 1
    The software Linux RAID10 does support having 3 drives. The Linux RAID10 isn't a 'standard' RAID10, and allows a lot of flexibility. You should almost certainly not be creating one big filesystem, instead you should be setting up LVM, and then creating a logical volume per VM. The exact details depend on what hypervisor you will be using.
    – Zoredache
    Sep 12, 2012 at 21:03
  • I´ll check out software RAID10, I didn´t think it was an option. LVM is nice, but I haven´t managed to get it working using software RAID. As I only will be using this setup for running virtual machines which I´ll setup myself, I don´t think running out of space due to one VM consuming too much space is a problem I want to fix when weighing it against the necessary work.
    – Deleted
    Sep 13, 2012 at 9:48
  • @Zoredache Since I only have three disks and a RAID10 array can not be grown later on anyway I`ll stick with RAID1. I did get it working with encryption and LVM now, which I think is pretty ideal. I´ll provide another answer for it. Thanks for nudging me to give LVM in RAID another try. I must have messed something up earlier when I didn´t get it working.
    – Deleted
    Sep 13, 2012 at 15:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .