I created a RAID1 without having the second disk connected. It worked.
Then I connected the 2nd disk, partitioned it to match the first one, and then used mdadm to add it to the RAID array:
Code: Select all
$ mdadm --add /dev/md0 /dev/sdb1
Strangely though, I checked /proc/mdstat - and saw the 2nd disk marked as spare. No resync happening. The spare partition didn't get set active automatically
[SOLUTION]
Thanks to a post on superuser.com, byAvery Payne, which hinted into the right direction:
Setting this parameter for a 2-disk RAID1 to a value of "2", causes the Kernel to realize it must activate the spare.--raid-devices=2
That did the trick.
NOTE: Here's a link to speed up softraid synchronization.