My internal hard disk would constantly spin on my Macbook Pro and never goes to sleep. I replaced my internal disk on my MacBook Pro with a SSD disk, which made a huge difference in speed. At the same time I removed the DVD unit and installed a new 500gb disk instead. The extra disk went to sleep when not in use, but then started within a couple of minutes or less. Here’s what I did to fix that problem.
Finding out the culprit
First of all I needed to change the time before the disk went to sleep. I set the value before sleep to one minute, so I don’t have to wait long between tests.
This will set the time until sleep to one minute when using an AC adapter. Replace -a with -b for changing the setting when on battery power.
To find the applications that was accessing the volume, I opened the terminal application and started to observe the output of the following terminal command. To narrow the output I use grep to just show events and access to the extra disk. Otherwise your going to get a LOT of unnecessary output.
This will show you the name of your connected volumes. If the volume name contains spaces you need to add \ before every space character. For example, let’s say the volume name is Macintosh HD, you need to use
Replace name_of_volume with the name of your disk.
Enter your login password. When the disk wakes up, press ctrl-c to stop. The text can scroll pretty fast. Look at the right column for stuff that might have activated the disk.
The first thing I noticed was that fseventsd was logging information to the external disk. To deactivate the logging, just enter the following:
sudo touch .fseventsd/no_log
I continued to look for applications or processes that accessed my disk, and one of them was iStat Menu. I checked the settings for iStat Menu, and the disk info part was disabled, but it still accessed the disk. So I had to disabled it. I love iStat Menu, so that felt a bit sad, but until they fix this it will be turned off.
Update: Thanks to one of my readers Hextor for finding this. There’s a way to get iStat Menu without the disk constantly waking from sleep. Just disable the S.M.A.R.T check of the disk.
I have a lot of links for stuff like the download folder, Final Cut Pro settings, buffers for applications and all my photos on the extra disk so naturally the extra disk will start when using applications using these files. But now when I surf the web or write, I no longer have to listen to the sound of the disk. Blissful silence.
If you don’t need to do Spotlight searches on that disk, you can add the disk to the ignore list in the Spotlight settings under System Settings. Or disable Spotlight all together.
On my machine I’ve disabled Spotlight altogether. Found this post detailing on how to do it.
To enable it, use the same command, but replace “off” with “on” instead.
Disable Time Machine Local Backups
When OS X can’t connect to your Time Machine backup server, the operating system does local backups. This would sometimes start up the disk. After reading this description on how to disable local backups on my machine, the disk never wakes up if I’m not directly accessing it. But if your not connected to a backup device for Time Machine, there’s a risk of losing information if something goes wrong, so read the linked article before proceeding.
You can now change the time before the disk goes to sleep. My 7200rpm disk starts very quickly so I kept mine on a couple of minutes. Added benefit? Much better battery life!
I hope this helps you if you have the same problem.