On 01/07/2012 11:20 AM, Jeff Cranmer wrote:
> On Sat, 2012-01-07 at 10:11 -0500, Jeff Cranmer wrote:
>>>>>
>>>>> What am I missing?
>>>>
>>>> have you set the type to linux raid autodetect?
>>>>
>>>> have you tried mdadm --assemble? 
>>>>
>>> mdadm --assemble /dev/md0 didn't make any difference.
>>> Where do I set the type?
>>>
>> after assembling,
>> results of cat/proc/mdstat
>> personalities : [linear] [raid0] [raid10] [raid6] [raid5] [raid4]
>> [multipath] [faulty]
>> md0 : inactive sdb1[0](S) sdd1[3](S) sdc1[1](S)
>>       4395409608 blocks super 1.2
>>
>> unused devices: <none>
>>
>> results of mdadm --detail /dev/md0
>> mdadm: md device /dev/md0 does not appear to be active.
>>
>> results of /etc/init.d/mdadm status
>>  * status: started
>>
>> fstab line
>> /dev/md0   /data   xfs   noatime   0 0
>>
>> Is there a raid option I need to add to the fstab entry?
>> Is there another service that needs to run, other than mdam?
>>
>> Thanks
>>
>> Jeff
>>
>>
> I tried changing the type of each array element in fdisk to fd (linux
> raid autodetect.
> 
> The array is still not being recognised at boot, with the same 'cannot
> read superblock' error.
> 
> I also tried re-running mdadm --create /dev/md0 --level=5
> --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1
> I get the error
> mdadm: device /dev/sdb1 not suitable for any style of array.
> 
> What is going on here?

(I didn't read this whole thread, sorry if I'm repeating someone else's
advice)

kernel autodetection only works on old superblock version 0.90, you're
using 1.2. Not a big deal, we use mdadm to do it.

Define your arrays in /etc/mdadm.conf and start /etc/init.d/mdadm in
your boot runscripts with "rc-update add mdadm boot", it will bring up
the array at boot time.

In my mdadm.conf i have a line like this:

ARRAY /dev/md1 metadata=1.01 name=black:1
UUID=8e653e72:9d5df6ba:bb66ea8b:02f1c317

(might be word-wrapped, should be all one line)

That's all that was needed to bring it up automatically at boot time.

Also AFAIR there was a "gotcha" about the hostname stored in the array's
metadata must match your machine's hostname or else mdadm auto-assemble
won't accept it (to protect you in case you're plugging disks from
another machine for recovery, you don't want it to use them as your main
drives), so in that case you must specify it explicitly or set the AUTO
parameter in mdadm.conf to accept this condition. If you created the
array from within a LiveCD or on another machine, the hostname might not
match your system.

See the mdadm manpage for more info.

Reply via email to