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

Re: pen-drive write cache turning off



On Tue, 29 Mar 2005 20:06:48 +0200
LeVA <leva@az.isten.hu> wrote:

> Hi!
> 
> I'm using linux kernel 2.6.11.6, and I have a pendrive (usb 1.0, the
> slower  one ;). When I copy stuff to it, or delete stuff from it, it
> happens quickly.  But after I umount it, my cpu usage is getting high,
> and I can see on my  pendrive's led, that my system is now performing
> the read/write transactions. My question is: can I control this write
> cache thru some /proc file, or with  command line, or mount option, or
> kernel .config variable, or that's just the  way it is, and I have to
> wait minutes after umounting my pendrive, so I can  disconnect it?

Use the 'sync' mount option. A couple examples:

"mount -o sync /dev/sdx1 /mnt/pendrive"

(in /etc/fstab)
/dev/sdx1     /mnt/pendrive   auto    noauto,sync  0  0

Note that this will make it seem like the file copies take a lot longer.
But this is just because it's doing the real work now, instead of later.

HTH,
Jacob



Reply to: