It's possible to enable spinning down of mechanical hard drives using the "Put hard disks to sleep when possible" option in Energy Saver, and it's possible to customize the timeout period with sudo pmset -a disksleep MIN.

However, if I understand the man pages correctly, this applies to all hard drives connected to the system. Is it possible to only target one HDD (ideally, by UUID)? I have no objection to installing a 3rd party app to accomplish this functionality.

  • Is it me, or does this depend on the hardware/software of the external drive? This will differ between brands and drives and does not depend on your operating system. – CousinCocaine Sep 6 '14 at 7:26

The Terminal command diskutil eject <disk_identifier> is what you are looking for. <disk_identifier> 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


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.

  • 1
    But he doesn't want to unmount the drive, he wants to spin it down -- this is something that's done as part of a power saving effort by the system to all drives. They stay mounted, but have their heads parked and platters stopped, so they use less energy. – Ian C. Sep 1 '14 at 18:49
  • I edited my answer to fix everything. – IconDaemon Sep 2 '14 at 2:06
  • This is an answer for a different question. Besides, you cannot mount all ejected drives. External will fail. – Max Ried Sep 4 '14 at 5:15
  • The eject command spins down the drive, which is what the OP desires. The eject command can also target a specific drive, external and internal, and mountDisk can remount it. I tested these steps on an internal HD, and on external Firewire 800 and Thunderbolt HDs, including a SSD HD. – IconDaemon Sep 4 '14 at 11:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .