Websitetemplate.org

Welcome > Linux > RAID > RAID Build From Scratch

RAID Build From Scratch

# define target drives
DISK1=/dev/hdd
DISK2=/dev/hdb
MD=/dev/md0
# partition drives
printf "nnpn1nnntnfdnwn" | fdisk $DISK1
printf "nnpn1nnntnfdnwn" | fdisk $DISK2
fdisk -l $DISK1 $DISK2
# configure/implement RAID1
cp -p /etc/mdadm.conf /etc/mdadm.conf.orig
echo "DEVICE $DISK1 $DISK2" >> /etc/mdadm.conf
dadm --create $MD --level=1 --raid-devices=2 ${DISK1}1 ${DISK2}1
cat /proc/mdstat

Content Copyright 2003-2014 George Toft