Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My Mac has an external disk attached, and I often get "disk not ejected properly" warnings after resuming the computer from sleep. These warnings appear only when the disk has spun down during the sleep, and it seems that they are related to how long OS X is willing to wait for a device to become present before declaring it disconnected after resuming from sleep.

It would be nice to not get the annoying pop-up upon resuming from sleep, and the messages about journal replay in kernel.log look slightly alarming, even though it is unlikely that anything wouldn't have gotten written to disk while the computer was idle before going to sleep. Can this wait time be increased somehow?

share|improve this question
How is this disk connected to your mac? Via an active hub? If it's not connected directly into your Mac, do this once and report back. – gentmatt Dec 22 '11 at 9:24
@Matt, I don't know about the OP, but mine (I put the bounty on) is connected directly to my Mac. – Daniel Dec 22 '11 at 14:42
In a German forum one person mentioned that the program PleaseSleep solved his problem. – gentmatt Dec 22 '11 at 15:23
In my case it's connected through a hub. I doubt that makes a difference. – Tuure Laurinolli Dec 26 '11 at 1:05

There are various google results for ejecting volumes on sleep, which should solve this problem.

First, write yourself a shell script to eject the volume. You could avoid setuid bits by using apple script.

tell application "Finder" to eject (disks where name = "VOLUME")

Next, install the SleepWatcher tool and configure ~/.sleep or /etc/rc.sleep appropriately.

There are similar directions for remounting the disk on wake in that Mac OS X Hints entry, but maybe you don't need that.

share|improve this answer
What's the benefit of AppleScript instead of using hdiutil unmount /Volumes/VOLUME? – patrix Dec 21 '11 at 18:24
None afaik, umount itself usually requires root, but maybe hdiutil handles that. – Jeff Burdges Dec 21 '11 at 19:15
This looks promising. I'd love to find a solution that just changes the time the OS will wait for the drive to wake up without unmounting the drives on sleep, but this is the best line of action I've seen so far. – Daniel Dec 21 '11 at 19:26
If you click though to the, it discusses remounting the drive on wake, which works unless the drive in encrypted. – Jeff Burdges Dec 21 '11 at 19:48
If you have macports, you can install sleepwatcher with sudo port install sleepwatcher apparently – Jeff Burdges Dec 24 '11 at 16:27

You can try autoeject or jettyson. They should both serve your purpose.

share|improve this answer
They might help the OP. I'm running 10.5, and they both require 10.6.8, so they don't help me. They do look like good programs, though. – Daniel Dec 21 '11 at 19:24

Have you tried this:

sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true

This should stop the disk demounting when you log out, whether or not it also works for sleep I don't know (and cannot test right now).

share|improve this answer
Doesn't seem to help :-( – Daniel Dec 21 '11 at 19:24
Note that the problem is not that disks are unmounted when the computer goes to sleep, rather when it wakes up and the disk is slow to spin up. – Tuure Laurinolli Dec 26 '11 at 1:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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