8

I successfully built up a raid5 array on Debian testing (Wheezy). As the man pages and further tell, the array would be created as an out-of-sync array with just a new spare injected to be repaired. That worked fine. But after the rebuild process, I get daily messages on missing spares, but the array should be raid5 over 3 discs without spares. I think I only need to tell mdadm that there is -- and should be -- no spare, but how to?

mdadm -D gives

Active Devices:  3
Working Devices: 3
Failed Devices:  0
Spare Devices:   0

and /proc/mdstat reads

md1: active raid5 sda3[0] sdc3[3] sdb3[1]
##### blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]

Any ideas?

1 Answer 1

16

Open the /etc/mdadm/mdadm.conf file, find the line that begins with ARRAY /dev/md1 and remove the line immediately following which states 'spares=1'. Then restart mdadm service.

If you did a mdadm --examine --scan to retrieve the array definitions while the md1 array was still rebuilding, one partition was seen as spare at that moment.

2
  • Thank you for your solution. I'm wondering, how the line got there. I know, that on building up (resulting in a rebuilding state) the has one spare - but after successfully rebuilding that line should be automatically removed, shouldn't it? Anyhow - after manually commenting out the line it is working the way I want it to. Thanks! Mar 18, 2011 at 6:30
  • 4
    @Bastian Ebeling: Many tutorials include mdadm --examine --scan >> /etc/mdadm/mdadm.conf in their instructions, just after the array creation (which is still rebuilding), so it includes an extra spare.
    – forcefsck
    Mar 18, 2011 at 11:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .