I've plugged in a USB flash drive and transferred a file of around 4 GB in size without running the sync command. I was using Dolphin File Manager. After I removed the flash drive and plugged it back in, I noticed that the file size had changed to about 13 MB. This issue never happens when I run sync and then umount the drive.
How can I automate this process so that even if a user removes the USB flash drive without ejecting it or running the sync command manually, the data is still properly written to the device?
Most people who would be using this workstation are used to Windows or Ubuntu, where they typically transfer files and remove the drive without explicitly ejecting it, and it still works. So I’d like to make the experience on FreeBSD a bit more foolproof and reduce the risk of data loss in case users forget to sync and eject properly.
How can I automate this process so that even if a user removes the USB flash drive without ejecting it or running the sync command manually, the data is still properly written to the device?
Most people who would be using this workstation are used to Windows or Ubuntu, where they typically transfer files and remove the drive without explicitly ejecting it, and it still works. So I’d like to make the experience on FreeBSD a bit more foolproof and reduce the risk of data loss in case users forget to sync and eject properly.