I’ve had to use mdadm to rebuild a raid1 on Nethserver before (a friends home server).
That box has 3 raids. It’s old, replacement is in situ, but not quite ready yet.
About a year ago, had to replace the disk in a raid due to a power outage and disk failure.
mdadm --create --verbose /dev/md1 --level=1 --raid-devices=2 /dev/sdd1 /dev/sde1
mdadm --assemble --verbose /dev/md1 /dev/sdd1 /dev/sde1
Usage: mdadm device options… devices…
This usage will allow individual devices in an array to be failed, removed or added. It is possible to perform multiple operations with on command. For example:
mdadm /dev/md0 -f /dev/hda1 -r /dev/hda1 -a /dev/hda1
will firstly mark /dev/hda1 as faulty in /dev/md0 and will then remove it from the array and finally add it back in as a spare. However only one md array can be affected by a single command.
Use with caution!
Backup or Image the system if possible.
My 2 cents