Software MDADM RAID 5 – Inactive MD0 showing

mdadmraid5software-raid

I have Linux (Crunchbang 8.10) set up with 3x1TB Hard drives set up as software RAID5.

It has recently suddenly stopped working.

cat /proc/mdstat shows the following:

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : inactive sdd[2](S) sdc[1](S) sdb[0](S)
      2930287488 blocks

unused devices: 

mdadm –detail /dev/md0 shows:


mdadm: md device /dev/md0 does not appear to be active.

I Have tried running sudo mdadm -A /dev/md0 but get:

mdadm: /dev/md0 not identified in config file.

My /etc/mdadm/mdadm.conf shows:

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST 

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays

# This file was auto-generated on Thu, 21 May 2009 18:32:49 +0100
# by mkconf $Id$

Has my config been corrupted? Please help.

Best Answer

Looks like your drives are all being reported as [S]pares. You should check your logs (dmesg, /var/log/messages) to see if there's any indication why this happened.

Try running the following

sudo mdadm --examine --scan --config=/etc/mdadm/mdadm.conf

And see the output. If it outputs something like this:

ARRAY /dev/md0 level=raid5 metadata=1 num-devices=3 UUID=22f22c3599:613d5231:d407a655:bdeb84 name=backup:1

Then you can append it to the bottom of the mdadm.conf:

sudo mdadm --examine --scan --config=/etc/mdadm/mdadm.conf >> /etc/mdadm/mdadm.conf

Then try starting the array:

sudo mdadm -A /dev/md0

Good luck.