Instantly share code, notes, and snippets.
The package udisks2 is needed.
udisks2
$ sudo udisksctl power-off -b /dev/sdXX
It's works on Ubuntu.