'''THIS SERVER IS DOWN AS NOW 2014-April''' ==software raid mdadm== http://www.cyberciti.biz/faq/linux-creating-software-raid-one-arrays/ http://zackreed.me/articles/38-software-raid-5-in-debian-with-mdadm ===fdisk / gpartd / parted=== if the disk size > 2.2T, need to use parted to create partition parted /dev/sdb parted /dev/sdc parted /dev/sdd ===If the device contains a valid md superblock, the block is overwritten with zeros:=== mdadm --zero-superblock /dev/sdb /dev/sdc /dev/sdd ===Create RAID1 using /dev/sdb1 and /dev/sdc1=== mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1 or ===Create RAID5 using /dev/sdb1, /dev/sdc1 and /dev/sdd1=== mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 [--spare-devices=1] /dev/sd[bcd]1 ===Format /dev/md0 as ext3:=== we would like to use ext4, but with xenserver, there is no ext4 option. mkfs.ext3 /dev/md0 ===test Mount /dev/md0=== mkdir /raid1 // for test RAID1 or mkdir /raid5 // for test RAID5 mount /dev/md0 /raid1 df -H ===set auto boot up=== we have set up the array, we need to edit the mdadm configuration file so that it knows how to assemble the array when the system reboots. echo "DEVICE partitions" > /etc/mdadm.conf echo "HOMEHOST fileserver" >> /etc/mdadm.conf echo "MAILADDR youruser@gmail.com" >> /etc/mdadm.conf mdadm --detail --scan ===add to xenserver=== xe sr-create content-type=user type=ext device-config:device=/dev/md0 shared=false name-label="local raid5md0" ===RAID expansion=== mdadm --manage /dev/md0 --add /dev/sde1 --> if new disk is named "/dev/sde" mdadm --grow /dev/md0 -n4 --> assuming an increase of only one disk