# Silicon Images 3112a and RAID0 help please?

## Finaldo

I am trying to get Linux to see my RAID0 array that I've created with my Silicon Images 3112a onboard controller, but it just sees them as two separate hard drives.

I tried the suggestions in this thread, but to no avail.

Here's my hardware:

Asus A7N8X Deluxe

Silicon Images 3112a SATA Controller (onboard)

AMD XP 2800+

Western Digital Raptor 34GB 10,000RPM (two of them)

I am booting from the "Gentoo 2006.0 Minimal CD" (x86) and trying to get Linux to see the drives in the RAID0 configuration that I set through the SI3112a controller's BIOS, but it sees the hard drives separately.  Has anyone else messed with this recently?  There should be something I'm missing, but since those guys in the thread I mentioned above got RAID working without mdadm, I would figure I should be able to do it too?

Any help or direction is greatly appreciated!

----------

## jmbsvicetto

Hi.

The SIL3112 is a fake RAID controller. Instead of using mdadm, you should look at dmraid.

----------

## Finaldo

 *jmbsvicetto wrote:*   

> Hi.
> 
> The SIL3112 is a fake RAID controller. Instead of using mdadm, you should look at dmraid.

 

I took your advice and looked at dmraid, it does what I need it to do... but there's one problem.

I followed the HOWTO for dmraid and fake RAID controllers located here, following things to the letter, but my GRUB installation isn't right.

In particular, I followed these steps for installing GRUB:

 *Quote:*   

> emerge grub
> 
> emerge dmraid
> 
> emerge genkernel
> ...

 

I was able to set up GRUB properly and get it installed on the MBR, but when GRUB goes to boot to Linux, I get an error about how it can't locate my root device.  Here's my grub.conf:

 *Quote:*   

> title Gentoo Linux
> 
> root (hd0,0)
> 
> kernel /kernel-genkernel-2.6.17-gentoo-r4 root=/dev/ram0 init=/linuxrc real_root=/dev/mapper/sil_agaidcbhbdfc3 dodmraid
> ...

 

The thing is, I don't see anything in the howto about setting up a ramdisk, and in /boot there is no "linuxrc file.  That looks like something that should've been done by genkernel, going by what the HOWTO says.

Anyone have any ideas?  When I get home tonight and can get my exact error, I'll update this post...

----------

## Finaldo

The error that I'm getting is:

```
!! The root block device is unspecified or not detected.

   Please specify a device to boot, or "shell" for a shell...
```

I know this has to do with the ramdisk not being set up properly, or at least that is what I've gathered from similar posts.  I'm just not able to put the last piece in place to figure out what I did wrong.

Any ideas, anyone?  That dmraid howto that I linked earlier is pretty easy to follow.  I don't think I missed any steps...

----------

## jmbsvicetto

You need to post the exact output and include a few more lines before the error. Also, try to check if the kernel detects the SIL controller and initializes the array.

----------

## Finaldo

 *jmbsvicetto wrote:*   

> You need to post the exact output and include a few more lines before the error. Also, try to check if the kernel detects the SIL controller and initializes the array.

 

It loads a bunch of modules (I can't really copy/paste the info because it's not in dmesg, I'm not sure where else that console output is saved) including sil_sata, and then it says something very close to:

```
Activating mdev

Activating device-mapper to detect raid arrays

!! The root block device is unspecified or not detected.

   Please specify a device to boot, or "shell" for a shell...
```

If you can tell me where I can find a log of the modules that it's loading, I can post all that info for you.

I really appreciate you helping me look into this.  I went through the HOWTO again, and it doesn't look like I did anything wrong.  I also downloaded the linuxrc from the howto so that GRUB could access it (with the "init=/linuxrc" parameter in the kernel line in my grub.conf) but I still haven't gotten any better results.

I messed around with the grub.conf a bit...  This may sound dumb to you but since I'm a bit of a novice and don't mind breaking my install, I tried using the initramfs-genkernel-blahblah file as my kernel, and of course it went into kernel panic after I booted.  I also tried taking the initrd line out of the grub.conf, and it didn't get very far there either.

That makes me think that GRUB is able to get to my boot partition to read the kernel and initrd that genkernel made for me, but it can't get to my root or real-root to finish booting the system.  I definitely have the dodmraid boot parameter on my kernel line in grub.conf, so I'm completely at a loss why it won't boot.

----------

## jmbsvicetto

Have you read this thread?

----------

## NeddySeagoon

Finaldo,

fakeraid (dmraid) is a bad thing for lost of reasons. The only reason for using it over kernel raid is that Windows must share (or be able to access) the raid set.

Gentoos version of dmraid is/was 1.0.0-rc8 last time I looked. That works with kernels up to and including 2.6.15. At 2.5.16, a kernel bug was fixed that needs dmraid-1.0.0-rc11 or later.

The thread that jmbsvicetto poinred out shows how to use a later dmraid (and a later kernel.

/boot only needs to contain the kernel and the initrd file. The initrd file is a miniture root filesystem in a file. Its used as a home for modules needed to mount the real root filesystem, including dmraid.

The /linuxrc is inside the initrd, not in boot, so thats not a problem.

dmraid is a Bad Thing - consider switching to kernel raid, if thats an option for you.

I have the same motherboard as you and that what I use.

----------

## Finaldo

Thanks for the input guys.  It looks like I have two different options, upgrading dmraid, or going with kernel RAID.

NeddySeagoon, are there any HOWTOs you used to set up your machine?  If kernel RAID is the way to go with the A7N8X, then I am fine rebuilding my system.  This machine is a Gentoo-only router that I'll be messing around with other stuff (some web development, java, etc) so there's no problem with starting over.  I had just read that I either needed to use mdadm or dmraid to do RAID0.  I looked through the kernel but nothing jumped out at me for getting it going with that method.  Any input on this is much appreciated!  Do you use genkernel or do you build it "by hand"?

Hopefully I'll have this up and running, and I'll have you guys to thank.  :Smile: 

----------

## neysx

Try http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml

Hth

----------

## Finaldo

 *neysx wrote:*   

> Try http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
> 
> Hth

 

This looks really easy to set up...  Will it still work with my software raid controller?  the Silicon Images 3112a?  This looks much more configurable than dmraid.

----------

## NeddySeagoon

Finaldo,

You ignore your RAID controller - turn its RAID features off.

Kernel raid requires that you make partitions on the base drives and contribute the partitions to raid sets, so you can have both raid0 and raid1 on the same pair of drives - just as well, /boot needs to be RAID1 or grub won't work.

I used raidtools, since I wasn't aware of mdadm its an older tool for doing the same thing. Also I migrated my install from a single 160Gb IDE drive to a pair of 300Gb SATA drives. The setup neysx pointed you to looks good.

Do keep an electronic copy of your mdadm.conf (or whatever mdadm callis it) it will be needed to get the raid systems started in the event that your system does not boot first time. You can retype it if needed.

----------

## Finaldo

 *NeddySeagoon wrote:*   

> Do keep an electronic copy of your mdadm.conf (or whatever mdadm callis it) it will be needed to get the raid systems started in the event that your system does not boot first time. You can retype it if needed.

 

That is what's holding me back.  I configured everything following the quick install guide that neysx linked, and went to reboot and of course, it went into kernel panic because it can't find the root device.  I compiled raid0, raid1, and devicemapper into the kernel, but I am not sure where to put the mdadm.conf file and how to make sure it gets read when GRUB boots the system.

I've been looking around a little bit, but I'm at work so I haven't spent too much time on it.

I set up my partitions so that /boot is RAID1, swap is split between the two drives (no raid since swap is striped automatically), and / is RAID0.  I'm so close to having everything set up, hopefully this is the last step.  :Smile: 

Thanks again for all your help, everyone.

----------

## NeddySeagoon

Finaldo,

The mdadm.conf is not read at boot time.

The kernel forms the raid sets because the partition type for raid is 0xfd - you did set that with fdisk ?

```
   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1           5       40131   fd  Linux raid autodetect

/dev/sda2               6         130     1004062+  82  Linux swap / Solaris

/dev/sda4             131       36483   292005472+   5  Extended

/dev/sda5             131         739     4891761   fd  Linux raid autodetect
```

All the information it needs is in the persistant superblock

----------

