#!/bin/bash set -e parted /dev/sda mklabel msdos parted /dev/sda mkpart primary 1 440GiB parted /dev/sda mkpart primary 440GiB 2GiB parted /dev/sdb mklabel msdos parted /dev/sdb mkpart primary 1 440GiB parted /dev/sdb mkpart primary 440GiB 2GiB echo 'yes' | mdadm -C /dev/md0 -l1 -n2 /dev/sd[ab]1 echo 'yes' | mdadm -C /dev/md1 -l1 -n2 /dev/sd[ab]2