====== mdadm ======
===== Usage =====
* Overview: cat /proc/mdstat
* To view the status of an array: sudo mdadm --detail /dev/md0
* To mark a device as faulty: sudo mdadm /dev/md0 --set-faulty /dev/sda1
* To remove a failed or spare device: sudo mdadm /dev/md0 --remove /dev/sda1
* To add a device: sudo mdadm /dev/md0 --add /dev/sda1
===== Note =====
Ubuntu server 10.04.1 installer has a known bug that prevents new installation on software RAID system from booting correctly (see [[http://ubuntuforums.org/showthread.php?t=1474950]] for more details). One possible solution to get around this problem is to setup disk partition and software RAID using 9.10 installation CD before installing 10.04.
===== Sample partition =====
* HD: 500Gb * 3 (RAID 1, 1 hot spare)
* /dev/md0: /boot, 200Mb, primary, ext2
* /dev/md1: swap, 8G, primary
* /dev/md2: /, 200Gb, primary, ext4
* /dev/md3: /var, 150Gb, logical, ext4
* /dev/md4: /home, 100Gb, logical, ext4
* /dev/md5: /tmp, max, logical, ext4