I had similar issues before but i don't remember how i solved it.When i try to copy something to USB stick, with FAT, it stops near the end, sometimes at 100%. And of course, when i transfer the memory stick somewhere else, it doesn't contain complete file. (file is a movie!)I tried to mount device with mount -o flush, but i get same issue.Also, i did format the USB stick with new FAT partition...Any idea what cold i do?p.s.I believe it's not related to OS, which is Debian, and i believe that coping from SSD drive doesn't make it stuck.
Gnome, nautilus copy files to USB stops at 100% or near
linux;usb;nautilus;clipboard
The reason it happens that way is that the program says write this data and the linux kernel copies it into a memory buffer that is queued to go to disk, and then says ok, done.  So the program thinks it has copied everything.  Then the program closes the file, but suddenly the kernel makes it wait while that buffer is pushed out to disk.So, unfortunately the program can't tell you how long it will take to flush the buffer because it doesn't know.If you want to try some power-user tricks, you can reduce the size of the buffer that Linux uses by setting /proc/sys/vm/dirty_bytes to something like 15728640 (15 MB).  This means the application can't get more than 15MB ahead of its actual progress.A side effect is that your computer might have lower data-writing throughput with this setting, but on the whole, I find it helpful to see that a program is running a long time while it writes lots of data vs. the confusion of having a program appear to be done with its job but the system lagging badly as the kernel does the actual work.  Setting dirty_bytes to a reasonably small value can also help prevent your system from becoming unresponsive when you're low on free memory and run a program that suddenly writes lots of data.But, don't set it too small!  I use 15MB as a rough estimate that the kernel can flush the buffer to a normal hard drive in 1/4 of a second or less.  It keeps my system from feeling laggy.