Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Mar 2008 02:08:15 -0700
From:      "Patrick C" <pcloches@gmail.com>
To:        "Da Rock" <rock_on_the_web@comcen.com.au>, freebsd-questions@freebsd.org
Subject:   Re: removable devices auto umounting
Message-ID:  <34394a3a0803200208m4910f35dxc92662e28f2523e7@mail.gmail.com>
In-Reply-To: <20080320074312.GB59070@slackbox.xs4all.nl>
References:  <1205978132.27757.28.camel@laptop2.herveybayaustralia.com.au> <20080320074312.GB59070@slackbox.xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <rsmith@xs4all.nl> 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)
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34394a3a0803200208m4910f35dxc92662e28f2523e7>