I'm using Ubuntu MATE 16.04.5 LTS with latest 4.4 Linux kernel on several machines (laptops and desktops with USB 2.0 and USB 3.0).
For me it seems that something was changed inside USB driver internals of the kernel (or maybe
udisks). Or USB flash hardware become cheaper and low-quality.
My USB flash has LED indicator. It is no-name gift (ChipsBank CBM2099E controller).
When I connect it to the computer - it has LED indicator on, it blinks when data is transferred.
My main idea: when I see blinking indicator I suppose that flash is busy, so I should not disconnect it to prevent data corruption.
Many flashes - old Transcend JFV60, JF110, JF150, JF500, modern JF790; Kingston Data Traveller G2 and ADATA UE700, SanDisk Extreme Pro do not have such continuous blink problem. They stop blinking exactly after selecting Eject option and show bubble message that device is safe to remove:
Behavior of problematic flash
When I eject problematic USB flash drive from Caja file-manager or from GNOME Disks by pressing Eject menu option the flash LED is continuous blinking with fast rate. I tried to wait for about one hour, but is still blinks after this period of time. This happens even if I do not write anything on the drive. The notification bubble is not shown.
My questions - what may be the reason of such blinking problem? Is it just me? Is it safe (for data) to disconnect such blinking flash?
Notes and updates
1. I do not ask here about slow drop of write cache and/or
sync the drive. It highly depends on RAM size and on real write speed of the flash. The mentioned behavior exists in cases when no data were written.
2. All these flashes do not have problems with eject functionality on Windows. They get LED off just after clicking on Eject/Safely remove.
3. Selecting Power off this disk () in GNOME Disks forces flash to stop blinking, but I'm not sure about data safety in such case (for this particular flash; for other flashes and USB HDDs or SSDs it is safe, I know it).
4. I know that for example WD MyPassport USB hard-drives changes blink rate from fast to slow glow-fade after safely remove, but is other story as it have had spin-down and parked before, so it is safe to unplug it afterwards. So I do not think that the blinking of USB flashes indicate their polling and force user to detach it...
1. below is live output of
tail -f /var/log/syslog
Nov 11 23:37:35 hostname kernel: [32596.101403] scsi 7:0:0:0: Direct-Access General UDisk 5.00 PQ: 0 ANSI: 2 Nov 11 23:37:35 hostname kernel: [32596.102526] sd 7:0:0:0: Attached scsi generic sg2 type 0 Nov 11 23:37:35 hostname kernel: [32596.104745] sd 7:0:0:0: [sdc] 31129600 512-byte logical blocks: (15.9 GB/14.8 GiB) Nov 11 23:37:35 hostname kernel: [32596.107594] sd 7:0:0:0: [sdc] Write Protect is off Nov 11 23:37:35 hostname kernel: [32596.107611] sd 7:0:0:0: [sdc] Mode Sense: 0b 00 00 08 Nov 11 23:37:35 hostname kernel: [32596.107792] sd 7:0:0:0: [sdc] No Caching mode page found Nov 11 23:37:35 hostname kernel: [32596.107805] sd 7:0:0:0: [sdc] Assuming drive cache: write through Nov 11 23:37:35 hostname kernel: [32596.109561] sdc: Nov 11 23:37:35 hostname kernel: [32596.110621] sd 7:0:0:0: [sdc] Attached SCSI removable disk Nov 11 23:37:35 hostname udisksd: Mounted /dev/sdc at /media/username/FLASHDEVICE on behalf of uid 1000 Nov 11 23:37:52 hostname udisksd: Cleaning up mount point /media/username/FLASHDEVICE (device 8:32 is not mounted) Nov 11 23:37:52 hostname udisksd: Unmounted /dev/sdc on behalf of uid 1000
note last lines here, at 23:37:35 device was unmounted/ejected from file manager, at 23:37:52 udisks removed it, but its LED still blinking.
2. Followed @WinEunuuchs2Unix ideas I tried both UDisks (legacy, it remains on my system because of upgrades from 12.04) and UDisks2 (modern and actual) to perform safely remove procedure - both
#udisks1 (legacy) udisks --unmount /dev/sdc1 && udisks --detach /dev/sdc #udisks2 (modern) udisksctl unmount -b /dev/sdc1 && udisksctl power-off -b /dev/sdc
ended with same LED blinking problem with only one of my flashes.
3. Repeated the method above on my old Ubuntu 12.04.5 LTS and here LED is blinking on problematic flash. So it is a USB flash hardware issue.
There is some software-hardware incompatibility between my no-name ChipsBank CBM2099E based flash and Linux and/or Udisks. Other flashes (listed above in expected behavior) do not have problems.
In the Windows 8.1 running on the same laptop its safe removal is successful and LED is off.