What is the difference between unmounting a drive / ejecting / safely removing?

1 Antwort [Letzter Beitrag]
jaisgossman
Offline
Beigetreten: 06/18/2018

I've noticed a difference in external I drives I keep coming across, and would like to know the difference. When I plug in a small Sony sound recorder, I can mount the drive. I can then unmount or eject. Meanwhile, a Seagate external hard drive mounts upon plugging in. However, the seagate only displays a safely remove drive feature in the drop down menu. Both display the red eject button. My guess is these subtleties have something to do with the desktop manager (gnome? mate?) or something of the like. Why the difference?

Magic Banana

I am a member!

Offline
Beigetreten: 07/24/2010

I believe it is the difference between 'udisksctl unmount' alone and followed by 'udisksctl power-off'. According to 'man udisksctl':
unmount
Unmounts a device. This only works if the device is mounted. The option --force can be used to request that the device is unmounted even if active references exists.
(...)
power-off
Arranges for the drive to be safely removed and powered off. On the OS side this includes ensuring that no process is using the drive, then requesting that in-flight buffers and caches are committed to stable storage. The exact steps for powering off the drive depends on the drive itself and the interconnect used. For drives connected through USB, the effect is that the USB device will be deconfigured followed by disabling the upstream hub port it is connected to.
Note that as some physical devices contain multiple drives (for example 4-in-1 flash card reader USB devices) powering off one drive may affect other drives. As such there are not a lot of guarantees associated with performing this action. Usually the effect is that the drive disappears as if it was unplugged.