Replace Soft RAID in Linux without any downtime

We just had a failed disk in one of our backup storages.
Our monitoring tool shows that the failed disk happened to be the one used by OS.
When I logged in and checked the Debian server, I couldn't see any hardware raid for these disks, so it has to be a software raid.

You can use this command to get the list of software raid on the system:
cat /proc/mdstat

One you have identified failed disk, use the following command to remove it from the software raid:
mdadm --remove /dev/md0 /dev/sda1 where: md0 is the RAID name and sda1 is a member of the raid ( which has failed)

In my setup, disk sda has 3 partitions: sda1,sda3,sda5, so I repeat the above command to remove them all.

Now you can insert new disk to another slot ( if there is one available) and then mirror the same partition from a working disk ( sdb in this case).
The new disk will have a name, please check on your system.
Mine is sdc:
sfdisk -d /dev/sdb | sfdisk --force /dev/sdc

Once we have mirrored the partitions, it's time to add them back to existing raid:
mdadm --add /dev/md0 /dev/sdc1 mdadm --add /dev/md1 /dev/sdc3 mdadm --add /dev/md2 /dev/sdc5

Check that it is working: cat /proc/mdstat