Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sure...
First unmount the drive.
Go into your /etc/fstab (will need to be root to edit it).
Find the line that corresponds to your flash drive.
There's an options field with comma-seperated keywords;
add the word
sync
to that list, using the necessary comma's
Now you can mount it it won't use write cache.
Beware that this speeds up the unmount time (and avoids disaster should you pull out a mounted drive) but it will increase latency while working on the drive.
It does not quite work that way. If you man mount, you will see that :
the sync option today has effect only for ext2, ext3 and ufs
My flash drive is a mounted with vfat, so sync wouldn not have an effect. I am gues the drive could be reformatted to one of the ones listed above if you really need it to work though.
I've tried moving large numbers of files to the device with sync on and with it off, and it appears that sync *does* work with the device formatted as msdos.
After moving 40 MB of files with sync off, unmounting takes ~5 seconds. With sync on, unmounting is instant.
Perhaps the man pages haven't been updated for kernel 2.6??
That's strange Slacker_Rex... I've been experimenting with it as well and it also seemed to work (kernel 2.4.20) ... Writes take a lot longer and unmounting goes instantly. And it worked as well on floppy disks, which are msdos file system.
Maybe someone forgot to update the man pages?
Anyway, if it works to speed up the unmounting, all the better!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.