How To Configure RAID 5 On Ubuntu Server

There is a lot of information on how to configure a RAID 5 setup in Ubuntu Server out of there in the Internet, but somehow I had a hard time finding an easy to follow tutorial when I was setting up  the server this blog is currently running on.  the server is a high end PC, and even though the computer already comes with a BIOS RAID setup utility,I chose to use the Ubuntu Server RAID software, because it has more capabilities. one of the important things to keep in mind while setting up a RAID in Ubuntu is:

Ubuntu cannot boot from a RAID 5 partition.

so you need to create at least two partitions to install Ubuntu. one with either RAID 0 or RAID 1 for the operating system and the other with RAID 5 for the file directory.

on this tutorial I will use a VM with 5 small virtual disks for a RAID 1 and RAID 5 setup. please remember that in Ubuntu you can add partitions to a RAID as well, so you don’t necessarily have to have 5 physical drives for this setup. as long as you have a big hard drive, you can slice it into partitions to configure the RAIDs.

without further talks, let’s jump in.

fire up your Ubuntu Server. the initial windows will come up:

image

choose your language and hit Enter.

the installation Server wizard windows will pop-up:

image

Press the enter key on your keyboard. choose your language again in the following Window:

image

then choose your country:

image

choose NO on the keyboard layout detection:

image

choose the right settings for your keyboard on the following two windows:

image

the keyboard detection, and other component scanning window will show up:

image

choose a hostname for your server on the following window:

image

choose your time zone:

image

the partition manager will come up. choose Manual :

image

Choose the first partition on the list and press Enter:

image

the following warning will come up. choose Yes.

image

The new created partition will show up as free space on the next window:

image

Select the partition and press the Enter. the create a new partition window will come up:

image

press Enter again. type the size for the partition. in this case, it is the entire disk:

image

click  on continue. and choose Primary on the partition type:

image

click on Done setting up the partition on the following window:

image

do the same thing we just did for the rest of the drives. once you have all the drives partitioned. they should look like this:

image

select Configure Software RAID on the top menu:

image

say Yes on the following warning:

image

the changes will be written to the disk:

image

after that, the Software RAID configuration window will come up:

image

select Create MD device. and press Enter.

we will create the RAID 1 drive first. choose RAID1 on the following menu:

image

choose the number of drives on the following window. RAID1 needs 2 drives, so enter the number 2 and click on continue:

image

enter 0 for spare devices on the following window, and click on Continue.

image

choose the drives on the following menu. only choose 2 for RAID1 by using the down arrow key and the space bar. after the two drives are chosen, click on Continue:

image

Say Yes to the following warning:

image

by now, the RAID 1 configuration should be completed. Now let’s setup the RAID 5. click on Create MD configuration again:

image

choose RAID5 on the following window, and hit Enter.

image

choose the number of disks on the following window.  choose 3. and click on Continue.

image

put 0 as spare drives. and click Continue.

image

choose the disks you want to configure. choose the 3 disks and click on Continue.

image

click yes on the following warning:

image

that’s it. we have completed the RAID setup on Ubuntu. click on Finish.

image

now you should have two partitions available on your Ubuntu server. one for 10 GB ( mirrored RAID1 drive ) and 21 GB the RAID 5 partition.

image

lets setup the installation now. select the first 10GB partition, and hit Enter.

on the following window. select use As: and hit enter. on the list choose the first option. Ext4 Journaling File System and hit enter again:

image

then select Mount Point and choose / – the root file system and click enter again:

image

choose Done setting up the partition on the below menu:

image

do the following to setup the 21GB RAID 5 partition, but instead of choosing the / mount point, choose /Var for the mount point. if you are using the server for web hosting apache WWW directory is at the /Var directory. you make your own decision to what directory you assign the RAID 5 partition.

after you’re done with the partitions setup. click Finish partitioning and write changes to disk on the menu below:

image

from here on continue the installation of Ubuntu as usual.

after finishing the installation. you should have a fully functioning Ubuntu server with RAID1 for the boot partition, and a RAID 5 for the /Var file system:

image

I hope this tutorial gives you an idea on how to setup a RAID on Ubuntu server. please if you have a question or suggestion use the comment section below.

take care. Nelson.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someoneShare on Reddit

Nelson has written 169 tutorials

Hi there, thanks for visiting ittutorials.net My name is Nelson Amaya, and I work in IT. I created this site with the intention of helping IT professionals in their IT job. I post tutorials about Linux, Windows, Open Source software, and many other emerging technologies. thanks for stopping by.