Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
transfer hangs with usb disk enclosure
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
RoundsToZero
Guru
Guru


Joined: 17 Nov 2003
Posts: 478
Location: New York, NY

PostPosted: Fri Sep 03, 2004 1:06 pm    Post subject: transfer hangs with usb disk enclosure Reply with quote

I have a USB disk enclosure that supports USB 2.0 High Speed. In it is a 60 GB hard drive. It has one partition with the ext2 filesystem.

I am trying to copy my CPAN and distfiles mirrors (about 33 GB total) off my main hard drive onto the enclosure. After a few minutes, however, the transfer completely locks up. I can switch to another vc and continue to work normally, but I can't kill or kill -KILL the cp process the transfer is using. The only way to access the drive again is to reboot; even unloading all the USB modules and loading them again doesn't help.

The problem seems like the transfer is happening so quickly that some place along the line can't keep up. It seems like I can make it last longer before it stalls by forcing the transfer to go slower by using the -v option to cp in order to print out everything as it happens. But it still freezes up in less than a minute.

When I reboot, I sometimes find that I can't erase all the contents of the enclosure, I get an Input/Output error. The only thing I've found that works to clean up after one of the transfer stalls is to reformat the disk.

Would trying another filesystem help?

Any other advice is appriciated.
Back to top
View user's profile Send private message
shade266
Guru
Guru


Joined: 29 Oct 2003
Posts: 593
Location: Internal

PostPosted: Fri Sep 03, 2004 2:53 pm    Post subject: Reply with quote

why not make 3 or more partitions and setup gentoo on it with a different kernel or the same kernel if youd like. in BIOS you can boot from the usb device and work inside a fully fuctioning gentoo system. but if that isn't for you then i would suggest you first check your kernel to ensure you have hardware specific modules selected for the device and then i would choose a different fs. maybe reiser.
_________________
I've been away for a long time, bear with me.
Back to top
View user's profile Send private message
RoundsToZero
Guru
Guru


Joined: 17 Nov 2003
Posts: 478
Location: New York, NY

PostPosted: Fri Sep 03, 2004 7:16 pm    Post subject: Reply with quote

I've got something that seems to be working so far.

I wrote a little script that runs "sync" every 10 seconds. I think the problem might be that some buffer is filling up too fast and the kernel never writes out to the disk. Then eventually, for some reaosn, it hangs. In fact, the activity light on the enclosure is rarely active unless sync is running.

So I don't know. I'll see how it goes
Back to top
View user's profile Send private message
shade266
Guru
Guru


Joined: 29 Oct 2003
Posts: 593
Location: Internal

PostPosted: Fri Sep 03, 2004 7:29 pm    Post subject: Reply with quote

good deal! let us know how it turns out and possibly post the script on here to help others get the workaround as well. it sounds like a good idea.
_________________
I've been away for a long time, bear with me.
Back to top
View user's profile Send private message
RoundsToZero
Guru
Guru


Joined: 17 Nov 2003
Posts: 478
Location: New York, NY

PostPosted: Fri Sep 03, 2004 7:45 pm    Post subject: Reply with quote

It went a bit longer than normal, but eventually still had the same problem.

I'm going to look into more useful methods of debugging. This is just the script in case it helps anyone.

Code:

#!/usr/bin/perl

while (0 == 0) {
 print time() . ": syncing...\n";
 `sync`;
 sleep 10;
}
Back to top
View user's profile Send private message
f.kater
Guru
Guru


Joined: 23 May 2002
Posts: 342
Location: Berlin

PostPosted: Mon Nov 29, 2004 10:55 am    Post subject: Reply with quote

Hi RoundsToZero,

same problem here. Haven't missed any kernel since 2.6.x, writing big data still fails.

This kind of "buffer overflow" may have a relation to the kernel message at boot up when the drive is connected: Something like "sda drive cache: assuming write though".

My workaround is deactivating the EHCI 2.0 module in the kernel and just use USB 1.

Hope you find a better solution. I'll be watiching this thread!

Felix
Back to top
View user's profile Send private message
dan2003
Apprentice
Apprentice


Joined: 11 May 2003
Posts: 258
Location: somewhere near london, UK

PostPosted: Thu Dec 23, 2004 10:46 am    Post subject: Reply with quote

Hi, did this get solved? I have what i think is probably a related problem.

First off, What i have is a usb2-ide converter which allows me to attach any 3.5 or 2.5 inch ide drive to a usb enabled pc. It has its own PSU to power the drive also.

On my A7N8X machine this works fine and i have used it to transfer 10s of gigs of a friends wedding videos in DV format with no trouble wotsoever.

However on my laptop which only has USB1.1 built in i use a PC-Card USB2 adaptor. If i plug the drive in to this with ehci-hcd unloaded it all works fine at the slower usb1 speed. However with ehci-hcd loaded mount just hangs and never actually mounts the drive! I have tried everything i can think of including the bandwidth option in the kernel but cannot get this to work.

Has anybody any ideas?

Kernels on both my machines are 2.6.9-nitro2, i have also now tried 2.6.9-nitro4 on the laptop but i dont think usb is effected at all in the updates.
Back to top
View user's profile Send private message
f.kater
Guru
Guru


Joined: 23 May 2002
Posts: 342
Location: Berlin

PostPosted: Tue Dec 28, 2004 3:16 pm    Post subject: Reply with quote

Hi,
I have switched from development-sources-2.6.9 to 2.6.10 and copied 15 GB of data from two different terminals to the usb drive. No problems! Singing ya ya yipiee yipie yeaaaaah!

I'll post here again in case of errors.
Back to top
View user's profile Send private message
gurky
n00b
n00b


Joined: 08 Jun 2004
Posts: 14

PostPosted: Sat Jan 01, 2005 1:41 pm    Post subject: Reply with quote

I have had this problem or a similar one with both a pendrive
and an external USB drive.
I've got USB1.
It seems to me that indeed it's a matter of buffering or caching.
What I noticed is that even if everything seems to hang, it's not.
If I wait long enough, even a minute or longer, the write/sync ends
and everything is completed correctly.
I copied a few GBs and for a lot of time the system seems to be
doing nothing, it hangs and restarts, hangs and restarts.
Every time it resumes it seems to be transferring data
at a speed far above USB1 capabilities.
Did you try to mount with the sync option? Maybe it's a bit too much... but it should work.
Back to top
View user's profile Send private message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Sat Jan 01, 2005 2:19 pm    Post subject: Reply with quote

ive got USB2 enclosure that sometimes freezes when throwing lots of data at it. Its got a light round the outside that flickers when its being accessed. When it freezes, the light goes off completely for a minute, then comes back on, then about 30s later data transfer starts normally again when it stopped, no problems.
_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum