I'm having some trouble when I copy files to USB drives using Linux. After I copy a file, it seems to take forever to unmount the drive, and worse, when I check the checksums of the original and the copied file, they don't match! I've tried multiple file systems—FAT32, exFAT, NTFS, and ext4—but I still get the same results. Any idea if this is a filesystem issue or something else?
4 Answers
You can also resolve some of these problems by mounting the USB with the `sync` flag at the start. I’m not sure why the checksums wouldn't match when you unmount correctly, though. That’s puzzling!
Sounds like you might be dealing with some caching issues. When you unmount a drive, it can take longer if the system is still writing data to the drive from cache. If you want to speed up the unmounting process, try using the `sync` command before you unmount the USB. This makes sure that all cached data is written to the drive. But just a heads up, turning off caching completely can slow down other operations.
It’s all about caching! When you copy files, the system caches the data for performance reasons. If you want to check the integrity of your files, make sure to run checksum commands after you’ve done the `sync`. This way, you can be sure you’re checking the actual disk instead of a cached version.
I had similar issues on Linux Mint. It seems to be a common problem across different distributions. I’ve noticed that using different file managers like Nemo or Nautilus doesn’t change anything either. It feels like the problem isn't tied to a specific distro, but rather some underlying Linux issue.
Yeah, I think you're right. I've experienced it with Debian and Fedora too, so it’s definitely not just Mint.
What if I just want to quickly plug in the USB, transfer some files, and pull it out without all that hassle?