A simple do-it-yourself guide

Jul 16, 2007 10:10 GMT  ·  By

RAID is the acronym for "Redundant Arrays of Inexpensive Disks" and is considered to be a pretty important concept for a number of things. First of all it can be used to increase data security, as a form of on the fly data backup is performed. The second most widespread use of the RAID is to increase speed and data bandwidth for systems that are time critical. While a RAID can be made of just about any kind of storage devices (hard drives are commonly used), this article focuses on building a RAID system based on a few USB sticks.

What is needed: a computer with a USB port, at least two USB sticks (preferably with the same size and speed, but this is not a must), a USB hub and a Linux distribution named Gentoo (I simply love it). While a USB based RAID can be setup equally easy on a Windows machine, this article really uses the Linux approach. The hardware setup is very easy: just plug the USB sticks into the hub then connect the hub to the computer.

Using "fdisk" and the "p" command the USB sticks are transformed into Linux Raid Autodetect sticks. In order to create a RAID device, the sticks must be grouped. There are several levels of RAID that can be used. Using "mknod /dev/md0 b 9 0" and "mdadm -C -v /dev/md0 -l=5 -n=3 /dev/uba1 /dev/ubb1 /dev/ubc1" it is possible to turn the three USB sticks into a single RAID device. Note the "C"-create, "v"-verbose and "l=5"-level 5 RAID. To use the new RAID device all is needed now is to format and mount it. Formatting a device in Linux is done by the "mk2fs" utility, while mounting is done by the "mount" one with options for the filesystem used, mount point and so on. To view the new device a "df" can be issued.

RAID technology was intended for high performance hard drives. But it seems that is works equally well with a USB stick. While USB sticks are generally much slower that hard drives are, using a RAID setup it could be possible to increase their performance.