Link to home
Start Free TrialLog in
Avatar of mistoiic
mistoiicFlag for Belgium

asked on

slow performance with sata (via) pci card, and WD drives - ubuntu 10.04 server.

hi experts!

I have an old DELL 1600sc, to which I attached two sata pci card, to plug 4x 1TB WD disk on.
the drives are mounted, but it's extremely slow when transferring (4-5mo /sec ).
I went to syslog, and saw this error alot:
"Sep  2 18:45:37 ubuntu-srv1 kernel: [ 5841.233761] ata6: SError: { UnrecovData Proto TrStaTrns }
Sep  2 18:45:37 ubuntu-srv1 kernel: [ 5841.246098] ata6.00: failed command: READ DMA EXT
Sep  2 18:45:37 ubuntu-srv1 kernel: [ 5841.258345] ata6.00: cmd 25/00:00:0f:04:de/00:01:28:00:00/e0 tag 0 dma 131072 in
Sep  2 18:45:37 ubuntu-srv1 kernel: [ 5841.258347]          res 51/84:af:0f:04:de/84:00:28:00:00/e0 Emask 0x12 (ATA bus error)
Sep  2 18:45:37 ubuntu-srv1 kernel: [ 5841.306902] ata6.00: status: { DRDY ERR }
Sep  2 18:45:37 ubuntu-srv1 kernel: [ 5841.319295] ata6.00: error: { ICRC ABRT }
Sep  2 18:45:37 ubuntu-srv1 kernel: [ 5841.331345] ata6: hard resetting link
Sep  2 18:45:37 ubuntu-srv1 kernel: [ 5841.648049] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
Sep  2 18:45:37 ubuntu-srv1 kernel: [ 5841.665252] ata6.00: configured for UDMA/33
Sep  2 18:45:37 ubuntu-srv1 kernel: [ 5841.665265] ata6: EH complete
Sep  2 18:45:37 ubuntu-srv1 kernel: [ 5841.689224] ata6.00: exception Emask 0x12 SAct 0x0 SErr 0x1000500 action 0x6
Sep  2 18:45:37 ubuntu-srv1 kernel: [ 5841.702695] ata6.00: BMDMA stat 0x5
"

Open in new window


I did some reading, and it appear to be caused by the drivers of the pci cards.
but it's slow only on 3 of the 4 drivers,
after carefully checking, the faster hdd is not from the same serie.

so I'm assuming it's a "compatibility" issue between the hdd, and the cards (or the driver)
 
I saw a possible fix here http://www.spinics.net/lists/linux-ide/msg37898.html
or here
but I have no idea how to apply a patch .. or to upgrade my kernel for that matter.

thanks in advance :)


edit:  RAID bus controller: VIA Technologies, Inc. VT6421 IDE RAID Controller (rev 50)
Avatar of zzx999
zzx999

You may need to recompile your driver for controller.
Basics: http://www.aboutdebian.com/compile.htm

Get your kernel headers:
Make sure you have updated version
$ sudo apt-get update
Search for kernel version (optional)
$ apt-cache search linux-headers-$(uname -r)
Install linux-header package
$ sudo apt-get install linux-headers-$(uname -r)

get  drivers source.
It's in kernel drivers/ata/sata_via.c

apply path from your link:
http://www.linuxforums.org/articles/using-diff-and-patch_80.html


Compile module.  

insert it to your kernel:
$modprobe  sata_via

Should work.
Avatar of mistoiic

ASKER

hi, thanks for the reply,

I check into /usr/src/linux-headers-2.6.32-24-generic-pae/drivers/ata
but it contain only 2 files:  Kconfig  Makefile

when I edit Makefile, I can see "obj-$(CONFIG_SATA_VIA)          += sata_via.o"

but no sata_via.c whatsoever
(I forgot to check your first link, I will right away)
ASKER CERTIFIED SOLUTION
Avatar of zzx999
zzx999

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I found the source code there http://lxr.free-electrons.com/source/drivers/ata/sata_via.c
is there a way I can use that ? before I start breaking my kernel :p
well, you may try. Get it. Also it may need all dependencies
#include <linux/kernel.h>
 37 #include <linux/module.h>
 38 #include <linux/pci.h>
 39 #include <linux/init.h>
 40 #include <linux/blkdev.h>
 41 #include <linux/delay.h>
 42 #include <linux/device.h>
 43 #include <scsi/scsi.h>
 44 #include <scsi/scsi_cmnd.h>
 45 #include <scsi/scsi_host.h>
 46 #include <linux/libata.h>

you will need to copy it to /<your linux kernel dir>/drivers/scsi/sata_via.c

If it fails - get kernel source and compile just that module. Without breaking your kernel ;)
I installed kernel 2.5.35, which completely solved the problem.
linux-image-2.6.35-02063504-generic_2.6.35-02063504.201008271919_i386, to be exact.