MDADM (multi disk admin) is the software implementation of RAID on linux. It can be used to take a bunch of disks and make them into a single, powerful drive. This leads to several advantages, depending on the raid configuration you choose to implement.
For my setup I had chosen RAID5 with three disks. This means that if I loose one of them, I will not lose my data: pop in a fresh disk and go on, without even interrupting data availability.
MDADM does not come with ubuntu by default.
sudo apt-get mdadm
will take care of installation. Actually on my new system it took care of more: it automatically detected and assembled the array I had from a previous machine (that one had been built with MDADM as well), giving me this nice little icon on the desktop with all the content ready to go. This array is made up of three 250GB disks.
However, the work needed to setup the array if you have only new disks is a bit more complicated than just popping in the disks and let linux autodetect everything for you. Here you can find the process to set up the array:
1) Prepare the drives
Connect the disks and create an ext3 partition on each one. Partitions should be the same size and filesystem. You would want to span each drive with a single primary partition. Use fdisk and mkfs.ext3 or gparted to do that. You should now have many partitions as your disks named for example /dev/sda1, /dev/sda2 and so on (if you are using IDE disks those will be /dev/hda1, /dev/hdb1…)
2) Create the array
Merge the partitions into an array using mdadm:
mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1/dev/sdc1
This for example will create an array, accessible at /dev/md0, made up of your three partitions, using raid 5 as the level
check the status of mdadm with:
cat /proc/mdstat
3) Mount the array and use it
sudo mkdir /media/raid
sudo mount /dev/md0 /media/raid
if the mount fails, you have to use format the new created drive md0, use again mkfs.ext3.
4) Edit/check configuration files
for automatic recognition and mount in the next boot sequences edit the following files:
sudo gedit /etc/mdadm/mdadm.conf
sudo gedit /etc/fstab
Now data written in /media/raid is safely stored, and an hard disk failure cannot compromise it. Being on a NAS server, this can be a solid foundation for all automatic backup needs of the home network;


see the main NAS article here