My setup is 3 partitions for raid5, /dev/hda6 /dev/hdb1 /dev/sda2 (hdb1 is whole disk)
Creating /dev/md0 with mdadm:
Code:
edgar:~# mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/hda6 /dev/hdb1 /dev/sda2
seems to work fine, array is created.
After reboot only 2 partitions are used, /dev/sda2 is said to be faulty.
I remove sda2 and recreates it. Then add it to array:
Code:
edgar:~# mdadm /dev/md0 --add /dev/sda2
Reboot. What do I have now?
Code:
edgar:~# mdadm --detail /dev/md0/
dev/md0:
Version : 00.90
Creation Time : Sun Sep 13 13:37:07 2009
Raid Level : raid5
Array Size : 27358464 (26.09 GiB 28.02 GB)
Used Dev Size : 13679232 (13.05 GiB 14.01 GB)
Raid Devices : 3
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Sun Sep 13 17:38:06 2009
State : clean, degraded
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Layout : left-symmetric
Chunk Size : 64K
UUID : d7dee44c:7886fe78:0a872d5f:65630445
Events : 0.562
Number Major Minor RaidDevice State
0 3 6 0 active sync /dev/hda6
1 3 65 1 active sync /dev/hdb1
2 0 0 2 removed
Code:
edgar:~# mdadm --examine /dev/sda2
/dev/sda2:
Magic : a92b4efc
Version : 00.90.00
UUID : d7dee44c:7886fe78:0a872d5f:65630445
Creation Time : Sun Sep 13 13:37:07 2009
Raid Level : raid5
Used Dev Size : 13679232 (13.05 GiB 14.01 GB)
Array Size : 27358464 (26.09 GiB 28.02 GB)
Raid Devices : 3
Total Devices : 3
Preferred Minor : 0
Update Time : Sun Sep 13 14:12:31 2009
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0
Checksum : ffa6da05 - correct
Events : 14
Layout : left-symmetric
Chunk Size : 64K
Number Major Minor RaidDevice State
this 2 8 2 2 active sync /dev/sda2
0 0 3 6 0 active sync /dev/hda6
1 1 3 65 1 active sync /dev/hdb1
2 2 8 2 2 active sync /dev/sda2
See? Examinig sda2 and it's said to be active in the array. 3 raid devices, 3 used.
Looking at detail for /dev/md0 it is not. 3 raid devices but only 2 used.
What is true?? Where did I go wrong?