Some useful commands for software RAID1 on Linux.

mdadm commands:

Query and get details about the RAID.

mdadm --detail /dev/md0

Fail Drive:

mdadm --fail /dev/md0 /dev/sda1

Remove Drive:

mdadm --remove /dev/md0 /dev/sda1

Install new drive and copy partition table:

sfdisk -d /dev/sda1 | sfdisk /dev/sdb

Add Drive to RAID:

mdadm --add /dev/md0 /dev/sdb1