Table of Contents

Create \ Start \ Stop Arrays

Create a RAID 1 device

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/{left,right}_raid1

RAID 5

mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdd1 /dev/sdc1 /dev/sdb1

Create a degraded RAID device with a missing drive

You can create a RAID device with a missing drive by giving missing in place of the device

Stop / Start an array

Re Assemble a RAID device

If you have a /etc/mdadm.conf file you can just

If you don't have an mdadm.conf file then you will need to specify the partitions

details about a RAID device

Set disk faulty and remove

Set disk faulty

Remove drive

Add a replacement drive in

To add the same drive back in

Add a spare

If a disk is partitioned, and you can't reboot use partprobe

Various Commands

Stop an array

Re Assemble a RAID device

Send a test message to make sure the monitoring is working

Change sync speed

mdadm.conf

mdadm --detail --scan >> /etc/mdadm/mdadm.conf
mdadm --examine --scan >> /etc/mdadm/mdadm.conf