1

I have a stable Ubuntu (14.04.3) Server-powered file server that I have set up, and want to set up a RAID10 array for it. For reference, I have been following this guide so far, but using RAID10 instead of RAID1.

My main goal is to make the system able to boot even if the bios_grub RAID devcice becomes degraded / a drive fails / etc.

I have 4 identical drives, with only one in use currently (/dev/sda). It has the following partition table:

Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  2097kB  1049kB                        bios_grub
 2      2097kB  2984GB  2984GB  ext4
 3      2984GB  3001GB  16.9GB  linux-swap(v1)

Identical drives sdb, sdc, and sdd have had the partition table of sda copied to each of them, using sgdisk. I am now at the point of assembling my RAID devices.

I want to create:

  1. /dev/md0, consisting of /dev/sda1, /dev/sdb1, /dev/sdc1, and /dev/sdd1
  2. /dev/md1, consisting of /dev/sda2, /dev/sdb2, /dev/sdc2, and /dev/sdd2
  3. /dev/md2, consisting of /dev/sda3, /dev/sdb3, /dev/sdc3, and /dev/sdd3

with all /mdX being of type RAID10. /dev/md1 and /dev/md2 will be created using:

sudo mdadm --create   /dev/mdX --chunk=256 --level=10 -p f2 --raid-devices=3 /dev/sdaX /dev/sdbX /dev/sdcX /dev/sddX

From what I've gathered, my /dev/md0 array should be created using:

sudo mdadm --create -e 0.90 /dev/md0 --chunk=256 --level=10 -p f2 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1  /dev/sdd1

using the v0.90 metadata, for better compatibility with GRUB.

I know that I need to create filesystems for each /mdX, before I can mount them, or try to reboot. The swap device should be done using:

sudo mkswap /dev/md2

and the main storage device (/md1) should be done using

sudo mkfs.ext4 /dev/md1

My question(s) are these:

  1. What "filesystem" do I need to create for /dev/md0, or do I even need to do anything else? Most guides I see use a separate /boot partition, but I just have my bios_grub partition.
  2. What else do I need to do to install GRUB correctly, so that the system can boot from any of the drives? If a drive fails or is physically removed from the machine, I still want the system to be able to boot.

I know I still need to edit my /etc/mtab and /etc/fstab files, but want to get the correct GRUB setup before proceeding with creating these arrays (ie, while I know my system will still boot!)

Thanks for the help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.