umount device busy

Warren Block wblock at
Mon Jun 4 14:15:41 UTC 2012

On Mon, 4 Jun 2012, Gary Aitken wrote:

> On 06/03/12 21:05, Polytropon wrote:
>> Maybe the ganim "lock" is regarding a device file? Not sure
>> about that, I'm not using it here.
> I'm not sure what the deal is here, but exiting X does solve the 
> problem.  I didn't try just killing the environment by shutting down 
> the wm and leaving X up, but if I forget and do something like that 
> again I'll try to remember to try it.

gamin opens the directory (of the newly-mounted device) so it can check 
for new files being created or files being renamed, and then notify the 
window manager, which updates the user's desktop.  The open makes the 
device in-use, preventing an unmount.

Setting gamin to "poll" helps.  (I assume it opens the directory, scans, 
then closes it again, so there's a race condition there, but I haven't 
encountered it.)

gamin can also be disabled for certain directories.  That works (AFAIR, 
it's been a while), but then you lose instant icon updates on the very 
directories where it is the most useful.

More information about the freebsd-questions mailing list