I'm getting the following mail every day on a server:

This is an automatically generated mail message from mdadm
running on <host>

A SparesMissing event had been detected on md device /dev/md0.

Faithfully yours, etc.

P.S. The /proc/mdstat file currently contains the following:

Personalities : [raid1]
md0 : active raid1 sda1[0] sdb1[1]
      731592000 blocks [2/2] [UU]

unused devices: <none>

The output from cat /proc/mdstat looks fine though, so it's not obvious what is causing this problem.


The cause was an erroneous spares=1 option in the mdadm.conf:

# definitions of existing MD arrays
ARRAY /dev/md0 UUID=621d5f15:cce75825:60273c48:78a7dac7

I'm not sure how this ended up there, but I suppose it happened when a device failed and was replaced.

Removing the spares=1 option or just recreating the mdadm.conf from scratch fixes the problem:

/usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf
| improve this answer | |
  • 1
    Strangely enough, this was my exact situation. There was a spares=1 with unknown origins. This raid array (and the whole system) was set up recently, though, so it can't have gotten in there when "replacing a disk". Still, glad to see a solution even if it does still leave some questions – Jasper Aug 13 '19 at 9:18
  • Thanks for sharing. – Michael Shigorin May 12 at 21:37

I got the message, however I have a spare disk. The answer above puzzled me a little. The resolution appeared to be simple.

There was spares=2 in my mdadm.conf. The odd thing is - I haven't configured that. It must have been done by some installation script. I have two RAIDs with one spare each. The first one got properly "spares=1" and the second one spares=2.

| improve this answer | |
  • Maybe mdadm --create has an off-by-one class bug. PS: was the incorrectly configured one created as RAID5? – Michael Shigorin May 12 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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