stop hard drive running at startup

Discussion in 'iMac' started by tobypb, Jun 29, 2011.

  1. tobypb macrumors member

    Joined:
    May 27, 2011
    Location:
    UK
    #1
    I want to stop my secondary hard drive from being mounted at startup. I have an 256GB SSD + 1TB HDD, and in normal operation of my mac I don't need to access the HDD, I only need to access it when I want to watch a film, things like that.

    I want to switch it off from the point of view of noise, when the hard drive is on its fans or idle spin can be heard, mainly becuase the rest of my mac is virtually completely silent. As soon as I unmount the drive the slight sound stops my mac enters virtual silence, something I find quite magical :cool:

    Any ideas would be welcome
     
  2. KasperH macrumors regular

    KasperH

    Joined:
    May 26, 2011
    #2
    will unmounting the drive from within OSX turn off the power to the drive and make it silent, in it's current config? didn't think that was possible, how do you mount it again then...reboot?

    If it's possible, a script that unmounts the drive at startup, would probably be your solution. (sure someone can make one)
     
  3. tobypb thread starter macrumors member

    Joined:
    May 27, 2011
    Location:
    UK
    #3
    It does make it silent - as long as nothing else tries to stat the hard drive. For example iStat starts the hard drive up again.

    I can remount the hard drive with this command: diskutil mountDisk /dev/disk1

    can also unmount with diskutil eject Volumes/(volume name)

    Perhaps I'll write a script to do it, but this is my first mac so I haven't looked into how to do that (although I am familiar with linux)
     
  4. karl878 macrumors member

    Joined:
    Dec 8, 2005
    Location:
    CA
  5. Vylen macrumors 65816

    Joined:
    Jun 3, 2010
    Location:
    Sydney, Australia
    #5
    I'm not at my Mac right now so I can't be certain about things...

    I was going to suggest editing the /etc/fstab file, but apparently that was deprecated in Leopard, and is probably now removed from Snow Leopard...

    But, some Googling brings up things like autofs (apropos autofs) and vifs.

    Try searching around for things like that.

    Good luck ;)
     
  6. upaymeifixit macrumors 6502a

    upaymeifixit

    Joined:
    Feb 13, 2009
    #6
  7. tobypb thread starter macrumors member

    Joined:
    May 27, 2011
    Location:
    UK
    #7
    I did try googling, and got those same results, but none were satisfactory. Actually I've noticed that unmounting the drive doesn't always spin it down, but ejecting does. I'm not aware of what the difference is but the program for unmounting above unmounts and doesn't eject.

    I tried the fstab too, but it didn't seem to have effect on the OS. I guess you must be right that it is no longer read in snow leopard.

    What I'd really like is to discover a way to prevent the OS from mounting the drive in the first place, as having it mounted and the ejected is a bit of a hack, and it means my boot time is slowed down from the access of the drive (by 1-2 seconds lol)
     
  8. John T macrumors 68020

    John T

    Joined:
    Mar 18, 2006
    Location:
    UK.
    #8
    I have a couple of drives permanently connected to my iMac for backup purposes. Consequently I don't need them running all the time.

    I just leave 'em switched off when not required. Simple! :)
     
  9. Vylen macrumors 65816

    Joined:
    Jun 3, 2010
    Location:
    Sydney, Australia
    #9
    That's great and all, but the OP has the SSD + HDD configuration. He wants to stop auto-mounting the internal HDD.
     
  10. tobypb thread starter macrumors member

    Joined:
    May 27, 2011
    Location:
    UK
    #11
    Implemented a hack for now, created an apple script that will mount the drive if it is not mounted, or eject it if it is mounted, a toggle drive utility. Heres the script:
    Code:
    tell application "Finder"
    	if not (exists the disk "HDD") then
    		do shell script "diskutil mountDisk /dev/disk1"
    	else
    		do shell script "diskutil eject /dev/disk1"
    	end if
    end tell
     
  11. Denisoftus macrumors member

    Joined:
    Jun 2, 2011
    #12
    The problem is, it will still start again after the sleep, even for a minute still it's a pain. Can someone suggest how to keep it off untill required?

    I rose this question in a separate thread, I'm glad I'm not alone in that.
     
  12. tobypb thread starter macrumors member

    Joined:
    May 27, 2011
    Location:
    UK
    #13
    Cool, an ally against hard drive sound hehe. I noticed that too, the best I can do for now is to have the script as an icon on the dock I can click after resuming from sleep. Be fantastic if the default in the OS could be changed though
     
  13. riptideMBP macrumors 6502

    Joined:
    May 29, 2011
    #14
    I had the same issue as you... to do what you wanted initially, use this guide. Unfortunately that only keeps the hard drive off until you sleep the laptop, so its pretty much pointless (it stays unmounted, but spins up after wake). Next I wrote the same script you did in order to be able to turn the hard drive off and on. As this is somewhat inconvenient, i've resorted to letting the computer put the drive to sleep by itself while on ac, and then using the toggle program while on battery. If anyone has a more automatic solution, it would be great to hear!
     
  14. Denisoftus macrumors member

    Joined:
    Jun 2, 2011
    #15
    Well, using the script is almost the same what I already have, adjusting the sleep time to 5 mins. What annoys me is spinning the drive on and off after the sleep and occasionally with no reason in between.

    I can only hope that Lion will have it fixed.
     
  15. tobypb thread starter macrumors member

    Joined:
    May 27, 2011
    Location:
    UK
    #16
    stopping the drive mounting at startup through the fstab works, but on my iMac atleast the drive is still spun up, so still makes that slight whirring sound.

    I prefer my script for now which ejects the drive once the os has started up, it seems eject, unlike unmount, spins the drive down completely (perhaps on macbook pro's unmount spins them down as well I don't know).

    Actually if I had known I could get away with all my data on my SSD and just media and stuff on the HDD I would have been tempted by SSD only; Still I'm a happy camper with my new iMac, beats my old PC any day :D
     

Share This Page