I have a home raid1 with 2 disks and one of them just failed (lightning strike on the house). I'm really unfamiliar with mdadm so I'm asking before doing anything stupid. I can hot-plug a new HD on sdd (it's safe, I do my backups this way), but what are the commands to add the new disk to the raid and rebuild it ?
I've already done the following to remove the dead disk and keep using the read in read-only and it works:
# mdadm --manage /dev/md0 --fail /dev/sda1
# mdadm --manage /dev/md0 --remove /dev/sda1
# mdadm --assemble --readonly /dev/md0 /dev/sdb1
My mdadm.conf:
ARRAY /dev/md0 metadata=1.2 name=penguin:0 UUID=89ec9aaf:745ed728:87e2211a:22ea2fae
My fstab:
/dev/md0 /raid ext4 noatime,relatime 0 0