Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

after a power failure my RAID array refuses to start. When I boot I have to

sudo mdadm --assemble --force /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1

to get mdadm to notice the array.

Here are the details (after I force assemble).

sudo mdadm --misc --detail /dev/md0:

/dev/md0:
        Version : 00.90
  Creation Time : Sun Apr 25 01:39:25 2010
     Raid Level : raid5
  Used Dev Size : 1465135872 (1397.26 GiB 1500.30 GB)
   Raid Devices : 6
  Total Devices : 6
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Thu Jun 17 23:02:38 2010
          State : active, Not Started
 Active Devices : 6
Working Devices : 6
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 128K

           UUID : 44a8f730:b9bea6ea:3a28392c:12b22235 (local to host hodge-fs)
         Events : 0.1249691

    Number   Major   Minor   RaidDevice State
       0       8       65        0      active sync   /dev/sde1
       1       8       81        1      active sync   /dev/sdf1
       2       8       97        2      active sync   /dev/sdg1
       3       8       49        3      active sync   /dev/sdd1
       4       8       33        4      active sync   /dev/sdc1
       5       8       17        5      active sync   /dev/sdb1

mdadm.conf:

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

# 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 <system>

# definitions of existing MD arrays
ARRAY /dev/md0 level=raid5 num-devices=6 UUID=44a8f730:b9bea6ea:3a28392c:12b22235

Any help would be appreciated.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

issue --run

Since you didn't use --scan, which will search your config file for any missing data it needs, mdadm won't automatically start the array.

After getting it running, make a backup of /etc/mdadm/mdadm.conf, then run:

/usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf

which would recreate your mdadm.conf file with the array data.

share|improve this answer
    
Awesome, thanks alot - RAID is back up and syncing and I have fixed my mdadm.conf. Much apperciated :) –  Matthew Hodgkins Jun 17 '10 at 22:21

Why in the mdadm.conf you have only 2 devices but your raid uses 6 partitions.
Try to add all 6 devices to the mdadm.conf.

share|improve this answer
    
Thanks, I manually added the devices to mdadm.conf so now my file and then I was able to use sudo mdadm --run /dev/md0 –  Matthew Hodgkins Jun 17 '10 at 22:20

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.