Home‎ > ‎Linux Notes‎ > ‎

My Fedora 10/11 RAID 5

I had some trouble setting up my RAID 5 on Fedora 10 and the pre-Release of Fedora 11.  I'd never done it before and although this isn't particularly hard, it can be time consuming to figure out.  At the time I was doing this, both installations processes were the same, or at least the setup of a RAID 5/LVM was the same.

First off, I'm going to assume you've installed Linux a few times.  Nothing too fancy, just Ubuntu or something.  I'm also going to assume you know what a RAID 5 array is.  I think the wikipedia article on LVM is as clear as I would like so I'll very briefly explain it.

Imagine a magic box that when you throw hard drives into it, it turns them into one large hard drive.  If you later want to add another hard drive, you just throw that one in too.  If you want to get one back out of the magic box, you tell the box which one you want and it will give it back after it has put the data onto the other hard drives.  Pretty cool box huh?  This magic box is LVM...it's software.


Work your way through the installation until you get to a screen that looks like the following:

In my case I have 4 1TB SATA drives--I am going to use all of them.  I'm also planning on wiping them all clean to make this simpler.  If you are learning how to do this, it is probably a good idea to back everything on all of the partitions with data you care about.  Make sure you check "Review and modify partitioning layout", then click "next".

On the next screen, delete all of the partitions.  It should look something like this:

One drawback to LVM is that you cannot boot from it.  Think about it for a second, LVM is software that manages hard drives.  This is pretty complicated stuff...too complicated to fit into the BIOS or whatever other firmware you computer has.  Your computer needs to be able to find the software to run LVM before it can use it.  If this doesn't make sense, think about how booting works.

This means you will have to create a boot partition.  Click "New" and make a partition mounted on /boot and that is about 200MB.  Make another partition and make it a swap.  I made mine 2GB, but the size of yours is up to you.  This is where your virtual memory is stored.  Be aware that there are limits on how big you can make this.  I haven't verified this, but I think on a 32 bit system RAM + SWAP < 4 GB (in practice more like 3.5).

NOTE: You may want to think about different ways to set up your system.  For example, maybe you want to put your swap partition on the RAID to try to get better IO speeds.  This might speed up some of your processing.  You may also want to consider getting another 40GB drive to put your boot partition on.  Maybe you want to put /boot and / on the 40GB hard drive to keep your RAID 'pure'.  Think about a recovery plan for a lose of each of your drives.  There are many good ways to do this, the best way is the way that you understand best.

Next you'll want to click the "RAID" button and select "Create a software RAID partition".

The first time you see this screen you will only have the 1st option (you will use the 2nd option later on).

You will want to fill out this screen like the picture shows.  You will have to do this for each of your hard drives that you want to be a part of your RAID 5.  When you are done, click "Raid" again.  This time select "Create a Raid Device" (see 2 images up).  Make the screen you see look like this:

You are formatting the RAID into an LVM.  Congratualations! You've got that magic box I was talking about earlier.  This however, is useless until you partition the LVM.  Remember, the LVM acts as if it were just one disk.

NOTE: You may look at the LVM that is created and think something like, "What the heck? I had 4 TB and now I only have 2.9TB!!"  I'm sorry, I know it hurts.  Remeber that you now have redundancy and you will still have ALL of your precious data even if one of your hard drives fails.

Next you need to partition the LVM.  For this example, I will make just one partition where I will mount /.

From here you ought to be able to 'Ok' and 'Next' your way through the installation.  Good luck!