MD Replacing a drive in a degraded array

You get a email from the mdadm monotor telling you that one array is degraded (will look something like this)
DegradedArray event on /dev/md4:jontas02

This is an automatically generated mail message from mdadm
running on theserver
 
A DegradedArray event had been detected on md device /dev/md4.
 
Faithfully yours, etc.
 
P.S. The /proc/mdstat file currently contains the following:
 
Personalities : [raid1] [raid6] [raid5] [raid4] 
md4 : active raid1 sdb1[1]
      1465135936 blocks [2/1] [_U]

In this case I know from before – you make notes of how the md’s are located to drives, right 😉 – that md4 should be sda1 & sdb1
I also know from other logs that there is an error with sda1.

After physically replacing the drive the new disk needs to be added to this array in order to rebuild the array.

This is quick to do

admin@theserver:~$ sudo mdadm --add /dev/md4 /dev/sda
mdadm: added /dev/sda

And then a check of /proc/mdstat lets me know that it was added correctly and that the array is building

cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md4 : active raid1 sda[2] sdb1[1]
      1465135936 blocks [2/1] [_U]
      [>....................]  recovery =  0.0% (473408/1465135936) finish=463.9min speed=52600K/sec