[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Write Caching for External USB Disk



Hello again, Debian-users!

I've got a disk related problem. 

Background: I have an external USB-IDE enclosure that holds a seagate
IDE drive (60GB). The drive is recognised by hotplug and uses the
usb-storage module for SCSI emulation. It's visible as /dev/sda and
partitions are ext3 and mounted under /mnt/sdaX.

Problem: I can read files off the disk happily. And I can write small
and medium sized (up to 500MB) files to the disk. However, when I try to
dump a 1GB+ tar backup or copy a large number of files to the disk the
system starts out well then eventually freezes dead. I ran a du -h to
see whether the files were being written correctly, and it showed the
tar file growing at 10MB/s for a while (up to several hundred MB
written), then slowing to a crawl, then the big freeze occurs. Now, this
is a USB v1.1 enclosure, so 10MB/s is way too high a transfer rate, and
I can only deduce that the data is being cached in memory (I've only got
512MB on the laptop) until it fills and eventually overflows. However,
enabling a large 1GB swap file doesn't help at all.

I've searched through the mount and fstab files and done some googling,
but can't seem to find any way to fix this. Does anybody know how to
disable "write-behind" caching (if that's the correct term) for this
disk? Perhaps an option in fstab? Hdparm doesn't like to work with it
(reports that SCSI not supported).

Thanks for your time.

Damien


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Damien Solley
Linux on the Inspiron 1100:
http://geocities.com/randomnumbergenerator2001/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Reply to: