Setting up Raid 1 on Linux

Here’s the process for when I forget next time:

Create
new linux partitions to be used in the software raid array, use mdadm
to set them up, wait for them to sync, then create the filesystem on
the new md0

# fdisk /dev/hdX 
# mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/hdX1 /dev/hdY1
# watch cat /proc/mdstat (takes 30 mins for 80GB)
# add ARRAY /dev/md0 devices=/dev/hdc1,/dev/hdd1 to /etc/mdadm/mdadm.conf
# reboot
# mkfs.ext3 /dev/md0

/dev/md0 is now ready to be used 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *