Tuesday, June 19, 2007

Bad Bad USB

I've got 80GB Hitachi USB Portable hard drive few weeks back and now I'm repenting on the money I shred on it. Well, it's not extremely bad, but sure it can't copy a file bigger than 2GB.

Try it and you'll get red head monster popup stating "Delayed write fail"! The general meaning of this message is that kernel failed to write the buffer to the device, would be familiar if you have worked with 56kbps modems with bad network interfaces. It's not a windows problem, It doesn't work on Linux too, which is not a surprise.

USB2.0 is pretty fast, and the hard drive with 12msec seek time is good. USB2.0 is still "new" and I, among others, feel that it is not well implemented. Google search reveals that it's mostly because of loose connection or something related to poor hardware mechanism, heh, I don't think that's the real problem. Because I could copy thousands of small files without pain, but a single large file proves fatal.

I suspect few things about this problem:
First, the disk manufacturer might have sacrificed a good cache which can cause controller to lose track of what's being written, hence the failure.

Secondly, It can be drive seek+write speed problem together with controller, USB pumping data at high speed which the disk can't handle at it's 5200rpm.


There is at least one sub-optimal solution to this, switch to USB1.1 interface from BIOS and you can copy bigger files! Ten time slower, however. (which means it's not a connector problem).


Unknown said...

Are you sure the 2GB limit is not a limit of the file system you use? The HDD has no concept of file size, so it is almost impossible that this is an hardware problem. Switch from FAT32 to a better filesystem and you will be able to create an 80GB file, I bet.

Nirav Thaker said...


All the partitions are NTFS formatted with compression enabled.

I can't think of formating a disk with as trivial a file system as Fat32 file system. And as I said I can copy 2GB file with USB1., Strange :)

NTFS is better file system I guess, or atleast it doesn't suck.

Vikas Sangani said...

You are mad. copy movie files one by one. why are you copying 2 GB at a time? hoooh. give me your HD i will copy the content of 2 GB -:)

Vikas Sangani said...

I can imagine what is happening with your file copy operation.Since your target is an external device it is quite possible that the device is returning an error which is terminating the file copy operation to terminate.

The windows Delayed Writes is basically a thread in kernel mode Virtual Memory manager which runs to write the data to the slow devices like HDD or Removable storage.In your case a URB will be generated to write that data to the USB Mass Storage Device and since you say that the device is using 2.0 it is quite possible that either the bandwidth allocated for the device is being exhausted or the hardware is returning an error.
you can use a USB Monitor software to see what is going on behind the scenes.

yeh mere ko dede. tu dusari lele.

Nirav Thaker said...

Vikas, Thanks for explanation.

I would check out USB Monitor software.

Aa mari HDD chhe, hu nai apu :)