Sooner or later, there comes a sad time when you tell yourself: “I should have made a backup!”. Even though technically RAID is not a backup solution, but rather a fault-tolerant storage device that is using data redundancy, the chance of losing important/critical data is significantly lower than if you were using the non-RAID hard drive (To clarify, in the scope of this article I’m referring to redundant arrays, i.e. disk arrays which employ data redundancy).
Now, in order to build a RAID we need (surprise!) a number of hard drives.
We also need to make sure that our motherboard can accommodate the desired number of hard drives. There are several RAID architectures that use data redundancy, and for this example we’ll be using RAID 5.
Since some of the disk space has to be sacrificed to provide redundancy, we need to do our math beforehand. For this example we will be using four 1TB drives, which gives us 3TB of RAID 5 storage.
If you want to read more about RAID and RAID 5 in particular, here is the Wikipedia link and I’m pretty sure that with a little bit of effort you can find tons of info about it around the net.
Once all the drives are connected to the motherboard, we should be prepared for creating a RAID. Before starting up the Palimpsest Disk Utility, however, make sure that you have mdadm installed. mdadm is the key component in setting up and running software based RAID arrays in Linux.
Once your drives are all connected, boot up and start the disk utility under “System” ->”Administration”. In the menu under “File” you need to select “New -> Software RAID Array”. Once you do that, you will be presented with a popup window for RAID options configuration. The first option is “RAID Level” and we will be selecting “Distributed Parity” (RAID-5). The next thing you need to do is to name your RAID array and then select all the hard drives that will participate in your RAID at the bottom of the window. Two other options that need to be set are “Stripe Size” – I’m leaving it at the default value of “64 KiB” and “Array Size” – I’m selecting the largest available value, by moving the slider all the way to the right. In my case it reads “3001 GB”. Once you’re all set, press the “Create” button at the very bottom of the window.
It will take some time for all the drives to sync up, depending on the array size. Once it’s all done you will see something like this:
Now, we may notice that in the left bottom corner of the window there is a new software RAID device that is called “jg-raid”. We can also see that it has 3001GB of unrecognized space. Naturally, in order to be able to use it, we have to partition this space and create a filesystem in that partition. From user’s standpoint of view, once the drives are synced, we can treat them just like a one big drive, the underlying processing that provides data-redundancy is handled by the OS, so for us it just works “automagically”.
Once we’ve selected all the necessary options (I won’t concentrate on them much, but will mention that I’ve selected GUID partition table in the dropdown in the bottom), we are ready to label the partition and use the filesystem that we will be creating.
Once that is done, and the filesystem has been created we end up with something like this. You can see that we’ve created an LVM partition named “rd” and we can also see that our filesystem is mountable.
Now, if the array is not running yet (you will see array’s state right in the middle of the window), you can select it in the left part of the window and press “start” icon in the top portion of the window to start it. This is the result that we should see:
It is almost ready to use. The last thing that’s left to do is to mount it.
Once we’ve done that, we can start enjoying our Terabytes of fault-tolerant storage!







Here’s one other thing you want to mention. The drives don’t need to be the same. However, in a raid 1 or 5, it will round everything down to the smallest device and ignore the excess space. Now if you find yourself in a situation when one of your drives died and you need a replacement, be careful. Hard drives from different manufacturers may differ in size slightly, despite being marketed as having the same volume. The difference in geometry is not important, but the total block size is. And if your new drive is slightly less than the rest, your only option is to re-create the whole array (and abandon the data recovery) or take it back to the store. One of the RAID guides I’ve seen recommended to cut off 1-2% off the total drive space when you create the array to compensate for issues like that. Unless you’re sure you can find the exact replacement, or feeling adventurous.