linux md raid-0 doesn't assemble after reinstall

TheSpoon

Limp Gawd
Joined
Jun 6, 2004
Messages
431
I reinstalled Ubuntu today (it's on an 80GB Intel SSD, not in RAID). And now I can't assemble my 4TB RAID-0 array consisting of two 2TB disks. I'm no md expert.. so I'm not sure what's going on exactly. The array doesn't have any crucial data, but still, it'd be ever so lovely to get it back.

Here's some possibly-relevant information:
Code:
spoon@table:~$ cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md_d127 : inactive sdc1[1](S)
      1953511993 blocks super 1.2
       
unused devices: <none>

Code:
spoon@table:~$ sudo mdadm -Es
ARRAY /dev/md/raid0-4tb level=raid0 metadata=1.2 num-devices=2 UUID=a4acf50b:7ebc8637:254f11b7:ad3252e6 name=:raid0-4tb

Code:
spoon@table:~$ sudo mdadm --assemble --scan
mdadm: /dev/md/raid0-4tb assembled from 1 drive - not enough to start the array.

Anyone know what's wrong?

Thanks.
 
Oh I got it to work... like this:

Code:
spoon@table:~$ sudo mdadm --stop /dev/md_d127
mdadm: stopped /dev/md_d127

spoon@table:~$ cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
unused devices: <none>

spoon@table:~$ sudo mdadm --assemble /dev/md0 /dev/sdd1 /dev/sdc1
mdadm: /dev/md0 has been started with 2 drives.

spoon@table:~$ cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid0 sdd1[0] sdc1[1]
      3907023872 blocks super 1.2 512k chunks
      
unused devices: <none>

I don't get it.. what was that md_d127 device? Where'd it come from? Why did it contain only one partition (sdc1)?

EDIT: now I have the problem of making this change persistent... What must I put in /etc/mdadm/mdadm.conf to get it to activate the array at boot? Right now it contains:

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

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

# definitions of existing MD arrays
ARRAY /dev/md/raid0-4tb level=raid0 metadata=1.2 num-devices=2 UUID=a4acf50b:7ebc8637:254f11b7:ad3252e6 name=:raid0-4tb

# This file was auto-generated on Wed, 19 Jan 2011 21:36:49 -0500
# by mkconf $Id$

That ARRAY line is the output of mdadm -Es
 
Ok, I got it to auto-activate at boot by replacing the ARRAY line with the one I used before formatting (I backed up the config file).

The line I put in now is:
Code:
ARRAY /dev/md0 level=raid0 num-devices=2 metadata=1.2 name=:raid0-4tb UUID=a4acf50b:7ebc8637:254f11b7:ad3252e6

Which, so far as I can tell, differs from the one produced by mdadm -Es only in the name of the device (/dev/md0). I'd still love to hear why this caused a problem...
 
Back
Top