I have two external USB drives connected to my mac. If I use Disk Utility to eject one then Disk Utility locks-up until the external drive wakes from hibernation (unparks, spins up). Why?

This is particularly annoying if I happen to want to unmount more than one sleeping external drive as I have to wait for one to wake-up before I can click Eject for the other device.


When you unmount cleanly (e.g. eject a drive, rather than just unplugging it hot), you're letting the OS do clean up activity to the drive (which prevents the repair dialog you sometimes see when you plug in a drive).

In this case, the drives are probably spinning up to close file handles, write out journaling data if needed, parking the heads, flushing write cache, etc.

As for why Disk Utility locks while doing this, that's a question only the designers/implementers of the program can answer. My best guess would be that they made the update of the UI an atomic operation with respect to the disk, so that an accurate state is always reflected in the UI. If they background this kind of operation, the UI is indeterminate with respect to the actual state of the disk.

It would also require some guessing as to what operations are safe to background and which are not.

  • Yes that's all well and good and totally understood. My question is why does DiskUtility lock-up? By lock-up I mean that the Disk Utility program does not respond to any userinput until the drive has spun up (say 3s) - during that time if you try to click a menu or eject another drive or perform any GUI operation with DiskUtility it ignores you entirely. – Ram May 7 '13 at 17:19
  • 1
    @Ram Disk Utility is not aware that the drive is sleeping. It simply issues a read request to the disk. Whenever an application issues a request to a disk, the OS freezes that thread until it can fulfill or reject the request - in this case, it must wait for the disk to spin up before it knows if it can do either. Ideal situation would be that Disk Utility does it on a background thread, but I would assume they don't if it causes the GUI to freeze. Not much you can do about it though. – Darth Android May 7 '13 at 19:51
  • @DarthAndroid yep that's what I figured an don't understand the rational for - why would they decide to implement a blocking request in the main thread; I was hoping to learn the rational by asking here. A similar and even more situation arises when Finder decides to poll the disks and one is asleep as Finder. – Ram May 7 '13 at 20:26
  • @Ram updated with my best guess, but I don't think you'll get a definitive answer unless someone who actually worked on Disk Utility comes by . . . – ernie May 7 '13 at 21:49
  • There are GUIs handling this kind of situation - I think I've seen a few different masking effects (waffling?) to indicate an object was in flux or in an unknown state at the moment. In any case it shows up in other places in OSX - more than I would expect is necessary locks-up (blocks synchronously). – Ram May 7 '13 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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