Software RAID (MD)

Desired configuration of the disks

hdd partition raid1 lvm mount point
sda sda1 md0 - /
sdb sdb1 md0
sda sda2 - - swap
sdb sdb2 - swap
sdc sdc1 md1 vg1 /home, /srv,
sdd sdd1 md1 vg1 /media
sde sde1 md2 vg1
sdf sdf1 md2 vg1
sdg sdg1 md3 vg2 /backup
sdh sdh1 md3 vg2 /backup

see also Hardware configuration

Replace a failed RAID disk

Replace the disk, then copy the partition information from the good disk, randomize the UUID, and re-read the partition information into the system. First, install gdisk from the Debian Universe repositories.

apt-get install gdisk
sgdisk -R=/dev/sdb /dev/sda
sgdisk -G /dev/sdb
partprobe

Taken from How can I quickly copy a GPT partition scheme from one hard drive to another?

Other resources on mdadm and How do I rename an mdadm raid array?:

Setup configuration:

mdadm -Es >> /etc/mdadm/mdadm.conf

Install Base

  1. Install Ubuntu Hardy (8.04) Alternate Install: F6-F6-Expert Mode
  2. Install Raid1 with MD package activated and assign mount points

Check wether all volumes get mounted during system boot

to check wether root and swap are mounted, enter:

mount
free -m -t

to check mismatching uuid's, enter:

ls -la /dev/disk/by-uuid
cat /etc/fstab

to fix, do:

vim /etc/fstab

replace the uuid's found in fstab with the ones found in /dev/disk. Make sure you copy the correct uuid (md0, md1) to the respective entry in fstab.