From owner-freebsd-questions@FreeBSD.ORG Mon Jun 4 14:15:41 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3B43106574A for ; Mon, 4 Jun 2012 14:15:41 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 6E0308FC16 for ; Mon, 4 Jun 2012 14:15:41 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id q54EFVJ9098328; Mon, 4 Jun 2012 08:15:31 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id q54EFVA0098325; Mon, 4 Jun 2012 08:15:31 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 4 Jun 2012 08:15:31 -0600 (MDT) From: Warren Block To: Gary Aitken In-Reply-To: <4FCC6A41.6030408@dreamchaser.org> Message-ID: References: <4FCB7BBF.7090603@dreamchaser.org> <7581F5930C4F42B28B1E4A5162491B35@astrolap> <4FCC1D4C.2020503@dreamchaser.org> <20120604050537.f2df2af2.freebsd@edvax.de> <4FCC6A41.6030408@dreamchaser.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Mon, 04 Jun 2012 08:15:31 -0600 (MDT) Cc: Polytropon , FreeBSD Mailing List Subject: Re: umount device busy X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 14:15:41 -0000 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.