Start/stop external hard drive? I need to start/stop an external hard drive (USB) from a shell or python script. Actually the external hard drive automatically stops when ejected. So, is it possible to programmatically eject / start an external hard drive? Something like USBDeview does for Windows :-)

Update:

My intended use case: I want to run a nightly backup to the external drive. As the drive is quite loud and to save on energy, I only want it to be active during the backup. I likely won't use Time Machine, but my own backup script.
You could use pmset disksleep TIME to set a timeout for the disk to go into standby mode. This way, you wouldn't have to mount/unmount the disk every time you want to access it. TIME is the time in minutes.

If you set the time to 0, the timeout is disabled, so if you want to keep it spinning you can set it to that.