I have an external USB 3.0 HDD with several partitions on it, and I can't safely remove it (spin it down) before unplugging in Ubuntu 15.04.
I can run "Unmount" on each partition; but after unmounting all partitions disk is still spinning (it vibrates and I hear the spinning), and I think it may be unsafe to unplug it in such condition.
There is a Safely Remove Drive context menu option in Nautilus, Safely remove parent device in left Unity panel, and there is the command udisks --detach /dev/sdb
(recommended in this Ubuntu Forums post). After any of these actions HDD spins down for 0.4-0.5 seconds, and then it is detected again as plugged in; all its partitions are auto-mounted just like when I insert its USB cable for the first time.
In dmesg
I see
[ 46.592192] usb 3-1: USB disconnect, device number 4
[ 47.003378] usb 3-1: new SuperSpeed USB device number 5 using xhci_hcd
...
[ 48.638436] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
Click "Safely Remove Drive" for second time:
[ 68.815860] usb 3-1: USB disconnect, device number 6
[ 69.229567] usb 3-1: new SuperSpeed USB device number 7 using xhci_hcd
....
[ 71.199942] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
How can I safely unmount and spindown an external HDD without having it get redetected in seconds?