LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Random read hangs with USB-HDD (https://www.linuxquestions.org/questions/linux-hardware-18/random-read-hangs-with-usb-hdd-613491/)

1N4148 01-14-2008 10:41 AM

Random read hangs with USB-HDD [solved]
 
Hi,
I've got a problem with my Maxtor 500GB USB2.0 external harddrive containing one big ReiserFS partition. This drive is fixed, so I can only attach it via USB. Power is pulled from an external brick.

Writing to this disk does not pose any problems. Reading however results in strange behavior.
After I copied a few hundred MB, sometimes a few ten MB or even GB off it, copying completely stops for almost exactly 60 seconds only to resume again afterwards. It just sits there fiddling thumbs and waiting for a timeout of some kind (presumably).
<data(random duration)> - <60 sec pause> - <data(random duration)> - <60 sec pause> etc.

This causes a few services like Samba to time out, making copying off that drive from another PC a pain in the butt.

My board is an Asus A7V333-X using the latest BIOS with the device attached to this onboard USB controller
Code:

#lspci
00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)

The harddrive:
Code:

#lsusb
Bus 001 Device 004: ID 0d49:3200 Maxtor

I'm using Gentoo running on the 2.6.23-gentoo-r3 kernel. 2.6.22-gentoo-r8, which I used before, displayed the same issue.

This device is said to work flawlessly (See here and here)

This comes up regarding this disk during boot
Code:

#dmesg
scsi 3:0:0:0: Direct-Access    Maxtor  3200            0344 PQ: 0 ANSI: 4
sd 3:0:0:0: [sdg] 976773168 512-byte hardware sectors (500108 MB)
sd 3:0:0:0: [sdg] Write Protect is off
sd 3:0:0:0: [sdg] Mode Sense: 17 00 00 00
sd 3:0:0:0: [sdg] Assuming drive cache: write through
sd 3:0:0:0: [sdg] 976773168 512-byte hardware sectors (500108 MB)
sd 3:0:0:0: [sdg] Write Protect is off
sd 3:0:0:0: [sdg] Mode Sense: 17 00 00 00
sd 3:0:0:0: [sdg] Assuming drive cache: write through
 sdg: sdg1
sd 3:0:0:0: [sdg] Attached SCSI disk

and during mount
Code:

#dmesg
ReiserFS: sdg1: found reiserfs format "3.6" with standard journal
ReiserFS: sdg1: using ordered data mode
ReiserFS: sdg1: journal params: device sdg1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sdg1: checking transaction log (sdg1)
ReiserFS: sdg1: Using r5 hash to sort names

These messages pop up at the beginning and end of the 60 sec period:
Code:

#dmesg
usb 1-6: reset high speed USB device using ehci_hcd and address 4

I searched for that error on different forums/Google. I found others having the same problem. Many suggested to do this
Code:

echo 64 >/sys/block/sdg/device/max_sectors
I did to no avail. Other values didn't work either
Another suggestion was to mount the drive using the sync option. This also did not work for me

Any ideas?

1N4148 01-14-2008 12:20 PM

Solved it.
After adding a third stick of RAM, the mem as a whole was running out of spec. I had to downclock it from 320 MHz to 306 MHz. Now it's running stable without any problems reading from that disk


All times are GMT -5. The time now is 01:42 AM.