PDA

View Full Version : usb disk hangs under load (fc3 with various 2.6 kernels)


dmitri
21st January 2005, 12:43 AM
I have an external USB hard drive (Maxtor OneTouch), which hangs whenever I try to write lots of data to it. After it 'hangs', cpu foes to !00%, I cannot access or umount the drive until reboot. Happens under all 2.6.9 and 2.6.10 kernels (FC3 & kernel.org) that I've tried. Happens on vfat, ext2, ext3, and reiserfs. The 'noapic' boot option seems to only make things worse (i.e., the drive hangs faster). The USB drive is plugged into a PCI USB 2.0 card.

This problem does not occur if I plug the drive into a USB 1.1 slot on the motherboard. Also, the problem does not happen under windows (i.e., the hardware is OK).

Any help would be greatly appreciated (this is driving me nuts...)

Steps to reproduce:
boot, mount drive, copy lots of data to it (~5-10Gb), drive hangs

In /var/log/messages I get a thousand of:
Jan 20 19:14:40 *** kernel: SCSI error : <2 0 0 0> return code = 0x70000
Jan 20 19:14:40 *** kernel: end_request: I/O error, dev sdd, sector 300491839
Jan 20 19:14:48 *** kernel: SCSI error : <2 0 0 0> return code = 0x70000
Jan 20 19:14:48 *** kernel: end_request: I/O error, dev sdd, sector 300491847
Jan 20 19:14:56 *** kernel: SCSI error : <2 0 0 0> return code = 0x70000
Jan 20 19:14:56 *** kernel: end_request: I/O error, dev sdd, sector 300491855

Here's some more info:

# lsusb
Bus 005 Device 002: ID 045e:0039 Microsoft Corp. IntelliMouse Optical
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 002: ID 0d49:7010 Maxtor
Bus 001 Device 001: ID 0000:0000

# cat /proc/scsi/usb-storage/2
Host scsi2: usb-storage
Vendor: Maxtor
Product: OneTouch
Serial Number: Y471SS4E
Protocol: Transparent SCSI
Transport: Bulk
Quirks:

# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: SEAGATE Model: ST318203LW Rev: 0001
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 04 Lun: 00
Vendor: QUANTUM Model: ATLAS 10K 9WLS Rev: UCH0
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 06 Lun: 00
Vendor: IBM Model: IC35L036UWD210-0 Rev: S5BA
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi1 Channel: 00 Id: 05 Lun: 00
Vendor: NEC Model: CD-ROM DRIVE:466 Rev: 1.06
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: Maxtor Model: OneTouch Rev: 0201
Type: Direct-Access ANSI SCSI revision: 02


# cat /proc/interrupts
CPU0 CPU1
0: 1271740 1298096 IO-APIC-edge timer
1: 3174 3536 IO-APIC-edge i8042
2: 0 0 XT-PIC cascade
5: 132 1 IO-APIC-edge CS4231
8: 0 1 IO-APIC-edge rtc
15: 11026 10923 IO-APIC-edge ide1
161: 72020 73092 IO-APIC-level ohci_hcd, nvidia
169: 0 0 IO-APIC-level ohci_hcd
177: 109276 131018 IO-APIC-level aic7xxx, aic7xxx, ohci_hcd
185: 370316 288 IO-APIC-level ehci_hcd, uhci_hcd, eth0
NMI: 0 0
LOC: 2569679 2569678
ERR: 1
MIS: 0

# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 7
model name : Pentium III (Katmai)
stepping : 3
cpu MHz : 597.159
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips : 1175.55

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 7
model name : Pentium III (Katmai)
stepping : 3
cpu MHz : 597.159
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips : 1191.93

# lspci
00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 03)
00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03)
00:07.0 ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 02)
00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 01)
00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 02)
00:10.0 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)
00:10.1 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)
00:10.2 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)
00:10.3 USB Controller: ALi Corporation USB 2.0 Controller (rev 01)
00:11.0 Ethernet controller: 3Com Corporation 3c905B 100BaseTX [Cyclone]
00:13.0 PCI bridge: Digital Equipment Corporation DECchip 21152 (rev 03)
01:00.0 VGA compatible controller: nVidia Corporation NV20 [GeForce3] (rev a3)
02:0a.0 SCSI storage controller: Adaptec AHA-2940U2/U2W / 7890/7891
02:0e.0 SCSI storage controller: Adaptec AIC-7880U (rev 01)

jarifed
21st January 2005, 08:41 PM
No problems with my drive
I am currently running 2.6.10-1.741_FC3 also using a Maxtor External 250Gb model one touch
and a PCI usb 2.0 card only having a single processor.

try searching this site and looking for messages from Alan Stern
http://www.spinics.net/lists/usb/

and as a wild guess try relocating your PCI card to another slot??

lirakis
22nd January 2005, 12:03 AM

I have similar problems, and i have tried putting my pci usb 2.0 controller into 2 different fedora machines both have trouble. My drive will some times just go really slow when i do an ls and then it will freeze up the console. Also I can not chown the drive at all and its only writeable by root. I am using a lacie 250gig model that has a western digital drive inside. I suspect it has some thing to do with my pci card.. just a generic compusa brand usb 2.0 controller.. any help would be VERY appreciated.

Nighthawk4
23rd January 2005, 06:25 PM
I have the same problem - except my USB2 is onboard, not a PCI add-in.

I can read a small amount of data, but then the whole thing locks up - needing a reboot.

It works fine in Windows, so I assume the device is OK.

It doesn't seem to make any difference which port I use.

jarifed
23rd January 2005, 06:52 PM
Try this (can't guarantee it works)

enter in a terminal as root
cat /sys/module/usbcore/parameters/old_scheme_first
It should either return Y or N

If N then you can change old_scheme_first to Y as follows

echo Y > /sys/module/usbcore/parameters/old_scheme_first
use cat /sys/module/usbcore/parameters/old_scheme_first and it should return a Y

I have set capital letters as that's what is showing on my FC3 kernel 2.6.10-1.741_FC3

Additionally you can check this also
cat /sys/module/usbcore/parameters/use_both_schemes
in my case it returns N

lirakis
23rd January 2005, 11:28 PM
I got it!!! The problem was a GHETTO usb controlloer made by 'ALi' on my pci usb 2.0 card. I got an Adaptec with an NEC chip on it and it worksgreat.

dmitri
24th January 2005, 12:22 AM
Yeah, I'm starting to believe that my ALi USB PCI card is the root of all this mess. I was hoping to avoid buying new hardware, but I guess I'm running out of options...

BTW, I also tried setting 'max_sectors' to 32 and 64, and tried the 'old_scheme_first' thing, and it didn't help.

dciarnie
7th March 2005, 07:08 AM
I have an ALi USB 2.0 card which worked just fine with kernel-2.6.10-1.766 but when I update to kernel-2.6.10-1.770, I started to get SCSI errors like those listed in this thread's initial post. One of the changes between 766 and 770 is to change old_scheme_first from N to Y and I'm thinking that this might be the problem. How can I restore the setting to N at boot?

Thanks,
Dan.

jarifed
7th March 2005, 07:27 AM
dciarnie
this should do it

echo N > /sys/module/usbcore/parameters/old_scheme_first

Jarifed

dciarnie
9th March 2005, 06:58 AM
Thanks, Jarifed. I did that and was able to transfer a large file without any SCSI errors. The only problem is that when the system is rebooted, old_scheme_first gets reset to Y. I would like this to be automatically set at boot time. I believe that there is a way to set module options at boot time but I haven't been able to figure out how to do it.

jowah
9th March 2005, 03:44 PM
Thanks, Jarifed. I did that and was able to transfer a large file without any SCSI errors. The only problem is that when the system is rebooted, old_scheme_first gets reset to Y. I would like this to be automatically set at boot time. I believe that there is a way to set module options at boot time but I haven't been able to figure out how to do it.Alternative 1
In /etc/grub.conf, for the kernel you'd like to use, add usbcore.old_scheme_first=1 to the kernel line.Example:
...
title Fedora Core (2.6.10-1.770_FC3)
root (hd0,6)
kernel /boot/vmlinuz-2.6.10-1.770_FC3 ro root=LABEL=/ rhgb quiet usbcore.old_scheme_first=1
initrd /boot/initrd-2.6.10-1.770_FC3.img
...
Alternative 2
Add what jarfield suggested above to the end of /etc/rc.local:
echo N > /sys/module/usbcore/parameters/old_scheme_first

dciarnie
10th March 2005, 08:05 AM
Thanks, Jowa. Adding usbcore.old_scheme_first=0 to grub.conf did the trick.