Spindown a Hard Drive in Optibay

Discussion in 'MacBook Pro' started by KarmaPolice, Mar 23, 2010.

  1. KarmaPolice macrumors newbie

    Joined:
    Mar 3, 2010
    #1
    Hi everyone. I have been looking into the Macbook Pro (arrandale update) along with SSDs and the Optibay. My dream configuration of the MBP would have a SSD serving as the primary drive (I don't use that much disk space) and the HDD for additional storage in the optibay. From what I have read about the SSDs, they run extremely quietly. Considering I would not use the HDD too often, I was wondering if there is an easy way to activate the HDD only when I need it. I would also be interested to know if there are any drawbacks to doing so. I assume this is what the term "spinning down" is referring to, but I don't really understand the process itself.

    1. Is it possible to "de-activate" the hard drive when you don't require it?
    2. If so, will the hard drive be cooler and less noisy?
    3. If this process is less than ideal, would it be better to just use an external?
     
  2. fehhkk macrumors 6502a

    fehhkk

    Joined:
    Jun 11, 2009
    Location:
    Chicago, IL
    #2
    I have an SSD in the hard drive bay, and a 500GB Seagate in an Optibay. With the standard Energy Saver preferences, the Seagate does spin down after a while of not being used (I only use that drive for downloads, and large data files).

    As long as you don't access it frequently (i.e. don't use it as a boot drive or for applications), then it will spin down, no problems.
     
  3. KarmaPolice thread starter macrumors newbie

    Joined:
    Mar 3, 2010
    #3
    thanks a lot. How is the noise and temperature?
     
  4. fehhkk macrumors 6502a

    fehhkk

    Joined:
    Jun 11, 2009
    Location:
    Chicago, IL
    #4
    For temperature it runs fine, the SSD gets a little warm.

    If you notice, once the drive is in the optibay, it sits right next to the slot for the optical drive on the unibody case.

    As far as noise, I barely notice it, unless the room is dead quiet, and then I can hear it spin up/spin down.
     
  5. Charlie.naylor, Apr 7, 2010
    Last edited: Jul 20, 2011

    Charlie.naylor macrumors newbie

    Joined:
    Oct 29, 2007
    #5
    I use this:

    do shell script "touch /Volumes/Backup/.dummy;
    hdiutil eject `disktool -l | grep Backup |
    awk '{ print substr($0,20,7) }'`"

    And it ejects and spins down the disk when the script is run, i set it to run on startup so the disk is "off" when i am in osx.

    to mount it again

    do shell script "diskutil mountDisk `disktool -l |
    grep Backup | awk '{ print substr($0,20,7) }'`"

    I have made a automator thing that runs that before i start Vmware so i can go into my bootcamp partition in vmware.

    I actually have two partitions on that disk but you just have to name one, and it ejects them both.

    I hope this helps.

    EDIT: I just realised I never mentioned this, you need to create a file called .dummy or any file that the script can point to.

    Update for Lion

    Hi all, for Lion the above script doesnt work, I did a little digging and this seems to work:

    do shell script "touch /Volumes/YOURDISKHERE/.dummy;
    diskutil eject YOURDISKHERE"​

    p.s im not sure touch is still necessary but im leaving it in, just in case.
    Hope it works.
     
  6. tidu macrumors newbie

    Joined:
    Aug 23, 2007
    #6
    Sorry to revive an old thread.

    I've got this setup, SSD as my main boot and a 320GB HDD as my optibay. I was the opposite of what OP wants. By default the drive spins down when not in use. My energy saver preferences have "Turn off hard disks when possible" unchecked, so that must only apply to the boot drive. I recently got Steam, installed a few games (on the HDD, SSD is too small) and noticed that they randomly pause every now and then. And then I realized that it's pausing to load new files, and the pause is the game waiting for my HDD to spin up. It took me a while to realize because I couldn't even hear the HDD spin up over the fan noise.

    So is there a command or script to keep the drive spinning? I'm not too concerned about battery life at the moment, especially when I'm playing Half Life 2 ;) Thanks.

    edit: My current idea is to access another file on the drive constantly. I'm going to try to make two small mp3 files, and loop them in a VLC playlist in the background to keep the drive spinning. Hopefully VLC won't put them into the RAM...
     
  7. danwarne macrumors newbie

    Joined:
    Nov 20, 2007
    #7
    I've recently installed an Optibay with 750GB WD HDD into my new MacBook Pro, alongside the 512GB SSD I got from Apple.

    I'm planning to use the 750GB Optibay drive for storing music and video files, since they don't need high performance, and the drive can be allowed to spin down when I'm not listening to music or watching videos, which seems like an ideal arrangement from a power efficiency perspective.

    However, by default OS X seems to take about 10 minutes to spin down the drive after it was last accessed. I found a great tip on MacOSXHints.com which describes how to set the system spindown time -- you just open up a Terminal shell and type:

    Code:
    sudo pmset -a spindown 1
    (where 1 is 1 minute; 0 disables entirely).

    So now, my Optibay drive spins down one minute after it was last used -- perfect! (Especially good since my MBP is near-silent with the SSD just in use, thanks to Apple's really quiet fans when running at their default 2000rpm, and the WD hard drive in the Optibay is actually quite noisy -- it's an audial relief when it spins down!)

    The same tip above can be used to disable spindown if you don't want it to happen.

    The only thing I'm wondering is what effect a spindown has on an SSD, if any. The value set using this tip is system-wide, affecting all hard drives, so if a spindown did happen to put the SSD into some sort of powersaving mode that might not be ideal, however, I haven't noticed anything yet.
     
  8. tidu macrumors newbie

    Joined:
    Aug 23, 2007
    #8
    Wow, I was going through deleting old bookmarks and just happened to check back on this one. THANK YOU so much for this tip. It works great. I used to start playing videos and they would stutter every minute or so for the first five minutes until it seemed like os x "realized" to keep the drive spinning :rolleyes: This is just what I needed. Thank you again.
     
  9. brandaopj macrumors member

    Joined:
    Mar 4, 2010
    Location:
    Portugal
    #9
    this happen to me too.
    I was wondering if this will happen if the drive is in the original place instead of being in the optibay...?
     
  10. brandaopj macrumors member

    Joined:
    Mar 4, 2010
    Location:
    Portugal
    #10
    this script is not working in Mac OS Lion :confused:

    Any fix so it can work?
     
  11. Charlie.naylor macrumors newbie

    Joined:
    Oct 29, 2007
    #11
    Hi there,
    Can you post what you put?

    And also can I check that you created the .dummy file and what error it throws up?

    Thanks.
     
  12. WonkyPanda macrumors regular

    WonkyPanda

    Joined:
    Mar 29, 2010
    #12
    Hey Charlie, I'm a bit of a noob when it comes to doing the shell script. Can you give me a brief walkthrough on how to do it?
     
  13. Charlie.naylor macrumors newbie

    Joined:
    Oct 29, 2007
    #13
    Okay,
    First step is opening the applescript editor.

    Then copy in the following code:
    do shell script "touch /Volumes/YourDriveHere/.dummy;
    hdiutil eject `disktool -l | grep YourDriveHere |
    awk '{ print substr($0,20,7) }'`"

    Clearly you put in the name of the drive you want to eject in YourDriveHere
    Then save it as an app, if you want it to run when you click it.

    It wont work yet.. the next thing is making a textfile and just calling it .dummy. Its just an invisible file that the script can refer to.
    (the easiest way to do this would be to open Textedit then save it in the target HD as .dummy, you dont have to put anything into the text)

    Now if you run the new app, it should work!

    Let me know if you have any problems.
     
  14. WonkyPanda macrumors regular

    WonkyPanda

    Joined:
    Mar 29, 2010
    #14
    Thanks! I ran into issues because my HD is called "Macintosh HD" and the space was throwing off the command. But, placing it as 'Macintosh HD' allowed the name of the drive to be read properly in the command. Thanks a ton!
     
  15. BiggAW macrumors 68020

    Joined:
    Jun 19, 2010
    Location:
    Connecticut
    #15
    I wouldn't put an HD in the Optibay, as I'm not convinced the cooling is very good in there. SSD's aren't really heat sensitive, so they're not an issue. I have my HDD in the HDD bay, and my SSD in the Optibay. Works great.
     
  16. WonkyPanda macrumors regular

    WonkyPanda

    Joined:
    Mar 29, 2010
    #16
    Branda has me worried that the script may no longer work under Lion. I don't see why it shouldn't continue working, but you never know with updates to the OS.
     
  17. Charlie.naylor macrumors newbie

    Joined:
    Oct 29, 2007
    #17
    I have put a new script at the top. I think it does the same job, if any hardcore scripters see this, please provide insight if I am being foolish :)
     
  18. WonkyPanda macrumors regular

    WonkyPanda

    Joined:
    Mar 29, 2010
    #18
    Thanks, Charlie! What about a script for remounting? That seems to have changed as well.
     
  19. Charlie.naylor macrumors newbie

    Joined:
    Oct 29, 2007
    #19
    Use the same script I supplied for Lion, but replace 'eject' with 'mount'

    Thanks
    C
     
  20. tobi2185 macrumors newbie

    Joined:
    Jul 22, 2011
    #20
    If somebody else got problems with charley´s scripting in Lion, heres my solution. Looks like the BSD-Name of the second drive changed in lion, i fixed it:

    files.me.com/tobiasludwig/ty1now

    Put those scripts in ./Library/Service (create folder when not existing). Now you are able to make a keyboard shortcut for those unmount/mount Scripts. Or you can access them from the "services" section in every (!) app menu.

    Feel free to contact me on any problems.
     
  21. bozz2006, Jul 24, 2011
    Last edited: Jul 24, 2011

    bozz2006 macrumors 68030

    bozz2006

    Joined:
    Aug 24, 2007
    Location:
    Minnesota
    #21
    Thanks Tobi. For the uninitiated in scripts (me), can you tell me how to make a keyboard shortcut too? And will the mount/unmount services you posted work without any tinkering for my optibay mounted HDD named "MacHDD"?
     
  22. bozz2006 macrumors 68030

    bozz2006

    Joined:
    Aug 24, 2007
    Location:
    Minnesota
  23. Charlie.naylor macrumors newbie

    Joined:
    Oct 29, 2007
    #23
    Find the downloaded scripts, open them, click Install to install the scripts as services, then go to system preferences > Keyboard.
    Then scroll down to services then find the ones you installed. You can set a shortcut there.
     
  24. bozz2006 macrumors 68030

    bozz2006

    Joined:
    Aug 24, 2007
    Location:
    Minnesota
    #24
    I installed the scripts just as you said, and made keyboard shortcuts for them. Followed your instructions and they seemed to work just fine. However, the shortcuts don't do anything when I press them. Any thoughts?
     
  25. Charlie.naylor macrumors newbie

    Joined:
    Oct 29, 2007
    #25
    The script probably doesnt point to the drive you want to unmount, you will need to edit the script and put in the appropriate drive
     

Share This Page