On Linux, all you have to do is
echo 1 > /sys/block/sdX/device/delete
And it's safe to unplug.
I need to run
echo "- - -" > /sys/class/scsi_host/hostN/scan
for newly plugged in disk to be detected on my system, though.
I do this for my laptop, I swap out CD reader which I rarely use with my HDD which is in most of the time, never had problems.