From owner-freebsd-stable@FreeBSD.ORG Wed Jul 18 16:36:47 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 169E116A404 for ; Wed, 18 Jul 2007 16:36:47 +0000 (UTC) (envelope-from baldur@foo.is) Received: from gremlin.foo.is (gremlin.foo.is [194.105.250.10]) by mx1.freebsd.org (Postfix) with ESMTP id 8E1A613C4B2 for ; Wed, 18 Jul 2007 16:36:46 +0000 (UTC) (envelope-from baldur@foo.is) Received: from 127.0.0.1 (localhost.foo.is [127.0.0.1]) by injector.foo.is (Postfix) with SMTP id 9E855DA842; Wed, 18 Jul 2007 16:36:45 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on gremlin.foo.is X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.7 Received: by gremlin.foo.is (Postfix, from userid 1000) id 30801DA84A; Wed, 18 Jul 2007 16:36:42 +0000 (GMT) Date: Wed, 18 Jul 2007 16:36:42 +0000 From: Baldur Gislason To: Momchil Ivanov Message-ID: <20070718163642.GY36311@gremlin.foo.is> References: <200707181541.l6IFf4ht051775@lurza.secnetix.de> <200707181830.48727.idiotbg@gmail.com> In-Reply-To: <200707181830.48727.idiotbg@gmail.com> User-Agent: Mutt/1.4.2.2i X-Sanitizer: Foo MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Cc: LoN_Kamikaze@gmx.de, freebsd-stable@freebsd.org, josh@tcbug.org Subject: Re: removing external usb hdd without unmounting causes reboot? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2007 16:36:47 -0000 This really struck me as a problem when I had a short power outage and my external USB hard drive wasn't plugged into the UPS. Laptop didn't reboot from the power outage but it rebooted anyway because it lost a hard drive (which was mounted but I wasn't doing any work on) Baldur On Wed, Jul 18, 2007 at 06:30:44PM +0200, Momchil Ivanov wrote: > On Wednesday 18 July 2007 17:41:04 Oliver Fromme wrote: > > 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 > > I started the thread just because it hit me today. I wanted to disconnect my > mouse and forgot that the hdd is connected to the same hub, I realized that > after having unplugged the usb hub and saw the system freeze. I know that > this has been an issue for a long time. With cdroms it`s easy, the tray won`t > open until you umount the cd fs, floppies......... nowadays they have been > replaced by usb sticks, but they have no trays as cdroms do :) moreover > people use other usb storages too and unplugging those is just as simple as > unpluging the cable. > > I think this is a critical problem and needs to be addressed, avoiding it > doesn`t solve it. > > As technology advances I think FreeBSD has to advance too. You said you > paniced a system in the early 90s, which is more than 10 years from now. In > the past floppy disks were maybe the only problem, but nowadays as storage is > cheap more and more people use USB storage devices, and these are easy to > unplug. It`s even worse if you have a laptop, since it`s easier to connect > everything to a hub (mouse, hdds, other usb stuff) and connect/disconnect it. > > In the days before common storage devices (hard drives) where fixed inside the > computer`s case, so unpluging a hard drive when the computer was running was > considered as "insane", so panicing is ok. Nowadays things have changed. USB > (maybe Firewire too, have no experience with that) offers a simple way to > connect/disconnect devices to your computer (here I have to note: not just > one!), having a laptop and 1,2,3 or even more external storage devices is > something usual. > That`s why I think this particular problem needs to be addressed. > > Thanks for the tip about amd(8) I will give it a try. > > -- > PGP KeyID: 0x3118168B > Keyserver: pgp.mit.edu > Key fingerprint BB50 2983 0714 36DC D02E  158A E03D 56DA 3118 168B >