Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jul 2007 17:41:04 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-stable@FreeBSD.ORG, LoN_Kamikaze@gmx.de, idiotbg@gmail.com, josh@tcbug.org
Subject:   Re: removing external usb hdd without unmounting causes reboot?
Message-ID:  <200707181541.l6IFf4ht051775@lurza.secnetix.de>
In-Reply-To: <200707181703.07480.idiotbg@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Momchil Ivanov wrote:
 > On Wednesday 18 July 2007 15:52:42 [LoN]Kamikaze wrote:
 > > Josh Paetzel wrote:
 > > > Yes, it's expected behavior.  The workaround is to not unplug mounted
 > > > devices. (There's nothing special about USB here, if you unplugged an
 > > > IDE drive you'd get the same behavior)
 > > 
 > > Wouldn't it make some sense not to panic if mounted devices that are in
 > > sync get removed? A few applications might get in trouble, but that's
 > > hardly a reason to bring a whole system down.
 > 
 > I don`t know how things work, but shutting down the system when some
 > mounted fs is no longer present seems like the wrong thing to me.

As Josh wrote, it's expected.  The problem is known
to exist for a long time already (probably as long
as FreeBSD itself exists), and if there was an easy
solution, certainly someone would have fixed it.

Just remember to always umount first, and you're safe.
In the early 90s I panicked a FreeBSD machine by
removing a floppy disk that was mounted.  I did that
mistake only once -- afterwards I always remembered.

If you have problems remembering, another work-around
is to use the auto mounter daemon (amd(8)).  It umounts
file systems automatically that are not in use.
Another nice feature of amd(8) is that you don't have
to mount the file system either -- Simply plug the USB
stick in, then access it, and amd(8) will automatically
mount it for you.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"I learned Java 3 years before Python.  It was my language of
choice.  It took me two weekends with Python before I was more
productive with it than with Java." -- Anthony Roberts



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