It is normal to get this dialogue when using
thunar, as noted here briefly at the Xfce wiki, although it will obviously only be displayed if you have a notification daemon installed. When a filesystem is unmounted any pending data is written and then the device itself can be removed. However, sometimes the filesystem cannot be unmounted if a process is still attached, and so tools like
fuser can be used to check what is still accessing the drive.
thunar-volman is installed with
thunar, and via
thunar-volman-settings, you can configure how it operates. As it uses dbus to communicate with other applications, you can get a glimpse of what's happening behind the scenes, by running
and then connect your device, and then unmount it. A whole splurge of data will arrive, but you can see the process whereby
thunar-volman, etc are communicating over dbus, resulting in what you see when you remove a device, which is communicated to you by your installed notification-daemon:
method call sender=:1.97 -> dest=:1.98 serial=8 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
string "Writing data to device"
string "There is data that needs to be written to the device "MCADisc" before it can be removed. Please do not remove the media or disconnect the drive"
variant byte 2