Questions about safely removing the USB drive

Hi, does anyone know how to safely disconnect an external USB hard drive from the Qubes USB proxy and turn it off before disconnecting it?

I’ve noticed that when I eject it to disconnect it, it’s still powered on after the safe removal process.

If you “eject” the drive, in the sense of “sys-usb does not show the drive connected to any other qube”, it’s safe to disconnect the drive.

In Qubes, the behaviour is different from running Windows or Linux directly on the hardware, as any USB drive still remains attached to sys-usb; as long as no partition is mounted, you can disconnect it safely.

I agree with barto, ejecting it in the usb proxy as well is unnecessary in common circumstances.

But in case you want it anyway, there is eject : https://linux.die.net/man/1/eject

In dom0, of course, it would be something like qvm-run sys-usb eject ...

Thanks for your replies. Just to clarify, the problem is with external USB drives, not USB flash drives. The external hard drives remain powered on and spinning after being ejected from the USB hub, but I’ve already found a partial solution using Gnome-Disk.