How To's

Install Ubuntu on a Software RAID Array

9,171 views · 3 found this helpful

Was this helpful?

Problem

Install Ubuntu on a software RAID array and deal with encounter the "Unable to install GRUB in /dev/sdb" error.

tl;dr

Ubuntu requires manual partitioning for the software RAID array. It also requires a separate partition on each disk (minimum size = 200 MB) set aside for the boot loader.
When you get to "Disk Partitioning" portion of the installation, set up your partitions on each disk as follows (assuming you want a 16 GB swap partition):

SCSI5 (0,0,0) (sda) - 3.0TB disk
#1 primary 199.1 MB K biosgrub
#2 primary 16.0 GB K raid
#3 primary 2.7 TB K raid
SCSI6 (0,0,0) (sdb) - 3.0TB disk
#1 primary 199.1 MB K biosgrub
#2 primary 16.0 GB K raid
#3 primary 2.7 TB K raid

Then, select "Configure software RAID" and add a RAID device for swap and / (root) on their respective partitions.

Solution

If you need to set up RAID on GPT disks (larger than 2+TB), you must create a GRUB bootloader partition on each disk.

Disk configuration

For Partitioning Method, select Manual

Erase partitioning table from each disk

First, you need to erase partitioning table from each disk. Navigate to each SCSI device, hit Enter and then select Yes when prompted "Create new empty partition table on this device."

Create GRUB partition on each disk

1. Navigate to FREE SPACE for each SCSI device (hard disk).
2. Select "Create a new partition"
3. Type in 200 and hit Enter. Default units are MB.
4. Select "Beginning"
5. Navigate down to "Use as:" and select "Reserved BIOS boot area" (Ubuntu 14.04), or a variation thereof, such as "GRUB Partition"
6. Select Done setting up the partition

Repeat these for each disk in your RAID array.

Create partitions for swap and /

Follow the same steps as above to create RAID partitions:

1. Navigate to FREE SPACE
2. Select "Create a new partition"
3. Type in 16000 (or "16 gb") assuming you want a 16 GB swap partition and hit Enter.
4. Select "Beginning"
5. Navigate down to "Use as:" and select "physical volume for RAID"
6. Select Done setting up the partition

When you've created swap partitions, follow the same steps above except do not enter partition size. It will automatically fill up the rest of the disk. Do this on each disk in your RAID array.

Create RAID devices

Scroll up in the "Partition Disks" menu and select "Configure software RAID." The screen will prompt you to write changes to disks. Select yes, and then configure RAID:

1. Select "Create MD device"
2. Select your RAID type. Assuming it's RAID 1, then scroll down to select RAID 1.
3. Hit Enter to confirm number of active devices
4. Hit Enter to confirm number of spare devices.
5. Choose matching partitions for each RAID device. For example, for your swap partition, you would choose the /dev/sda2 (16000MB; raid) and /dev/sdb2 (16000MB; raid) and then hit Continue.
6. When you have created both RAID devices, select "Finish".

Mount both RAID devices

Scroll down to "RAID1 device #0 - 16 GB" partition #1. Go up to "Use as:" and select "swap area".

Do the same for RAID1 device #1 - 2.7 TB" partition #1, and set "Use as:" to "Ext4 journaling file system". Set Mount point to / (the root file system).

Finish partitioning

Finally, navigate down to "Finish partitioning and write changes to disk." Confirm that yes, you want to write changes to disks. From this point on, Ubuntu installation will proceed as normal.

  • Updated

← All articles

Still stuck?

Our engineers answer tickets directly, 24/7.