Ubuntu versions tested: 10.04 (Lucid), 10.10 (Maverick) and 11.04 (Natty).
The update to Ubuntu 10.04 Ubuntu 10.10 via the package manager is not a problem in RAID (testimony).
The update to Ubuntu 4.11 Ubuntu 10.10 via the package manager is not a problem in RAID (witness testimony).
Setting up RAID
1. The result to be obtained
The aim is to secure his home partition using RAID. I personally use two disks to a RAID 1, but you could also use a RAID 5 for example.
It takes at least three hard drives in your machine:
⋅ 1 to put the / partition
⋅ 2 to at least one RAID / home (if two drives have the same capacity, read the paragraph “Notices”)
3. Step One: Installing Ubuntu
It’s very simple: Install Ubuntu “as if nothing had happened” on a single partition, using only disk that will host the partiton/.
4. Step Two: Create the RAID
Start your new installation. Then:
For Ubuntu 10.04, 10.10 and 11.04 with the “Classic Desktop” go to the menu “System” → “Administration” → “Disk Utility”.
Ubuntu 4.11 with Unity: click the top left on the Ubuntu logo and type “Disk Utility”. Click on the icon.
In the menu, choose “File” → “Create” → “RAID”
Choose your RAID type. If you have 2 drives, RAID 1 is good, and if you have 3, RAID 5 is good. Also give a name to your RAID. The name is not used much, except to see you there if you want to create lots of RAID because you have plenty of hard drives.
Then choose from the list the devices (hard drives) that will be used to create the RAID and click OK.
The RAID should already work: you can format (warning, it is not a RAID partition) and mount it.
5. Automatically activate the RAID boot
The RAID must first be made on, and mounted before being used. Disk Utility is known to activate it, and mount it. But by default, at startup, the RAID is inactive. You have to give a configuration file for mdadm can activate at startup. Mdadm is actually the Linux utility management RAID, Disk Utility is a graphical interface that uses, among others, mdadm. We must therefore set up correctly to use the mdadm RAID boot directly without having to use the disk utility each time you want to use RAID. This configuration is done via the configuration file/etc/mdadm/mdadm.conf and not via Disk Utility, which is a shame.
It is necessary to know which devices on the RAID is created. To do this, Disk Utility can provide information (select the RAID, then “Edit components”):
Here, the two devices are /dev/sdd1 and/dev/sdc1.
Open root in the configuration file:
We can delete (or comment) all of its contents, and add this:
DEVICE/dev/sdc1/dev/sdd1 ARRAY/dev/md0 level=raid1 num-devices=2 UUID=1c4e6aec: ca794ac5:80009dad:9f14e36e
By setting the line DEVICE proper devices.
On the line array, replace / dev/md0 with the device for your RAID. We find this information in the disk utility as well. Attention in the disk utility, it is set / dev/md0p1 when it is / dev/md0 need to put in the configuration, I have not yet cleared the mystery.
The rest of the information is given by the command
6. Automatically mount the RAID / home start
Open the file / etc / fstab as root:
gksudo gedit / etc / fstab
And add this line to the end:
/dev/md0p1/home ext4 defaults 0 2
By replacing /dev/md0p1 the device that gives you the disk utility.
7. Put the user folders on the RAID
Copy / paste your personal file at the root of your RAID (after mounted with Disk Utility if it was not already).
The next boot, your RAID will be mounted, with your personal file on it.
At the end of this tutorial, a copy of your personnel file inaccessible is still on the disk that contains your root partition, it is always possible to remove it later with a Live CD. But I think it’s a good idea to leave it: if one day the RAID problem and does not want to be mounted, the system will boot anyway with the personnel file in question.
There is no requirement to use two drives of the same capacity for the RAID. For example, one could use a 1TB drive and a 1.5 TB disk In this case, the additional second 500GB disk will be used to make an additional partition (source).
We can format a RAID file system you want, but you can not partition it.
The possibilities are numerous RAID, especially coupled with LVM, but here I was the simplest.