8

I have 2 disks in MBP: SSD and regular HDD. I keep only data files on HDD and do not need them often. The problem: even if I eject the HDD drive from Finder or Disk Utility, when macbook is awaken from sleep, OS automatically wakes up HDD. Is it possible to prevent it?

Addition: Ideally it would be cool to make OS not to spin up even mounted drive.

ivanzoid
  • 507
  • 1
  • 4
  • 11

1 Answers1

2

I think your best bet would be to set the drive to only be mounted manually. I imagine there is a GUI way to do this in OSX but the following, UNIX, approach should also work.

Edit the file /etc/fstab and look for the line mounting the relevant drive. Should be something like:

UUID=a180cec0-xcad-4344-2e19-7b0249ef23b0   /Volumes/foo    hfs rw,auto 0   0

The first field is the disk name or UUID, the second is the mount point, third is the file system and fourth is the options. The last two are for integrity checks and can be ignored for now. Remove auto (if present) from the options field and add "noauto":

 UUID=a180cec0-xcad-4344-2e19-7b0249ef23b0  /Volumes/foo    hfs rw,noauto 0 0
terdon
  • 52,568
  • 14
  • 124
  • 170
  • 1
    The disk isn't mounted since he ejected it before sleeping. But it's apparently starting to spin despite that. – Daniel Beck Aug 18 '12 at 16:45
  • 1
    @DanielBeck I know, but I figure that when the computer wakes up, it reads fstab and mounts what needs to be mounted. If the drive is set to not automount I would expect it to remain asleep. – terdon Aug 18 '12 at 16:49
  • 1
    @terdon, wow, it looks that /etc/fstab is no longer used in Mountain Lion. :( It's only /etc/fstab.hd exists with the following contents: http://pastebin.com/T6cZne4t – ivanzoid Aug 18 '12 at 17:13
  • 1
    @ivanzoid terdon wanted to address you in his above comment. – Daniel Beck Aug 18 '12 at 17:34
  • 1
    According to [this](http://superuser.com/questions/336455/mac-lion-fstab-is-deprecated-so-what-replaces-it-to-prevent-a-partition-from-m) question, fstab is still valid just not created by default. Try adding the line I suggested and see how it goes. @DanielBeck, I hope it is :) – terdon Aug 18 '12 at 18:15
  • 1
    @terdon I tried, unfortunately it doesn't help. I mean, it seems to be working — volume is not auto-mounted after reboot, but it does not prevent drive from spinning up when computer leaves sleep – ivanzoid Aug 19 '12 at 04:42
  • 1
    @terdon, aha, the funny thing is that after I added this line to `/etc/fstab` I'm no longer able to mount the drive even from Disk Utility! ;) Removing the line restored the functionality. – ivanzoid Aug 19 '12 at 06:46
  • 1
    @ivanzoid Well, that's no good... – terdon Aug 19 '12 at 12:02