Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a Mac Mini with a few external drives connected that I use as a home server. Normally the Eject buttons next to the drive icon are really handy as they let me eject an external drive very easily (compared to Windows for instance).

However on a Mac server, this comes as a detriment. I have some pretty mission critical stuff on external drives and there's a lot of scripts etc. I have set up that are dependent on those drives being there. Being able to so easily accidentally eject those drives makes me rather uneasy.

So far I've just chosen to not show them in the Finder sidebar, that way at least they're a bit harder to eject. However that isn't very ideal because: (1) I need to go to my Mac in the sidebar to access the drives rather than have the drives accessible directly and (2) the eject buttons still show in open/save dialogue boxes for those drives.

Ideally, I'd like a way for them to behave the way internal drives do: no option to easily eject from the finder, but still possible to unmount through disk utility.

share|improve this question

This question has an open bounty worth +50 reputation from bmike ending in 5 days.

This question has not received enough attention.

Ideally I can see about three answers to this. How to control the mount (matrix?) how to hack the finder to suppress the eject buttons and how to systematically mark drives as busy.

2 Answers 2

Place a foot in the door.

  • On each of your disks, create a text file, open it in TextEdit, add some line, and leave the file open unsaved.

I think this trick will prevent ejection.

Test this trick, try to eject the disk and come here tell us the result.

This trick can easily be automated.

share|improve this answer
→ Nicolas, your method is working, but a bit heavy. The image of the foot is OK :). I suggest here a simpler method. If the disk is mounted under /Volumes/do_not_eject, just open this directory: cd /Volumes/do_not_eject. If you want to free it, just cd /. –  daniel Azuelos yesterday
@danielAzuelos I think you should post this as a solution –  Chen Asraf yesterday

There is always

sudo hdiutil attach -notremovable ...

to prevent the image from getting removed but this may be a bit too strong for your taste

From the hdiutil manpage:

prevent this image from being detached. Only root can use this option. A reboot is nec- essary to cleanly detach an image attached with -notremovable.

share|improve this answer
I'm pretty sure that only works with disk images. –  Gordon Davisson Jun 6 '12 at 5:07
Patrix, can you develop ? What is this supposed to do ? –  Nicolas Barbulesco yesterday

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.