mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda1 dev/sdb1
cat /proc/mdstat
mkfs.ext4 /dev/md0
blkid
mdadm --detail --scan >> /mnt/etc/mdadm.conf
# edit /etc/mdadm.conf
ARRAY /dev/md0 UUID=xxxxxxxx:xxxxxxxx:xxxxxxxx:xxxxxxxx
# edit /etc/fstab
UUID=xxxxxxxx:xxxxxxxx:xxxxxxxx:xxxxxxxx /mnt/raid1 ext4 errors=continue 0 2
# Add mdadm hook to mkinitcpio.conf if as a boot drive
# edit mkinitcpio.conf
HOOKS="base udev autodetect block mdadm_udev filesystems usbinput fsck"
mkinitcpio
# reboot
mdadm --detail /dev/md0