wiki:SoftwareRaid

Version 2 (modified by joshuadf, 11 years ago) (diff)

--

Linux Multiple Device RAID

mdadm: A New Tool For Linux Software RAID Management by Derek Vadala 12/05/2002

Used for amgydala /usr/local/data; See HardwareRaid for other systems.

Host Device Model Size Size (OS)
amygdala Seagate ST3750640NS 750GB 696 GiB
mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd
cat > /etc/mdadm.conf <<EOF
MAILADDR root
PROGRAM mdadm
DEVICE /dev/sdb /dev/sdc /dev/sdd
ARRAY /dev/md0 devices=/dev/sdb,/dev/sdc,/dev/sdd num-devices=3 level=5
EOF

cat /proc/mdstat
mke2fs -j /dev/md0
# turn off autocheck since it's RAID
tune2fs -c0 -i0 /dev/md0

mkdir -p /usr/local/data/
chown nobody:nobody /usr/local/data/
echo '/dev/md0                /usr/local/data/        ext3    defaults        0 0' > /etc/fstab
mount /usr/local/data/
chkconfig mdmonitor on

http://www.tldp.org/HOWTO/Software-RAID-HOWTO-5.html