I've done some quick Googling but didn't find an answer. I've put an SSD in my Macbook, and at the same time moved the original hard drive to the optical drive bay. I'm running the OS and most of my daily apps off the SDD so the hard drive is really just for storing stuff I need now and then.

Now I'd like to disable (as in power off or "force sleep") the hard drive when I don't need it. Tried unmounting the disk using diskutil unmountDisk but it kept spinning for like 10 minutes. Maybe that's to be expected, but I'd imagined it would stop instantly on unmount. Also, it would be nice to have it disabled by default, and only mount it (= power on) when I need it.

link|improve this question
feedback

8 Answers

up vote 2 down vote accepted

Because Apple doesn't want you to do this... sorry, this bay is basically limited to "DVD" functionalities. So what this means is that it will "act" and control the drive just like a DVD drive and not an hard drive. Macbook's are way more custom than people think... You may also learn at the same time that the power output for this bay is limited and many hard drive's are not supported.

link|improve this answer
Ah OK I see... Guess simply unmounting it will have to do then. Off to script the unmount process... Thanks! – cpak Mar 9 '11 at 10:13
I have the same question for Windows 7, is it possible there? – danny May 21 '11 at 21:09
feedback

So I also did some of the Googling and found nothing that really helped. After combining some stuff I found running

hdiutil eject disk1

in Terminal to work. If you get info in Disk Utility you can see if the drive you want to eject is disk0 or disk1 or whatever. I find some times the disk will spin back up if I do things like open Disk Utility again.

link|improve this answer
feedback

Here is simple apple script:

set answer to the button returned of (display dialog "Your second HDD wants to?" with icon caution buttons {"Wait", "Sleep", "WakeUp"})

if answer = "Sleep" then
    do shell script "hdiutil eject disk1"
else if answer = "WakeUp" then
    do shell script "diskutil mountDisk disk1"
end if
link|improve this answer
feedback

I do not agree with deijmaster. A SATA port is a SATA port. It does not make any difference to the OS that it's usually used for DVD.

I have also moved my HDD to the optical bay.

The best thing I have found so far to reduce noise is:

  • Make sure that you enable disk sleep in Energy preferences.
  • Then, run in Terminal:

    sudo pmset -a disksleep 1
    

To sleep the disk after only 1 minute.

Also, if you disable Spotlight on this drive, the drive will not spin up when you open Spotlight. To disable spotlight:

sudo mdutil -i off /Volumes/TSA-Data 

(Or the conventional way: drag the drive (all partitions) from the Finder sidebar to the list of places that Spotlight excludes, in the Spotlight Preferences)

It still spins up some times without obvious reason.

link|improve this answer
feedback

I made the following compact script with help from earlier answers. The script mounts and opens the secondary drive (disk1, here "HDD") if it isn't mounted, and ejects it if it is mounted.

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.

Then, the disk won't start too often but will go back to rest quickly, when mounted of course. Note also that unmounted disks can start when using e.g. system info and disk utility.


Use the correct disk name instead of "HDD" below!

The script MountHDD.scpt:

tell application "Finder"   
if not (exists the disk "HDD") then   
do shell script "diskutil mountDisk 'disk1'"      
tell application "Finder"                 
activate    
make new Finder window     
set target of Finder window 1 to disk "HDD"    
end tell    
else   
do shell script "diskutil eject 'disk1'"      
end if   
end tell   

Save the script as a program (.app) and place the program in Dock!

Note that the disk still spinns up (unmounted) at boot and wake up. Run the app once/twice (mounted/unmounted) to sleep it. if you do nothing it will spin the idle time (1 min if sudo pmset -a disksleep 1 is used) and then stop.

link|improve this answer
feedback

I agree with sarfata. A SATA port is a SATA port. It does not make any difference to the OS that it was originally used for DVD.

I have also moved my HDD to the optical bay ($15 bracket via Amazon.com), and installed an SSD in the primary bay of my MacBook Pro Uni-15.

I get a 30% power reduction by setting the HDD to sleep, but it takes three steps:

  1. Enable disk sleep in Energy preferences.

  2. In Terminal:

    sudo pmset -a disksleep 1
    

    (To sleep the disk after only 1 minute.)

  3. Also, to tep it from randomly spinning up, I disabled Spotlight on this drive

    sudo mdutil -i off /Volumes/TSA-Data 
    

    Or the conventional way: drag the drive (all partitions) from the Finder sidebar to the list of places that Spotlight excludes, in the Spotlight Preferences

link|improve this answer
feedback

My final solution was to create an Automator application which I run from Spotlight.

  • One for ejecting the HD;

    Run Shell Script: diskutil eject 'disk1'

  • Another for mounting the HD;

    Run Shell Script: diskutil mountDisk 'disk1'

Where disk1 is the name of the disk you want to spin down/force to sleep/eject. This name is found in "System Information".

link|improve this answer
feedback

In each of these cases, the disc remains ejected, but after 1 minute begins to spin again. Although it is expelled. My config: SSD with OS (S.L.) in HDD slot and HDD in optical drive bay.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.