# SiI 3112a RAID & Mounting NTFS partitions

## irasnyd

I've been looking around to see if it is possible to mount my windows partitions from my Silicon Image 3112 raid controller (onboard nforce2) in linux 2.6.

What I have is some windows partitions (ntfs) that I want to mount read only in linux.  They are on a SiI 3112a RAID controller (raid0, striped).

I've seen lots of things about setting it up with 2.4 and the medley driver, but I can't tell if it's possible with the 2.6 kernel yet, and I was unable to find a howto.

Here are the links I have found:

http://people.redhat.com/~heinzm/sw/dmraid/readme

http://tienstra4.flatnet.tudelft.nl/~gerte/gen2dmraid/

ftp://sources.redhat.com/pub/dm/patches/2.6-unstable/2.6.8.1/

From the first link, it states it needs a 2.6.7 kernel, which makes me think that this is possible.

In my kernel config (I'm using 2.6.8.1) I patched in the latest udm patch (they have a version for 2.6.8.1).  I also enabled the following things:

```

<*> SCSI device support

[*]   legacy /proc/scsi/ support  

---   SCSI support type (disk, tape, CD-ROM)  

<*>   SCSI disk support  

< >   SCSI tape support  

< >   SCSI OnStream SC-x0 tape support  

< >   SCSI CDROM support   

<*>   SCSI generic support

SCSI low-level drivers  --->

[*] Serial ATA (SATA) support

<*>   Silicon Image SATA support

[*] Multiple devices driver support (RAID and LVM) 

<*>   RAID support  

< >     Linear (append) mode  

<*>     RAID-0 (striping) mode  

< >     RAID-1 (mirroring) mode

< >     RAID-4/RAID-5 mode  

< >     RAID-6 mode (EXPERIMENTAL) 

< >     Multipath I/O support      

<*>   Device mapper support    

< >     Crypt target support       

< >     Snapshot target (EXPERIMENTAL)   

< >     Mirror target (EXPERIMENTAL)         

< >     Zero target (EXPERIMENTAL)          

< >     Multipath target (EXPERIMENTAL) 

< >     Flakey target

<*> ATA/ATAPI/MFM/RLL support

<*>         Silicon Image chipset support 

```

Here is the full   config.

I installed the device-mapper ebuild, as well as makeing and installing dmraid. (not in portage, I did it manually).

When I run dmraid, it tells me that it hasn't found any RAID volumes.

Thanks for any help I can get.

Ira

I should also note that I am using udev.  If this is a problem, I don't mind going back to devfs, but I don't know if I need to do anything other than boot to a devfs-enabled kernel, then remove udev, then reboot.

----------

## lwithers

dmraid and the kernel RAID drivers are for software RAID, not hardware RAID. So they won't work here. I'm not sure how to use the SiI3112 in "hardware RAID" mode (I have one here, and I'm just using it with software RAID). In fact, the card doesn't provide hardware RAID, the RAID is controlled by firmware/drivers (which is why the card is so cheap).

----------

## irondog

I'm using udev with no problems although I need to use the device tarball to have access to my root partition (on the raid array) at boottime.

It is important that /dev/mapper/control exists (provided by dm_mod, wich you have compiled in) when running dmraid.

If it does not exist, create it manually:

#mknod /dev/mapper/control c 10 63

/dev/sda and /dev/sdb should represend the underlying disks of your array (i.e. not /dev/scsi/blabla)

The raid0 module must be loaded:

#modprobe raid0

I compiled in all raid flavours, but I think your kernel configuration should be ok! It's not nessesary to patch the kernel with the udm patches unless you use raid1.

Activating should be done like this:

#dmraid -ay

----------

## irasnyd

Alright!  I've got it working.

My solution was to turn off udev (add gentoo=noudev to your kernel boot options).  I'll try turning it back on later, but I bet it will be fine, with it saving the device tarball.

So now I can access my 2 ntfs partitions with /dev/mapper/sil_0406333335531_p1 and /dev/mapper/sil_0406333335531_p5

This is wonderful.  Thanks so much.  I'm gonna write up a howto on this as soon as I get really good at understanding exactly what I need in the kernel, and exactly what userspace programs I need. (for example, test this without the udm patches)

Thanks again!

irasnyd

----------

## littleman

Yay, please a nice big juicy howto for noobs like me : )

That would be very much appreciated (and please start from the beginning ;p)

----------

## irondog

 *irasnyd wrote:*   

> I'll try turning it back on later, but I bet it will be fine, with it saving the device tarball.

 

What I did is unpacking the device tarball and add the devices I needed. I repacked it and replaced the old one.

----------

## littleman

is there a step by step guide to set this up somewhere ?

----------

## irasnyd

I'm working on it.

The short version is:

Install a 2.6 series kernel.

Build in support for scsi, scsi sata support (under low level drivers) and scsi silicon image support. In the raid & lvm part, build in support for device mapper.  You do not need raid support.

Reboot into the kernel, which should detect the sata drives as scsi drives.  

Installl device-mapper:

```
emerge device-mapper
```

Install dmraid from [url="http://people.redhat.com/~heinzm/sw/dmraid/src/"] here[/url].

When installing dmraid, run:

```

./configure

make -s

make install -s

```

Run "dmraid -s" to detect the drives, then "dmraid -ay" to activate them.  The new devices will be in /dev/mapper/.  They should be named sil_xxxxxxxxxxxxx_pX, where the x's are numbers, and the X is the partition number.

Now you can mount like normal, using these devices.

(I have only used this to mount windows drives, but it works great)

----------

## littleman

YaaaaaaaAAAAAaAAY ! It works : ) Simple & efficient mini-howto, thanks a lot !

----------

## littleman

now how do I make that start automagically at bootup ?

----------

## irondog

From a ramdisk (an initrd):

http://tienstra4.flatnet.tudelft.nl/~gerte/gen2dmraid/

----------

