# Software RAID5 problems [SOLVED]

## ctav01

I've got an IDE hard drive that I'm booting off of and 4 SATA drives setup in a RAID5.  Everything seemed to be working in the 2.6.17 kernel but I upgraded to 2.6.20-r8 to try and fix a sound driver problem I'm having and my RAID5 went bye-bye.

 *Quote:*   

> 
> 
> # cat /etc/mdadm.conf
> 
> # mdadm configuration file
> ...

 

 *Quote:*   

> 
> 
> # cat /proc/mdstat
> 
> Personalities : [raid0] [raid1] [raid10]
> ...

 

 *Quote:*   

> 
> 
> # mdadm --detail --scan
> 
> ARRAY /dev/md0 level=raid5 num-devices=4 UUID=caf566b6:70af8e3e:1d8c8a89:78bbe66e
> ...

 

 *Quote:*   

> 
> 
> # dmesg | grep md0
> 
> md: md0 stopped.
> ...

 

I double-checked the kernel and made sure EVERYTHING under Multi-device support (RAID and LVM) was starred (not just modules).

When I use Webmin to look at the Linux RAID under Hardware, it shows /dev/md0 as a RAID5 and the following detail:

 *Quote:*   

> 
> 
> Device file 	/dev/md0
> 
> RAID level 	Redundant (RAID5)
> ...

 

Any suggestions?Last edited by ctav01 on Thu Jun 28, 2007 2:07 am; edited 2 times in total

----------

## mudrii

check the compiled Kernel from 2.6.19 Kernel have new drivers for ATA and SATA drivers.

----------

## ferg

Try reassembling the Raid device.

```
mdadm --assemble /dev/md0 [/dev/sd[abcd]1
```

Does it assemble OK? I guess it probably does.

Another minor tip which may be the culprit is to ensure all the partition types of the devices are set to FD.

Good luck.

Cheers

Ferg

----------

## ctav01

Thanks mudrii, I don't think the problem's in the drivers.  mdadm seems to see all four of my SATA drives.

Thanks too to ferg but it didn't work.

 *Quote:*   

> 
> 
> # mdadm --assemble /dev/md0 [/dev/sd[abcd]1
> 
> mdadm: device /dev/md0 already active - cannot assemble it
> ...

 

----------

## lagalopex

 *ctav01 wrote:*   

>  *Quote:*   
> 
> # dmesg | grep md0
> 
> md: md0 stopped.
> ...

 

So the array was running, but was stoped... post some more (no grep) of dmesg...

Some more infos...

```
mdadm -D /dev/md0
```

Restart the array... might not work...

```
mdadm --run /dev/md0
```

----------

## ctav01

 *Quote:*   

> 
> 
> # dmesg
> 
> Linux version 2.6.20-gentoo-r8 (root@livecd) (gcc version 4.1.2 (Gentoo 4.1.2)) #1 SMP Wed May 30 14:06:41 PDT 2007
> ...

 

 *Quote:*   

> 
> 
> # mdadm -D /dev/md0
> 
> /dev/md0:
> ...

 

 *Quote:*   

> 
> 
> # mdadm --run /dev/md0
> 
> mdadm: failed to run array /dev/md0: Invalid argument
> ...

 

Am I reading the last line of dmesg correctly, it's saying that the RAID5 driver isn't loaded?  But I triple-checked the kernel and the RAID4/5/6 driver is checked (not module).

And what's with the "Treason uncloaked"?

Thanks for the help.

----------

## tnt

AFAIK, 

 *Quote:*   

> # cat /proc/mdstat
> 
> Personalities : [raid0] [raid1] [raid10]
> 
> md0 : inactive sda1[0] sdd1[3] sdc1[2] sdb1[1]
> ...

 

 *Quote:*   

> Personalities : [raid0] [raid1] [raid10]

 

shows that raid5 module (driver) is not loaded. maybe you should try some 2.6.21-rX kernel...

----------

## ferg

 *tnt wrote:*   

> AFAIK, 
> 
>  *Quote:*   Personalities : [raid0] [raid1] [raid10] 
> 
> shows that raid5 module (driver) is not loaded. maybe you should try some 2.6.21-rX kernel...

 

Well spotted, and boo hiss to myself for missing that!!!

Perhaps go into the existing kernel sources, check that it is configured.  

```
 grep -i raid /usr/src/linux/.config

```

should have this line:

```
CONFIG_MD_RAID456=y

```

if not compile it as a module, insert the module and then restart the Raid device.

Good luck

Ferg

----------

## ctav01

 *Quote:*   

> 
> 
> # grep -i raid /usr/src/linux/.config
> 
> CONFIG_RAID_ATTRS=m
> ...

 

Well, nuts!

----------

## ferg

Well that shows that at least the raid5 module is being loaded.  Well not actually loaded as it's part of the kernel.

Cheers

Ferg

----------

## mudrii

recompile the kernel with raid as module not in kernel and try to load it manualy with modprobe.

did you try to boot from liveCD and access the RAID from LiveCD ?

----------

## ctav01

Gah!  I hate it when I do something stupid.  My grub.conf was pointing to the wrong kernel, that's why the recompile didn't fix anything.  Sorry.

----------

## ferg

Haha.   We all do something stupid every now and again!!!  But we learn from our mistakes.!

Cheers

Ferg

----------

