# Silraid (medley raid) WORKING NOW WITH INSTRUCTIONS

## Daniel_walmsley

Hi i have noticed that many people out there are haveing problems with useing the silraid module. 

I too have been un able to get them going.

I have a freind with an identical raid card useing the cmd0680 chipset both of us can use our cards fine under the windows driver, however in linux useing the silraid drivers i get "no raid aray found" aand when i modprobe or insmod silraid i get an error msg saying the hard ware cannot be found possible irq confilcts. 

but my freind can run his raid fine in fact his raided drives on my card in his or my computer work fine. So my initial respons to that was it must be my drives so i whent out and brought two identical 40gig seagate baracuda 7200.7's and no luck what is going on here.

my freind is useing two seagate drives 80gig each one is a bara 5 the other is a bara 7200.7.

from what i have seen the only way people on this form have found to get around this is to use software raid and in my opinion that is an unacceptable alternative as i have spent good monye on a card that has partial hardware raid so i can boot off of it.  :Crying or Very sad: 

Please some one help pleaseLast edited by Daniel_walmsley on Mon Sep 01, 2003 2:25 am; edited 1 time in total

----------

## taskara

unfortunately the driver just sux under linux atm.

tho you may want to look here

----------

## Moled

did you ever get that working taskara?

I just gave up on it due to sucky performance and just used the intel controller that I have instead  :Neutral: 

----------

## taskara

lol, hey how u doin!?

nah I never got it to even work.

apparently someone has, and the performance was good.... but I don't know.

either way I have sold my athlon system, and am thinking of trying a p4

which I may ask you - what is a good system?

can u check out my post here?

that would be great  :Very Happy: 

----------

## boltronics

I too can confirm that the medley patch works fine, where the silraid refused to detect my RAID0 array.

I have tried this patch on 2.4.21 and 2.4.22. It doesn't apply correctly without modification, so split the patch file into two files. File one should look like this:

```

diff -u -r -N linux-2.4.22-pre9.orig/Documentation/Configure.help linux-2.4.22-pre9/Documentation/Configure.help

--- linux-2.4.22-pre9.orig/Documentation/Configure.help   2003-07-31 23:12:00.000000000 +0100

+++ linux-2.4.22-pre9/Documentation/Configure.help   2003-08-01 20:51:00.000000000 +0100

@@ -2001,6 +2001,24 @@

   If you choose to compile this as a module, the module will be called

   hptraid.o.

 

+Medley Software RAID (CMD/Silicon Image)

+CONFIG_BLK_DEV_ATARAID_MEDLEY

+  Say Y or M if you have a Silicon Image 3112 SATA RAID controller,

+  a CMD680 based controller, or another IDE RAID controller that uses

+  Medley software RAID, and want linux to use the softwareraid feature

+  of this card.

+

+  This driver uses /dev/ataraid/dXpY (X and Y numbers) as device

+  names.

+

+  If you choose to compile this as a module, the module will be called

+  medley.o.

+

 Support for Acer PICA 1 chipset

 CONFIG_ACER_PICA_61

   This is a machine with a R4400 133/150 MHz CPU. To compile a Linux

```

The second file will contain all the rest. Applying the above will warn that the end of the patch is in an incorrect format or something, but it will work successfully. The second file will patch everything else without error.

For everyone having difficulty with the silraid controller, I highly recommend giving this patch a spin.

----------

## gmichels

Same here, silraid driver didn't work, medley driver worked (manually applied the patch) in gss-sources.

----------

## Teardrop

hey guys

it is all very helpfull that you say the medley drivers works an that you post the diff but WHY doens't anyone answer THE question: how do i applay this patch to the kernel? I and some other noobs have asked it several times and never got an answer... Anybody here to share his knowledge with us?

thx a lot

ps: please don't say... ooo, that easy, just use 'patch' .... give us the whole command line please!

----------

## taskara

 *Teardrop wrote:*   

> hey guys
> 
> it is all very helpfull that you say the medley drivers works an that you post the diff but WHY doens't anyone answer THE question: how do i applay this patch to the kernel? I and some other noobs have asked it several times and never got an answer... Anybody here to share his knowledge with us?
> 
> thx a lot
> ...

 

here here! help some noobs out!  :Wink: 

----------

## trooper82

I have been trying to get this to work for going past 24 hours now. I  have had no luck, tried everything I can find that others say works.  I just bought a second Raptor so I could raid0 on my  Asus A7N8X, just to find it doesn't work. I have tried the rc4 iso's, never sees my raid. I would love to know what bios settings are being used by others that have this working on my board. 'cat /prc/pci' shows almost everything is sharing irq's so this may be my issue. The Mandrake 9.1 rescue method, adding the makedev script did not work. 1.4 final doesn't work. I even tried the knopix cd, not working. If someone has been able to make a custom livecd that works, why not have it put on the mirrors, under experimental, then those of us that do not know how to make one, can download it. Better yet, give me a pm with a link to it  :Smile: 

If I have missed something, please point me in the right direction.

----------

## Daniel_walmsley

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:  Thanks guys problem fixed!!!  :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

One down side tho how do u make a live cd with the medley patch in the kernal.

For thoes of you that dont know how to patch youre kernel here are some step by step instructions:

1) Download the Thomas Horstens patch from                                            http://lkml.org/lkml/diff/2003/8/1/154/1

2) Read the diff file on the web site where it seiz diff it points to the file that needs to be patched 

```
diff -u -r -N linux-2.4.22-pre9.orig/Documentation/Configure.help linux-2.4.22-pre9/Documentation/Configure.help

--- linux-2.4.22-pre9.orig/Documentation/Configure.help   2003-07-31 23:12:00.000000000 +0100

+++ linux-2.4.22-pre9/Documentation/Configure.help   2003-08-01 20:51:00.000000000 +0100

@@ -2001,6 +2001,24 @@

```

The lines with the --- are pointing to the bits to beremoved

so if you see a line with - in front of it is to be removed from the file that was pointed to by the ---

The lines with the +++ are pointing to the bits to be added 

so if you see a line with + in front of it is to be added from the file that was pointed to by the +++

each part of the file that seiz diff is pointing to a new file to do this to it 

BTW medley.c is a compleatly new file you must create. 

3) complie ure kernel and under ata/ide bit include as part of the kernel the silicon image chipset support and the new raid bit at the bottom

AND THANX TO Thomas Horsten FOR CREATING THIS PATCH

and cheres to narr for showing me how to get this working

----------

## Teardrop

puuuh. tough piece of work. gonna try it tonight. thx for your info.

cu Teardrop

----------

## trooper82

Daniel_walmsley,

Thanks for wording so that us common folk could understand. 

I was able to get this done using your help, from an existing install on my machine. 

Now i just need to figure out how to load everything (install stage1)to the raid.

----------

## Narr

The way I did Daniel_walmsleys install was to boot to my existing install using a new kernel with the medley patch. Then create the partitions I wanted on the raid using

```
fdisk /dev/ataraid/disc0/disc

```

then created a dir /mnt/gentoo and followed the install instructions from there

i.e 

```
mount /dev/ataraid/disc0/part3 /mnt/gentoo

mkdir /mnt/gentoo/boot

mount /dev/ataraid/disc0/part1 /mnt/gentoo/boot

cd /mnt/gentoo

```

mount the live cd and extract the stage you want

```
cd /mnt/gentoo

mount /mnt/cdrom

tar -xvjpf /mnt/cdrom/gentoo/stage1*

```

and then chroot to the new install as the install guide says and follow the guide from there.

Hope this helps

BernieKe has a good how to with regards to seting up lilo and fstab here https://forums.gentoo.org/viewtopic.php?t=7460

Here is a breif extract

 *BernieKe wrote:*   

> A Hardware RAID install howto
> 
> in fstab: use the /dev/ataraid/disc0/partX notation
> 
> instead of grub, i suggest using lilo
> ...

 

----------

## raphae24

Hello, 

thanks for your advices how to use the medley patch by Thorsten..

But I'm a linux beginner and would need some more detailed informations.

I downloaded the final gentoo 1,4 athlon version and I want to install it. 

So, could you post a short guidance, maybe a little detailed, how to install and use this medley patch ?

What to do, after the gentoo cd boots ? 

Which kernel and parameters do I need ? 

Thank you in advance. Many greetings, Raphael

----------

## Narr

Sorry but the only way I could get this to work is do a quick stage three install (don't bother with the emerge -u system) on a spare disk preferably using the mobo ide.

When it comes to installing the kernel add the patch, then do the make menuconfig.  When the install is finished then boot into it and your raid array should be available to do a full install on following the instructions with the minor changes I have stated above.

If anybody has a easyer/better way I would like to know as doing 2 installs is  a bit long winded.

The sources I have tried are the Vanilla-sources(2.4.22) and gaming-sources(2.4.20 I think) so any 2.4.2x version kernel should work

----------

## Teardrop

can't compile the new kernel with the patch. i get an 'undefined reference to 'get_info_ptr' ' in the function 'medley_get_metadata' (drivers/ide/idedriver.o)

any idea what i could do?

using ac-sources-2.4.22-rc2-ac3.

thx

cu Teardrop

PS: am i right to assume that i have to delete the entire contents of silraid.c and silraid.h?

----------

## Narr

teardrop

I will have a play with the kernel u tried.

And yes silraid.c and silraid.h are to be deleted

EDIT:-

I have found that the function get_info_ptr has been changed to ide_info_ptr in the ac-sources.

I will have a play with this when I get time.

----------

## Teardrop

thx 4 the info. please keep me informed. i just tried the vanilla-sources and the patching worked well but the patched kernel still sucks and my computer freezes with 2 SATA-Drives.

cu Teardrop

----------

## Narr

I have had a play with the source code with some success,  but cant test it as I dont have the raid array.

If you are willing to try it then you have to make a small change to medley.c

Find the line

```
   ide_drive_t *drvinfo = get_info_ptr(dev);
```

(line 387)

and change it to

```
  ide_drive_t *drvinfo = ide_info_ptr(dev,0);
```

WARNING THIS IS UNTESTED SO BACKUP ANY DATA ON YOUR RAID ARRAY

----------

## trooper82

I finally got around to trying the change suggested by  narr, I have the same issue with the SATA drives turning to ice when data is written to them, locking things up tight. Here is what I got.....

```
drivers/ide/idedriver.o(.text+0x1ef53): In function `medley_get_metadata':

: undefined reference to `ide_info_ptr'

make: *** [vmlinux] Error 1

```

when I tried to compile my kernel ( ac-sources - linux-2.4.21-rc7-ac1)

I got the patch working inside my current enviroment before, without that one line change, but as I said, it slowed the system to a crawl when I tried to run the stage1xxxxx.tar.bz2 from it. I am using 2 WD Raptors in Raid0 configuration.

----------

## Teardrop

does anyone of you know with SATA controller work under linux? they don't have to be raid bc i will do a softraid 1.

thx

cu Teardrop

----------

## Teardrop

sorry. double post. problems with mozilla.Last edited by Teardrop on Sun Sep 14, 2003 8:06 pm; edited 1 time in total

----------

## Teardrop

sorry. double post. problems with mozilla.Last edited by Teardrop on Sun Sep 14, 2003 8:12 pm; edited 1 time in total

----------

## Teardrop

sorry. double post. problems with mozilla.

----------

## taskara

go mozilla

----------

## Zodiac

After patching the kernel (2.4.22-gentoo-sources) I get the fallowing error:

medley.c: in function 'medley_get_metadata'

medley.c:429 structure has no member named 'capacity'

medley.c:451 structure has no member named 'capacity'

and compiler quits.

Why does it occur? I'm compiling kernel in chrooot from livecd (gentoo release 1.4).

----------

## Teardrop

switch to the new 2.6 kernel in mm-sources or gentoo-dev-sources the work very well with the sil.

cya Teardrop

----------

## taskara

 *Teardrop wrote:*   

> switch to the new 2.6 kernel in mm-sources or gentoo-dev-sources the work very well with the sil.
> 
> cya Teardrop

 

mm-sources you say teardrop?????  :Wink:  hehe

----------

## Teardrop

jep. they seem to work well for everyone (except me) so he should give it a try. the gentoo-dev-sources work (for me too).

smile @ taskara

cu Teardrop

----------

## Zodiac

Are you sure? I'm using RAID 0 and from what I've heard there is no support for si3112 RAID in 2.6 kernel.

----------

## taskara

 *Zodiac wrote:*   

> Are you sure? I'm using RAID 0 and from what I've heard there is no support for si3112 RAID in 2.6 kernel.

 

There is no "hardware" silicon image support in ANY 2.6 kernel.

but there is good sata support, if you are using linux software raid.

----------

## Zodiac

I need this "hardware" support becouse I have also Windows installed.

The problem was that 2.4.22-gs are using 64bit LBA, and Medley driver works only with 32bit. Which sources should I ise?

----------

## taskara

 *Zodiac wrote:*   

> I need this "hardware" support becouse I have also Windows installed.
> 
> The problem was that 2.4.22-gs are using 64bit LBA, and Medley driver works only with 32bit. Which sources should I ise?

 

not sure.. at a guess I would say ck-sources

----------

## cenotaph

looks as if the lexan

```
capacity
```

is now defined as

```
capacity64
```

after the many patches gentoo-sources has applied

so, my solution is to rename the references to 

capacity with capacity64 within medley.c

i have tried this and works so far with gentoo-sources-2.4.22-r5

back up your data if you care for it.

it looks though that this part of thomas' code is isnt very important

----------

## t0mcat

i use vanilla-sources 2.4.25, patched with thomas horsten's patch ( http://www.infowares.com/linux/ ), and my sil3112a with "hardware" raid-0 works fine; even very good transfer rates.

waiting for the 2.6 patch, until then i'll be using 2.4.25.

the 2.4.x patch works only with vanilla-sources, not with gs/gentoo/gaming either any other custom sources. (since u dont try the 64-32bit trick above, i havent tried it so dunno)

u can also download the medley.o module, insmod it from a live cd, and bootstrap directly in your raid partition. then emerge vanilla-sources, patch with the latest horsten's work ( v6 i guess, 2.4.23 tested, but it works with any 2.4.x ), complie the kernel with built-in ataraid and medley drivers, and everything will be sweet.

hope i helped s.o. , i had to search for many days to get the trick.

----------

## Deathmaker

 *t0mcat wrote:*   

> i use vanilla-sources 2.4.25, patched with thomas horsten's patch ( http://www.infowares.com/linux/ ), and my sil3112a with "hardware" raid-0 works fine; even very good transfer rates.
> 
> waiting for the 2.6 patch, until then i'll be using 2.4.25.
> 
> the 2.4.x patch works only with vanilla-sources, not with gs/gentoo/gaming either any other custom sources. (since u dont try the 64-32bit trick above, i havent tried it so dunno)
> ...

 

Hi

I use the Kernel linux-2.4.25-gentoo-r2 with the medley patch ...

I don't have the problem described above (the error messages) ..

but it says no raid array found ...

Is that because I use the gentoo kernel or is it another problem ..

Thanks ..

----------

## irondog

Maybe you have selected the wrong ataraid driver. You should have cmd/silicon image medley raid selected in the kernel config (medley.o and not silraid.o).

This is the right one:

CMD/Silicon Image Medley Software RAID (EXPERIMENTAL)

I'm not sure if 2.4.25-gentoo-r2 contains the right patch, I think it does so you don't have to patch it yourself. (I can't check it here, sorry)

2.4.25-gentoo-r2 appeared in portage when 2.4.26-pre6 was deleted. I have been using 2.4.26-gentoo-pre6 and didn't need to patch the source myself.

Refer to my howto, I'll keep this thread up-to-date (2.6 support is coming):

https://forums.gentoo.org/viewtopic.php?t=161388

----------

## Deathmaker

I use the medley driver and have set it too debug mode ...

the output in dmesg is :

Probing 21:00

Probing 22:00

Medley RAID: No usable RAID sets found

I have searched and tried alot but i didn't get it to work ...

Maybe you can help me here ..

Thanks ..

----------

