1

I am preparing for a minimal Ubuntu Server 12.04 LTS that will simply run libvirt/KVM to host a handful of Ubuntu Server 12.04 LTS guests. On my KVM host I created a RAID 1 comprised of two physical disks. With the resulting volume I used LVM to create space for the root filesystem, swap, and a sizable partition for /var (as this is where my KVM guests will live.)

  • Is it advisable to install the boot volume on a LVM volume that resides on a software RAID?
  • What are best practices?
  • What should be taken into consideration when configuring LVM on a software RAID?
  • All I can provide is opinion, I use LVM volumes directly in my KVM host for guest disks. – caskey Feb 19 '14 at 2:38
0

mdraid and LVM2 are stable. Modern Linux distributions can boot this setup directly without any issues.

There aren't too many special considerations.

You will want to ensure grub is installed on each individual disk so that the system can still boot in the event of a disk failure.

You may want to leave some of the volume group free to take advantage of LVM snapshots.

  • Can you elaborate as to how one would install Grub on each individual disk? Wouldn't applying the RAID configuration and the LVM on top of it destroy anything on the disk? – sardean Feb 19 '14 at 2:49
  • 1
    If you created the RAID array through the Ubuntu installer you should already have grub installed on both members of the array. If that wasn't the case (and assuming you have two disks, /dev/sda and /dev/sdb) 'grub-install /dev/sdb' is generally all that would be necessary. Also see: unix.stackexchange.com/questions/25513/… – Mark Sturgill Feb 19 '14 at 3:02
  • Pardon my ignorance but with LVM on top of the RAID is this still applicable? /boot will reside on an LVM partition. Or is the LVM partitioning insignificant. – sardean Feb 19 '14 at 3:31
  • 1
    grub is typically installed to the MBR. mdraid and LVM aren't really a factor at this level. Your system needs to locate a bootloader (grub) to boot. You have two mirrored disks. If grub is only installed on one of the disks and that disk fails then you will be unable to boot the degraded array from the single remaining disk that does not have a bootloader installed. That being said, Ubuntu's 12.04 installer should have installed grub onto both disks of your RAID-1 array for you. – Mark Sturgill Feb 19 '14 at 3:38

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.