I have a big external USB HDD, which is device-encrypted with Veracrypt. That means when I plug it in, Ubuntu just sees an empty, unpartitioned raw device.

> lsblk -h

sdb 8:16 0 2,7T 0 disk

Question is now, how do I safely remove it from my computer? Back when it was unencrypt it, I would just eject it from nautilus and it would shutdown. Now I have to forcefully pull the plug, and the HDD screams in agony when I do.

After much googling I came across this command:

udisksctl power-off -b /dev/sdb

A bit cumbersome. But it works - sdb is powered down. For a split second. And then it is powered up immediately again...

  • You could try the good old eject, eject /dev/sdb. – mikewhatever Jan 14 '17 at 9:42
  • Doesnt work - it unmounts any partitions on that volume but doesnt shutdown/poweroff the HDD. – skipsilver Jan 14 '17 at 10:00
  • Not being accessed is all you need to safely remove the drive. If nothing is mounted go ahead. – user589808 Jan 14 '17 at 20:42
  • I cant safely remove it, because it's not formatted at all and so does not show up in the file manager (safely remove = clicking the eject button next to the drives name in nautilus?). – skipsilver Jan 15 '17 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.