[arch-general] USB Buffering Issue

Timothy Redaelli timothy.redaelli at gmail.com
Fri Dec 2 05:54:45 EST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 12/02/2011 11:48 AM, Paul Gideon Dann wrote:
> Hello all,
> 
> I've been having some trouble with USB drives in the last few
> months.  When copying files onto a device, the copy appears to be
> instantaneous, but is clearly buffered by the kernel.  If I unmount
> the drive, all appears well, but then removing the device results
> in corruption.
> 
> In order to work around this, I have to run "sync" before
> unmounting the device.
> 
> Any ideas what might be causing this, or how to fix it?  It would
> be nice to get a *real* progress bar when copying large files,
> instead of a quick flash followed by a boring minute or more of
> staring at "sync".

Hi,
by default linux mounts the devices with the async option.
You can mount using the sync option, so you are sure that the I/O is
made synchronously.
Just remember: "In case of media with limited number of write cycles
(e.g. some flash drives) "sync" may cause life-cycle shortening."
(from man 8 mount)

My 2 cents

- -- 
Timothy Redaelli
drizztbsd @ irc.freenode.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJO2K50AAoJEOcRMG48T4i8vvUIAJw2pkywKbISjxwZJ6kdePnH
MKIzi8zBW92nzCydL1vNirEtYA6HWMJlj9IfHMheEjAfNzZy3/1FuogbeDirIucr
T3VBLbCi6LPK52Rke5hQJnwCt8E8yJuzvQf+FxRGHBU+kYOF4WbJAqoj7MhllQrN
rEju1wvhdYMEXZ+DUi8EBKY5HneN4Ub2VoLHNDUv47bieXN8Afqck/ykEo2/WdAW
S3HXayUAUz958okdTuvafQtyNAa6jC1o2vjpSC/LSO0ZdqsrMHnf/KkXrKNvgEwh
+OfGydqnFyOlMKTOJErXzAe7UX0ZuJUKZQKZ1LnUYY6r6y1q/g2xEedFkq40W1w=
=QE7j
-----END PGP SIGNATURE-----


More information about the arch-general mailing list