# sata_via

## MishY

Hi,

I have an Asus A8V Deluxe mobo which has a VIA SATA controller on it.

I have 2 WD Raptor 36Gb SATA drives.

I want to use RAID 0.

I currently have RAID setup on this system using md, however for simplicities sake (and to see if its possible) I would like to install Gentoo by having the BIOS of the onboard controller form the RAID, so that I do not have to use md.

With the SATA_VIA driver that is in the 2.6.X kernel - can it detect a RAID formed in the controller BIOS ? or does the driver provide a method of simply detecting the drives ?

Also, is there a way to get the drives supported as UDMA150 rather than UDMA133 (which is wrong) ?

Thanks

dmesg | grep ata

Bootdata ok (command line is root=/dev/md2)

BIOS-e820: 000000001ffb0000 - 000000001ffc0000 (ACPI data)

Memory: 509096k/523968k available (2977k kernel code, 0k reserved, 1233k data, 236k init)

libata version 1.02 loaded.

sata_via version 0.20

sata_via(0000:00:0f.0): routed to hard irq line 10

ata1: SATA max UDMA/133 cmd 0xD000 ctl 0xC802 bmdma 0xB800 irq 185

ata2: SATA max UDMA/133 cmd 0xC400 ctl 0xC002 bmdma 0xB808 irq 185

ata1: dev 0 cfg 49:2f00 82:3469 83:7f21 84:4003 85:3469 86:3e01 87:4003 88:407f

ata1: dev 0 ATA, max UDMA/133, 70312500 sectors: lba48

ata1: dev 0 configured for UDMA/133

scsi0 : sata_via

ata2: dev 0 cfg 49:2f00 82:3469 83:7f21 84:4003 85:3469 86:3e01 87:4003 88:407f

ata2: dev 0 ATA, max UDMA/133, 70312500 sectors: lba48

ata2: dev 0 configured for UDMA/133

scsi1 : sata_via

ReiserFS: md2: using ordered data mode

----------

## alv

I am not sure if the driver has the ability or not...but I would like to mention that there is a special partition type called Software Raid Auto-Detect which is what triggers the drivers to look up the raid information. You will still end up using md devices though, all the BIOS does is keep you raid settings. I personally do not trust the BIOS and simply have grub send the appropriate kernel parameters. 

Sorry for not being much help.

----------

## MishY

Thanks for your reply alv  :Smile: 

I have raid autodetect setup right now as a software raid, but just kinda wondered whether the via sata drivers in the kernel could support the raid controller BIOS setup. Figured because VIA actually write drivers for Linux that the facility might exist.

Nevermind.

I would however love to get UDMA150 working on my drives.

I have a very fast system that in windows would shred - however I don't want to use Windows :-/

----------

## alv

I am slightly confused by what you are talking about.....

AFAIK the standard VIA SATA RAID is not a hardware raid. What that means is that the OS still performs the RAID functions. Even in windows, the RAID is done in drivers, usually the drivers provided by VIA. The controller does not usually provide any additional features. Linux has a unified software RAID architecture, which is independent of the controller (but if the controller does provide extra features then they would be exposed thorugh the controllers drivers to md).

So I think that you have done everything correctly, and you have squeezed out the most you can out of a raid setup. The UDMA/150 however is another interesting point. I just checked my setup, and it is not running at 150 either, so I am wondering if it is an issue with driver autodetection, or a misconfig. Whatever it is -- if the setup is running much slower than it does in Windows, then this is probably the problem..... Quick search on google has not revealed any tweaking....and hdparm does not touch SATA  :Sad:     (maybe that is a good thing) so I will probably end up looking through the sata_via driver to see if there is a kernel option that it takes to run at 150.

I will post if I find anything.

----------

## MishY

Thanks alv, and I totally take your point about Linux and raid. I dunno why, but I just wanted to see if the VIA drivers worked like that - I am very new to Linux raid.

I currently have 2 raptors in RAID1 /boot RAID1 /

and this is my hdparm:

hdparm -Tt /dev/md2

/dev/md2:

 Timing cached reads:   3140 MB in  2.00 seconds = 1568.67 MB/sec

 Timing buffered disk reads:  178 MB in  3.03 seconds =  58.72 MB/sec

Re: the udma150 I am just thinking that my drives should be able to run at a faster speed than that. I am planning on a reinstall in a few days and will convert to RAID0 instead of RAID1. I may also try out reiser4.

I also couldn't find anything about changing up to udma150. I too will post anything if I come across it  :Smile: 

Thanks again for your help

----------

## alv

Just in case I will post the size of my^W^W^W speed of my drives as well....

Raid0 on a 7200RPM caviars on a VIA integrated:

0000:00:0f.0 RAID bus controller: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80)

hdparm -tT /dev/md1

/dev/md1:

 Timing cached reads:   4620 MB in  2.00 seconds = 2308.04 MB/sec

 Timing buffered disk reads:  272 MB in  3.00 seconds =  90.59 MB/sec

Raid1 on the equivalent drives on a Promise TX4:

0000:00:0d.0 Unknown mass storage controller: Promise Technology, Inc. PDC20318 (SATA150 TX4) (rev 02)

hdparm -tT /dev/md2

/dev/md2:

 Timing cached reads:   776 MB in  2.00 seconds = 388.00 MB/sec

 Timing buffered disk reads:  152 MB in  3.02 seconds =  50.33 MB/sec

Actually as far as my VIA SATA.... I would not be surprised if 133 is as fast as mine can go:

dmesg output:

sata_via(0000:00:0f.0): routed to hard irq line 11

ata1: SATA max UDMA/133 cmd 0xB000 ctl 0xB402 bmdma 0xC000 irq 20

ata2: SATA max UDMA/133 cmd 0xB800 ctl 0xBC02 bmdma 0xC008 irq 20

Which naturally makes sense.... RAID1 has about half the reading speed...so my TX4 would do about 100MB/sec in RAID0...which is faster than what my via does.....And your raptors will do approximately 120 MB/sec....which also sounds about right.

----------

## MishY

alv,

Is that the Asus A8V motherboard you're using ? If so, me also.

Did the LiveCD you have support your promise sata raid controller ? If so, was it modprobe sata_promise ?

Thanks

----------

## alv

 *MishY wrote:*   

> alv,
> 
> Is that the Asus A8V motherboard you're using ? If so, me also.
> 
> Did the LiveCD you have support your promise sata raid controller ? If so, was it modprobe sata_promise ?
> ...

 

I am not sure if it is A8V or SK8N....one of those, too lazy to check which one.

I hope you noticed that the above were on two separate computers. via on a fast one, promise on the slow one.

I had LiveCD support all of my machines, but I think I had to pass the doscsi flag, and whatever does not run the probing, but does run hotplug.

Interesting enough is that the machine that runs promise runs on a gentoo-sources 2.4.26. The vanilla kernel does not have promise sata IIRC, but gentoo sources does. And yes, the module is called sata_promise...but I always compile in all the SATA stuff for the install so that I avoid the need for initrd.

----------

## bytter

Ok, I'm getting confused here...  :Smile: 

I've got an Asus A8V Deluxe. 2x120 SATA on VIA controller RAID0. WindowsXP is installed on first partition. Made two more partitions for linux using Partition Magic.

After loading sata_via module, i've got /dev/sda, /dev/sda1, /dev/sda2, /dev/sda3 and /dev/sdb. Obviously, it didn't detected my RAID0 setup. I want to use partition 2 and 3 for linux (Without f****** my data on the first partition).  What are the correct procedure to get this working by using a Gentoo LiveCD?

Thanks in advance!

Hugo Ferreira

----------

## desertstalker

It can be done check toe forums for info on dmsetup.  Unfortunatley the easiest solution (dmraid) does not, currently, support VIA raid metadata.

Still it is possible using dmsetup, but much more compex.

Hope you get it to work. :Very Happy: 

----------

## wryoung98

 *Quote:*   

> 
> 
> Ok, I'm getting confused here... Smile
> 
> I've got an Asus A8V Deluxe. 2x120 SATA on VIA controller RAID0. WindowsXP is installed on first partition. Made two more partitions for linux using Partition Magic.
> ...

 

I have a K8V Deluxe (I think its an older model) and if I remember correctly windows and Linux set up the raids differently and one can not use the others. Look for this on this form in other threads, but I believe I am correct.

----------

## alv

You can also try forcing the raid drivers to ignore metadata.

for example, my kernel boot string:

```

kernel /kernel-2.6.11.4 root=/dev/md1 md=0,/dev/sda2,/dev/sdb2 md=1,/dev/sda3,/dev/sdb3

```

Also please note that md and raid0 modules must be built into the kernel if you do not want to use initrd or a separate root fs.

I also use a non-raided partition to hold my kernels before they are loaded with grub.

----------

