Notes on RAID for Ubuntu
From Wildsong
Shorthand notes on how to convert a new Ubuntu system to RAID 1
Install Ubuntu Server
System has 12GB of RAM
System has two 250GB drives (actually a 320 and a 250, I ignore the extra space for now)
During installation create 6 partitions on each drive, so that the system can be converted to RAID 1 (mirrored)
1 1GB /boot wont be raid, so we can boot! 2 10GB /raidroot where the system will be eventually 3 10GB / initial install location 4 EXT 5 24GB SWAP won't be raided, so we will have 48GB of swap 6 200GB /raidvar will be raided /var partition
Partitions are far bigger than they need to be but the data on this system will live on an NFS server and on another RAID array to be installed later. Making the boot partitions 1 GB means in a pinch an entire copy of Linux can be installed there.
Do the installation. After it's done install the package to manage raid
apt-get install mdadm
Create RAID filesystems
See http://www.linuxfoundation.org/collaborate/workgroups/linux-raid
First convert the second and sixth partitions to RAID1
mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sda2 /dev/sdb2 mdadm --monitor /dev/md0
mdadm --create --verbose /dev/md2 --level=mirror --raid-devices=2 /dev/sda6 /dev/sdb6 mdadm --monitor /dev/md2