Some time ago I was experimenting with a bash script to safely remove a USB drive (see: Running a bash script in a program launcher). My plan was to issue a umount command and then provide a message that it was safe to remove the drive.
|Update – My experience with the safe-to-remove message in Linux Mint 18.2 (Sonya) was that the message would be displayed even though the red LED on the USB flash drive continued to flash for several seconds. To me, this indicated that there was still disk activity, and it was not safe to remove the drive. As a result, I revisited my plan to develop a bash script to indicate when writing cached data to the USB drive had completed. See: Safely removing a USB drive with a bash script|
Because I essentially inserted a pause at the end of the process, this generally worked satisfactorily. However, on occasion, I noticed that the drive’s red light was flashing, indicating that some disk activity was still in progress even though script had completed. So, I abandoned the script and caution remained the watchword.
Today, I updated Linux Mint to Version 18.2 (Sonya), updated my maintenance log to note the change, and then synchronized my data partition with my backup USB flash drive. Then, when I right-clicked on the USB drive and selected Eject, a message box popped up indicating that the drive could be safely removed. Well done Sonya – that’s perfect!
Running a bash script in a program launcher
How to upgrade to Linux Mint 18.2