Raid5, wont use spare..
I have this little problem with a system with Raid5 which holds four drives.
All drives have two partitions, one for kernel/grub and one for the raid.
So I install a system on the last drive, hdd2, then make the raid using "mdadm --create /dev/md0 --level 5 --raid-devices /dev/hda2 /dev/hdb2 /dev/hdc2 missing", format the raid, copy over the system from hdd2, reboot so that I run from the raid, re-partition hdd2 to a raid partition, add it to the raid and figured all is well.
This is what comes up on reboot (only taking out the important parts):
raid5: spare disk hdd2
raid5: md0, not all disks are operational -- trying to recover array
md: hdd2 [events: 00000017]<6>(write) hdd2's sb offset: 199117568
md0: no spare disk to reconstruct array! -- continuing in degraded mode
Once in the system, "mdadm --detail /dev/md0" tells me this :
Active Devices : 3
Working Devices : 4
Failed Devices : 1
Spare Devices : 0
Number Major Minor RaidDevice State
0 3 2 0 active sync /dev/hda2
1 3 66 1 active sync /dev/hda2
2 22 2 2 active sync /dev/hda2
3 0 0 0 sync
4 22 66 4 spare /dev/hda2
So what is the deal here, the hdd2 partition was formatted before hotadded to the array, but it put it first as spare and then say it's not usable? I was under the impression that hdd2 would immediately take the "missing" drives place in the array and start reconstructing, but I might be wrong about this?
There's no error on the drive, I've checked it in another machine.
Please help :P