Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I succesfully builded up a raid5 array on debian testing (Wheezy). As the manpages 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 spare. I think, I only need to tell mdadm, that there is and should be no spare - but how to? mdadm -Dgives

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? Thanks in advance

share|improve this question

1 Answer 1

up vote 8 down vote accepted

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.

share|improve this answer
    
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! –  Bastian Ebeling Mar 18 '11 at 6:30
2  
@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 '11 at 11:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.