Install Ubuntu RAID 0 Array: Step-by-Step Guide
In this article
Setting up a RAID 0 array during Ubuntu installation combines two or more drives into a single faster volume, improving read/write speeds by splitting data across disks. This guide walks you through the process using the official Ubuntu installer. You'll need at least two identical drives (same size and speed is best), a backup of any existing data on those drives (RAID 0 has no redundancy), and a bootable Ubuntu USB or DVD. The steps below use the standard Ubuntu desktop installer; labels may differ slightly by version.
What You'll Need
- Two or more identical hard drives or SSDs (all data on them will be erased).
- A bootable Ubuntu installation media (USB drive or DVD).
- Backup of any important data from the drives you'll use.
- Basic understanding of partitioning and disk management.
Step-by-Step
- Back up your data. RAID 0 stripes data across disks with no fault tolerance. If either drive fails, all data is lost. Copy anything you need to external storage before proceeding.
- Boot from the Ubuntu installer. Insert your USB or DVD, restart your computer, and press the boot menu key (often F12, F2, or Esc) to select the installation media. Choose "Try Ubuntu" or "Install Ubuntu"—both work for this guide.
- Start the installer. Select your language, keyboard layout, and network preferences. When you reach the "Installation type" screen, choose "Something else" (manual partitioning). This gives you full control over creating the RAID array.
- Identify your drives. In the partitioning screen, you'll see a list of disks (e.g., /dev/sda, /dev/sdb). Note which ones you want to use for RAID 0. Make sure you don't select the drive containing the installer USB (usually /dev/sdb or /dev/sdc, but check sizes).
- Create a RAID 0 device. Click "New Partition Table..." on each drive you'll use (this wipes the drive). Then click "Configure RAID..." in the top-right corner. If the button is greyed out, close the installer and re-open it—this is a known quirk in some versions.
- Add drives to the RAID. In the RAID configuration window, click "Create MD device". Choose "RAID 0" as the type. Give it a name (e.g., md0). Select the two (or more) drives you want to include, then click "Create". The array will appear as a new device (e.g., /dev/md0).
- Partition the RAID device. Back in the main partitioning screen, select the new RAID device (e.g., /dev/md0) and click "New Partition Table...". Then click "New Partition" to create a partition. Choose a size (use the whole disk unless you plan to split it), set "Use as" to "Ext4 journaling file system" (or your preferred filesystem), and set the mount point to "/" (root). Click "OK".
- Set the bootloader. At the bottom of the partitioning screen, confirm that the "Device for boot loader installation" is set to the first drive of your RAID array (e.g., /dev/sda). If you're using a UEFI system, you may need a separate EFI system partition—see the Troubleshooting section below.
- Finish partitioning. Click "Install Now". Confirm the changes when prompted. The installer will format the drives and copy files.
- Complete the installation. Follow the remaining prompts (time zone, username, password). When the installation finishes, remove the installation media and reboot. Your system will boot from the RAID 0 array.
Common Mistakes
- Using drives of different sizes. RAID 0 uses the smallest drive's capacity on each disk, so a 1TB and 500GB drive will give you only 1TB total (500GB from each).
- Forgetting to back up. RAID 0 offers zero redundancy. One drive failure destroys everything.
- Selecting the wrong drive. Accidentally wiping your OS or data drive is irreversible. Double-check drive names and sizes before creating the partition table.
- Skipping the EFI partition on UEFI systems. If your motherboard uses UEFI (most modern PCs), the installer may fail to boot without an EFI system partition. You need a small FAT32 partition (100–500MB) mounted at /boot/efi.
- Choosing "Erase disk" instead of "Something else". The automatic option doesn't set up RAID. You must use manual partitioning.
Tips
- Use identical drives (same model, size, and speed) for best performance and to avoid capacity waste.
- Keep a backup. Even with RAID 0, regularly back up to an external drive or cloud—RAID 0 is not a backup solution.
- Test the array after install. Run
sudo mdadm --detail /dev/md0in a terminal to verify the array is active and healthy. - Consider a separate /home partition if you plan to reinstall Ubuntu often; it makes upgrades easier.
- If you add more drives later, you'll need to back up, rebuild the array, and restore—RAID 0 cannot be expanded without recreating it.
Troubleshooting
Boot fails after installation. If you get a "No bootable device" error, your bootloader wasn't installed correctly. Reboot with the installer, choose "Try Ubuntu", open a terminal, and run sudo grub-install /dev/sda (replace /dev/sda with your first RAID drive). Then run sudo update-grub.
RAID device not recognized in installer. If the "Configure RAID" button is greyed out, close the installer, open a terminal (Ctrl+Alt+T) and run sudo mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sda /dev/sdb (adjust drive names). Then restart the installer and choose "Something else"—the array should appear.
UEFI boot issues. If your system uses UEFI, you must create an EFI system partition. In the manual partitioning screen, select a drive (e.g., /dev/sda), click "New Partition Table", then "New Partition". Set size to 500MB, "Use as" to "EFI System Partition", and mount point to /boot/efi. Do this on the first drive of the RAID array before creating the RAID device, or create it on the RAID device itself (some setups allow this, but it's safer to put it on a physical drive).
RAID array shows degraded after boot. Run sudo mdadm --detail /dev/md0 to check. If a drive failed, replace it and run sudo mdadm --add /dev/md0 /dev/sdX (replace sdX with the new drive). But note: RAID 0 cannot survive a drive failure—data is lost. This only helps if the array was temporarily missing a drive (e.g., after a reboot with a disconnected cable).
Frequently Asked Questions
Is RAID 0 worth it for a home computer?
It can speed up read/write operations, especially with SSDs, but you lose all data if one drive fails. Use it only for non-critical data or if you have a solid backup strategy.
Can I use different-sized drives for RAID 0?
Yes, but the array will use the smallest drive's capacity on each disk. For example, a 1TB and 500GB drive gives you 1TB total (500GB from each).
Can I add more drives to an existing RAID 0 array?
No. RAID 0 cannot be expanded without recreating the array, which erases all data. You'd need to back up, rebuild, and restore.
Will RAID 0 work with UEFI boot?
Yes, but you need an EFI system partition. The installer usually handles this if you create a FAT32 partition mounted at /boot/efi, as described in Troubleshooting.
Can I install Ubuntu on RAID 0 alongside Windows?
Yes, but it's complex. You'd need to shrink the Windows partition first, then use manual partitioning to create the RAID array on the remaining space. The bootloader setup can be tricky; consider using a separate boot drive or setting up dual-boot after installing Ubuntu on the RAID.
What happens if one drive in RAID 0 fails?
All data on the array is lost. The system won't boot, and you'll need to replace the failed drive, recreate the array, and reinstall Ubuntu from backup.