Customize external HDD spindown timeout?
The Terminal command diskutil eject &lt;disk_identifier&gt; is what you are looking for.
&lt;disk_identifier&gt; can take the UUID of the drive as an argument.
To get the disk identifier of all mounted disks, execute the mount command.
On my Mac, the mount command gives this:
/dev/disk3 on / (hfs, local, journaled)    
/dev/disk4s2 on /Volumes/iTunes (hfs, local, nodev, nosuid, journaled, noowners)    
/dev/disk5s2 on /Volumes/TM_Backup (hfs, local, nodev, nosuid, journaled) 

To spin down /Volumes/iTunes, I'd execute either one of the commands
diskutil eject /dev/disk4
or
diskutil eject /Volumes/iTunes.
To spin up /Volumes/iTunes, I need to execute the command:
diskutil mountDisk /dev/disk4. mountDisk only works with /dev/disk* disk identifiers.
See man diskutil for more information.