Write through on external hdd making writing very slow
Bug #9104 reported by
Laurent Mouillart
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pmount (Ubuntu) |
Fix Released
|
Wishlist
|
Martin Pitt |
Bug Description
I use an external USB hard drive as seconday storage system, but the write
through policy make it very slow.
I think it's possible to scan the vendor info to know if it's an harddrive and
disable the write through and enable write back policy.
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: HDS72258 Model: 0VLAT20 Rev: 0 0
Type: Direct-Access ANSI SCSI revision: 02
To post a comment you must log in.
This is a difficult decision. SCSI devices like USB sticks, hard disks and
digital cameras are technically very similar and in fact the only thing that
tells them apart (that can be seen from the OS) are their vendor and model names
(which are pretty arbitrary).
We mount such devices with 'sync' to have a reasonably safe default for people
who just rip out their devices without proper unmounting. Depending on the
particular program, i. e. the size of chunks it writes to the device this
considerably slows down writing.
We will not change this for Warty, but for now I see several possible workarounds:
- you change to async at runtime by 'sudo mount -o remount,async /dev/sda1' (or
whatever your mounted partition(s) is/are)
- you create an fstab entry for sda which mounts it async (this requires that
the device is always plugged in at boottime)
- you change 'sync' to 'async' in the pmount source and rebuild the package