Create raid with parted

To create raid 1 in live linux system

parted -a optimal /dev/sdf

Place a flag gpt or mbr
mklabel gpt

Create partitions
mkpart primary ext4 0% 100%

Mark partition as software raid partition
set 1 raid on

Verify its alligned

Show results

Prepare second disk

Raid 0 array
mdadm --create /dev/md2 --level=0 --raid-devices=2 /dev/sdaX /dev/sdbX
Raid 1 array
mdadm --create /dev/md0 --level=1 --raid-devices=2 --spare=0 /dev/sdaX /dev/sdbX
Raid 10 array
mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/sd[a-d]X

Check results
cat /proc/mdstat

Format array
mkfs.ext4 /dev/mdX

Mount and write to fstab

Write raid to a mdadm.conf
mdadm --detail --scan >> /etc/mdadm/mdadm.conf

Update initramfs
update-initramfs -u