From owner-freebsd-questions@FreeBSD.ORG Thu Mar 20 09:08:16 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A499106566C for ; Thu, 20 Mar 2008 09:08:16 +0000 (UTC) (envelope-from pcloches@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id 7AE4D8FC12 for ; Thu, 20 Mar 2008 09:08:16 +0000 (UTC) (envelope-from pcloches@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so908938waf.3 for ; Thu, 20 Mar 2008 02:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=elVUbvKavG7kEZgHdKH3fNWKcgeJKl3O4kYLXpO/zCk=; b=P7lRRNnBg7nKT9D4ngOpfcEDSYoiwIae1hkeF+/LOs8r10YoJPUHAiZ8l+0784kOgWkVvrfKxv4MsXITmuE/4zv1ejn+lSagTi5icRc12tNm8FLu25kFFLMHziDF28fwm1ONj9KXGJt//UiC2EUOJ9rrITrq9UjxPeyzdYQLJKg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AhEllb0yJK5P7xohEzXxRCPbzZ/gY5D2hIERVWmZJsGNV6vB1DHRSCPICdpE5sEaRVEWiKObvNvFBsbQQHTZUxMNVkFLTIpBI4LorEVOLbEhMW/KiQFlFL4Jis45Y4MMV6u8NqbeOYk839J94zzVjoKeFqzn1V/wSudWY04EJzs= Received: by 10.114.157.1 with SMTP id f1mr3139110wae.10.1206004095559; Thu, 20 Mar 2008 02:08:15 -0700 (PDT) Received: by 10.114.195.4 with HTTP; Thu, 20 Mar 2008 02:08:15 -0700 (PDT) Message-ID: <34394a3a0803200208m4910f35dxc92662e28f2523e7@mail.gmail.com> Date: Thu, 20 Mar 2008 02:08:15 -0700 From: "Patrick C" To: "Da Rock" , freebsd-questions@freebsd.org In-Reply-To: <20080320074312.GB59070@slackbox.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1205978132.27757.28.camel@laptop2.herveybayaustralia.com.au> <20080320074312.GB59070@slackbox.xs4all.nl> Cc: Subject: Re: removable devices auto umounting 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: Thu, 20 Mar 2008 09:08:16 -0000 What about a "Safely Remove Hardware"-style icon on your desktop, which could simply run a script to unmount (with force if the user has it open somewhere). -Patrick On 20/03/2008, Roland Smith wrote: > On Thu, Mar 20, 2008 at 11:55:32AM +1000, Da Rock wrote: > > I'm just looking into the removable device issue for freebsd. I can see > > its easy enough to auto mount a removable device (although I could use > > some help getting sd/xd devices working with my card reader), but the > > removal seems to come unstuck. > > > > I have some barely literates on my systems, so I do need to work this > > out. Is it possible to use a forced umount to do this? What are the > > options here? > > > In short, no. Removal of a USB device would be forwarded to devd(8). But > since the device is no longer there at that moment, you cannot unmount > it anymore. You might get a nice kernel panic for your efforts, though. ;-) > > The FreeBSD disk subsystem was simple not written with removable devices > in mind, because they didn't exist back then. Until that code is fixed > (which is hard) you _have_ to unmount before you pull the device out. > > One (not bullet-proof) workaround might be to use the automounter > [amd(8)], and have it unmount very quickly after they stop being > active. This requires setting both the 'cache_duration' and > 'dismount_interval' options in amd.conf(5) to very low values. > > Roland > > -- > R.F.Smith http://www.xs4all.nl/~rsmith/ > [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] > pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) > >