Recover RAID array on an external disk

Get disk info

fdisk -l  | grep raid


/dev/sdb1            2048   102402047    51200000   fd  Linux raid autodetect
/dev/sdb2   *   102402048   102811647      204800   fd  Linux raid autodetect
sudo lsblk
aptitude -y install mdadm raidutils
mdadm --examine /dev/sdb1
mdadm --examine /dev/sdb2
mkdir /mnt/md{0,1}
mdadm --assemble --run /dev/md0 /dev/sdb1
mdadm: /dev/md0 has been started with 1 drive (out of 2).
mdadm --assemble --run /dev/md1 /dev/sdb2
mdadm: /dev/md1 has been started with 1 drive (out of 2).
mount /dev/md0 /mnt/md0
mount /dev/md1 /mnt/md1

LUKS Encrypted RAID array member

aptitude -y install cryptsetup
mkdir /mnt/raid_luks
cryptsetup luksOpen /dev/md1 raid_luks
Enter password:
mount /dev/mapper/raid_luks /mnt/raid_luks

Clean up

umount /mnt/md0
umount /mnt/md1
mdadm --stop /dev/md0
mdadm --stop /dev/md1

Troubleshooting

mdadm: /dev/sdh2 is busy - skipping

sudo mdadm --assemble --readonly /dev/md123 /dev/sdh2
mdadm: /dev/sdh2 is busy - skipping

This is because it had been auto mounted by Fedora. Stop the md device and re-assemble it

sudo mdadm --stop /dev/md123
mdadm: stopped /dev/md123
sudo mdadm --assemble --run /dev/md123 /dev/sdh2
mdadm: /dev/md123 has been started with 1 drive (out of 2).