Save to file
sfdisk -d /dev/sda > partitions
Restore from File and force
sfdisk --force /dev/sda < partitions
sfdisk -d /dev/sda | sfdisk /dev/sdb
Using smartctl
smartctl -i /dev/sda
cat /proc/mdstat
Do the Folloing for all partitions of the malfunctioning disk. Note that mark as faill is not necessary or even possible in case the disk is not detected anymore from the OS.
Mark partition as failed
mdadm --manage /dev/md0 --fail /dev/sda1
Remove Partition
mdadm --manage /dev/md0 --remove /dev/sda1
Repeat for all required partitions
mdadm --manage /dev/md0 --add /dev/sda1
Warning: select the correct physical disk (/dev/sda in example) <sxh bashdd if=/dev/zero of=/dev/sda bs=512 count=8196 dd bs=512 if=/dev/zero of=/dev/sda count=8196 seek=$1)</sxh>