I am testing my RAID5 setup, and get confused on
"spare" and "active sync"
For md0, every drive has status "active sync", but md1 has one drive as "spare". I use the same mdadm cmd to build these 2 RAIDs, but not sure why it difference. My question is whether all 4 drives are used in the RAID array, or it indicates that one drive is failed. Any help would be great.
Code:
# mdadm --create /dev/md0 --level=raid5 --raid-devices=6 /dev/sdb[1-4] /dev/sde[1-2]
# mdadm --create /dev/md1 --level=raid5 --raid-devices=4 /dev/sdc[1-2] /dev/sdc3 /dev/sdc5
Code:
# cat /proc/mdstat
Personalities : [raid0] [raid5]
md1 : active raid5 sdc5[4] sdc3[2] sdc2[1] sdc1[0]
24121152 blocks level 5, 64k chunk, algorithm 2 [4/3] [UUU_]
md0 : active raid5 sdb2[1] sde2[5] sde1[4] sdb4[3] sdb3[2] sdb1[0]
80364480 blocks level 5, 64k chunk, algorithm 2 [6/6] [UUUU
Here the output from
# mdadm --verbose --examine --scan
for md0 and md1 respectively
Code:
Number Major Minor RaidDevice State
this 0 8 33 0 active sync /dev/sdc1
0 0 8 33 0 active sync /dev/sdc1
1 1 8 34 1 active sync /dev/sdc2
2 2 8 35 2 active sync /dev/sdc3
3 3 0 0 3 faulty removed
4 4 8 37 4 spare /dev/sdc5
Number Major Minor RaidDevice State
this 0 8 17 0 active sync /dev/sdb1
0 0 8 17 0 active sync /dev/sdb1
1 1 8 18 1 active sync /dev/sdb2
2 2 8 19 2 active sync /dev/sdb3
3 3 8 20 3 active sync /dev/sdb4
4 4 8 65 4 active sync /dev/sde1
5 5 8 66 5 active sync /dev/sde2