First you go to the terminal and type
Code:
this will show all drives and partitions.
then you type
Code:
diskutil unmount /dev/diskXY
where diskXY is the identifier of the drive you want to unmount.
Edit
You can probably create an Automator action and add this to the startup-objects of your account(s).
[ Edited by amifrog 22.05.2020 - 16:24 ]