I've made applescripts to both mount and unmount my drive. if you do nothing it will spin the idle time (1 min if sudo pmset -a disksleep 1 is used) and then stop.
Run the app once/twice (mounted/unmounted) to sleep it. Note that the disk still spinns up (unmounted) at boot and wake up. Save the script as a program (.app) and place the program in Dock! Set target of Finder window 1 to disk 'HDD' The script MountHDD.scpt: tell application 'Finder'ĭo shell script 'diskutil mountDisk 'disk1'' Use the correct disk name instead of 'HDD' below! Note also that unmounted disks can start when using e.g. Then, the disk won't start too often but will go back to rest quickly, when mounted of course. I also reduced the the idle time to 1 min (in terminal: sudo pmset -a disksleep 1) and placed 'HDD' in the list of Spotlight exceptions where it reappears every time it's mounted. The script mounts and opens the secondary drive (disk1, here 'HDD') if it isn't mounted, and ejects it if it is mounted. I made the following compact script with help from earlier answers.