For this guide, I’ll be addressing not a neat application (at least not directly), but rather a neat way to potentially combine your existing storage solutions while also adding some protection from a catastrophic disk failure.
For those of you who do not know, RAID 5 allows you to combine multiple disks of the same size (3 minimum) into a single pool. The available storage is equal to the total disks minus the size of one disk. So, if you have three 2TB drives, you’ll have a total of 4TB available (combined into one “disk”) and, here’s the neat bit, you’ll be able to suffer the loss of a single drive, while not losing any of your data.
While I will be focusing on RAID 5 in this guide, the process should be almost exactly the same for RAID 6. Similarly, the other two RAID levels supported natively by Ubuntu, 0 and 1, will follow comparable steps as those listed below (and should, in fact, be much easier to setup).
While this guide was written for Ubuntu 10.04 LTS it should be much the same for Ubuntu 10.10 (Maverick Meerkat), 11.04 (Natty Narwhal), Linux Mint 9 (Isadora), 10 (Julia), and other Ubuntu variants like Kubuntu, Xubuntu, and Lubuntu (you’ll need to install gnome-disk-utility if it’s not already).
Similarly, other Gnome and Debian based distributions such as Debian Squeeze, aptosid, and LMDE should also be pretty close to the directions below.
Like my other guides, I will be sticking to the good ol’ GUI as much as possible, however with that said there will be some CLI usage in this one (more so than my others) and this is a more advanced topic, if formatting or partitioning your drive scares you, or you have no idea what that means you may want to hold off on this one for now.
(When in doubt, research, read through the guide completely first, and then do as you think best knowing that you’re the only one who is responsible if you mess up your system or loose your data.)
Before we get started, there are some potential risks involved with this that one should be aware of. First off, it’s almost a cliche in some circles, but the fact is that RAID, of any level, is not a true back-up solution.
With that said, RAID (other than 0), does provide some additional measure of protection for your data. However, if your system is damaged in any way, be it fire, lightning, catastrophic file system error, or what have you, your RAID setup is not going to protect your data.
For true safety, a complete off site back-up is needed. Obviously, this may not be feasible, but it should be known before proceeding.
The second risk we need to examine is the possible risk of data loss while we construct or build the RAID array.
Any of the disks you want to use for the array will need to be wiped clean before they can be used. Further, if you need to shuffle data around your drives while doing this you could lose any of this data if something goes awry during this process.
The third risk to be aware of is that if more than one of your drives suffer a failure all of your data on the array will be lost. Not just the data of the two or more drives that failed. So, if you had an array with six disks, and two failed all the data on the remaining four disks would be lost.
With those few points addressed, if you are using quality hard drives, GUID partition tables, EXT4, and running Ubuntu 10.04 with the Gnome Disk Utility, there are many levels of protection already in place. GUID and EXT4 both have various checksum features in place. Ubuntu 10.04 is based on well tested software, and the Gnome Disk Utility continuously monitors your disks’ SMART status for potential failures.
If you were to also purchase a quality UPS, you should have a fair level of reliability and dependability in place. Again, this is not a replacement for a true off site back-up, but it is something.