Force dismount a stuck volume
Apr 26, '02 08:30:26AM
Contributed by: Alieno
I found that the command
% hdiutil eject -force device_name
is able to simply force eject a unit witch refuses to unmount due to files still "in use". The device_name can be estabilished by consulting the df command.
I wonder if there is any drawback in using 'hdiutil' in this way.
[Editor's note: Please note that there is a hint about Ejecting a busy disk image with a different method of solving the problem - namely, identifying the processes that are preventing the ejection in the first place. I believe this would be the preferred manner of resolving a stuck Volume problem, as it cleans everything up prior to unmounting the volume. I've chosen to publish this "brute force" method in the event that the first method fails to solve the problem ... and in the hopes that it sparks some conversation about the possible dangers -- what can go wrong if you force eject a busy volume? Thoughts?]
Comments (6)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20020426083026328