LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   RAID 5 with mdadm "spare" and "active sync" confusion (https://www.linuxquestions.org/questions/linux-server-73/raid-5-with-mdadm-spare-and-active-sync-confusion-604134/)

ufmale 12-03-2007 09:20 AM

RAID 5 with mdadm "spare" and "active sync" confusion
 
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


nass 12-08-2007 10:31 AM

well mdadm is clever enough.
you only see one spare, which is SHARED between the 2 arrays (someone correct me if you think this is wrong)..
so it will not render 2/10 drives spare and waste your money :)

meanwhile you do seem to have a faulty drive there ..


All times are GMT -5. The time now is 03:50 PM.