0

I'm trying to install Ubuntu Server (15.04) on a 2012 Mac mini with two 240GB SSDs. I recognize that Macs can be tricky with EFI v. BIOS, but that's another issue. I'd like to install Ubuntu Server on these two SSDs in RAID 0, but I'm unclear on what the partitions should look like.

From Googling, I know that each SSD should have identical partitions (size and name/function). So I set up each to have a 500MB EFI Partition System (EPS)partition, then a 4-8GB swap partition, and finally the rest goes to / as an Ext4 file system. I've read that GRUB cannot be installed on a RAID array, so I leave the 500MB partitions out of RAID, and pair the swap and / individually as RAID 0.

Alternatively, I've read that I should be using LVM for creating a logical volume group... out of the swap RAID and / RAID arrays?

Any insight would be greatly appreciated!

0

LVM offers features very similar to RAID 0, and is more flexible -- it's easier to combine two disks of different sizes with LVM than with RAID 0, for instance. I also happen to be more familiar with Linux's LVM than with Linux's software RAID, so that's what I'd use in your case. Somebody who's more familiar with RAID might make the other choice, and that's fine; for your purposes, chances are either will work equally well, provided you don't need to make changes in the future.

I believe the Ubuntu setup tool has an option to use LVM, but I'm only passingly familiar with that path through the installer. It's also got a known bug that creates a /boot partition that's too small. The Ubuntu LVM wiki entry should help you get started with LVM. In brief, you'll create a /boot partition (I recommend making it at least 500MiB) on one disk and at least one LVM partition on each disk. You can then link them together and create whatever logical volumes you want to span the disks. You can stripe logical volumes across disks to improve performance, if you like.

An EFI System Partition (ESP) will also be necessary if you install Ubuntu in EFI mode. This may not be optimal for a Mac, though; ironically, it's easier to install Ubuntu in BIOS mode on Macs, at least for single-boot systems. The reason is that managing EFI boot loaders on Macs is best done using the bless utility in OS X. The standard Ubuntu tool for this task, efibootmgr, doesn't always work quite right on Macs -- although I've seen indications that it's working better in such configurations than it did a few years ago. If you do a BIOS-mode install, you must use the older Master Boot Record (MBR) partitioning system; this signals to the Mac firmware that it should activate its BIOS (aka legacy) boot support.

If you go with a RAID setup, it will be similar, with a separate (non-RAID) /boot partition and (if you do an EFI installation) an ESP. If your disks are identical in size, I'd put one of these on each disk and make them identical in size; that will enable you to make your other partitions identical in size, for no lost disk space.

Note that GRUB can, in theory, read kernels from RAID or LVM setups, so in theory you don't need a separate /boot partition; however, when using LVM or RAID, every distribution I know of sets up a separate /boot partition. I don't know if the distribution maintainers know of a bug or complications, but at the very least, this means that GRUB's ability to read kernels from within an LVM or RAID is relatively untested. Also, most non-GRUB tools can't read from within an LVM or RAID, so if you don't create a separate /boot partition, you'll be tying your hands when it comes to boot loaders.

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.