The images shown in this tutorial are based on Ubuntu 16.04. We will be using the GUI installer for configuring software RAID on setup. Setting up RAID after installation is a different process.
The setup screens should be similar for both Ubuntu and Debian server installers. For this tutorial, I have setup a virtual machine with 4 HDDs.
1. Most of the time we will do manual partitioning when we configure software RAID. So select "Manual" here.
2. Here, I have 4 HDDs and we'll need to initialize them first.
3. Once that's done, you should see the following layout on the partitioning screen.
4. Now we will create a separate /boot partition on one of the drives. Most of the time it does work when the /boot partition is in the RAID drive but there is a chance that it won't depending on the configuration. To ensure that the operating system will boot properly, we will create a separate /boot partition. Usually you will want to allocate around 1 to 2 GB for the boot partition.
5. Before we setup software RAID, we'll create and label our partition setup. In this case, I'll only be creating a root partition per drive. This is also to ensure we don't get confused later on in configuring RAID when we select which partitions should be arrayed.
6. Once you've gone through all of the drives and replicated the partition layout that you want for each drive, we can now proceed to configuring software RAID. Go to "Configure software RAID" now.
You will be asked to save the changes made to the partition layout. Click Yes to continue.
7. You will now be presented with the software RAID configuration screen. Go to "Create MD device".
8. You will be presented with the various RAID levels that you can configure. If you don't yet have a clear picture on RAID concepts, you can look for our tutorial on RAID concepts on our knowledgebase.
For the purposes of this tutorial, we will configure RAID 0, known as striping.
9. Now you will be asked to specify which partitions you want to use in the RAID array. In this case, I've selected the 4 root partitions I created earlier.
You need to do this for every custom partition you created earlier in the partition screen. After this you will need to save the changes made.
10. Now a new RAID device has been created and should now show up in the partitioning screen.
11. Now we need to provision the new partition or partitions in the new RAID drive to our desired partition layout. In this case, I only need to re-create the root partition on this new RAID drive.
By default, the RAID partition is set to "Do not use". We will need to change that so we can configure it as a root partition.
Once that's done. We can finish the partitioning and save the changes to the disks. Double check your partitioning screen to see if you have the desired partition layout you want.
12. Now click on "Finish partitioning and write changes to disk".
13. You may be presented with this screen. This will happen if you did not configure any swap partitions. Selecting "Yes" will return you to the partitioning screen. Since my virtual machine's RAM is sufficient for our purposes so we'll just select "No".
After this, you will be asked to confirm saving changes to disk. Select "Yes".
14. The boot loader needs to be installed to a hard drive. We made a boot partition earlier in the first drive so we will select /dev/sda in this case.
15. After this, the installation will continue as usual to the other steps.
That's it for setting up software RAID inside the installation GUI!