Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I regularly have the problem that my Linux (Ubuntu 12.04) writes some files to an USB drive that are afterwards missing or broken in Windows. Windows often also tells me that it found problems with the drive. The drive is FAT32 and yes, I always use the small eject icon in Nautilus or simply shutdown the system before removing the drive.

To workaround the problem, I now use sudo sync to force any pending writes to execute, hoping that this will avoid these problems in the future.

What I am actually looking for is an option that tells my Ubuntu/Linux to perform any pending writes as soon possible and afterwards doing a safety check if the data was really written correctly. Currently the default strategy looks rather like "do not write everything too soon and do not double check".

share|improve this question
    
You seem to be the only one (or at least very rare one) who faces that kind of problems, really. Try using blockdev --flushbufs –  poige Oct 25 '12 at 23:07
    
But I am still not sure why this happens to me. I guess I need to grab an empty USB drive and play through the various scenarios: nosync + unplug, "eject" + unplug, "sleep" + unplug, etc. to really find out why it is not working for me :( –  Juve Oct 29 '12 at 16:54
add comment

migrated from askubuntu.com Oct 25 '12 at 17:06

This question came from our site for Ubuntu users and developers.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.