From owner-freebsd-stable@FreeBSD.ORG Wed Jul 18 18:53:50 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 28E0916A402 for ; Wed, 18 Jul 2007 18:53:50 +0000 (UTC) (envelope-from kris@pcbsd.com) Received: from pcbsd.ixsystems.com (pcbsd.ixsystems.net [206.40.55.78]) by mx1.freebsd.org (Postfix) with ESMTP id 1029C13C4A8 for ; Wed, 18 Jul 2007 18:53:49 +0000 (UTC) (envelope-from kris@pcbsd.com) Received: from [192.168.1.102] (c-67-170-130-86.hsd1.wa.comcast.net [67.170.130.86]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pcbsd.ixsystems.com (Postfix) with ESMTP id 861FC145F42B for ; Wed, 18 Jul 2007 19:00:43 +0000 (UTC) Message-ID: <469E61DB.4000402@pcbsd.com> Date: Wed, 18 Jul 2007 11:54:19 -0700 From: Kris Moore User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <200707181541.l6IFf4ht051775@lurza.secnetix.de> <20070718170559.GA11915@eos.sc1.parodius.com> <20070718173406.GA16748@soaustin.net> <200707181942.45045.idiotbg@gmail.com> In-Reply-To: <200707181942.45045.idiotbg@gmail.com> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 18:53:50 -0000 Momchil Ivanov wrote: > On Wednesday 18 July 2007 19:34:06 Mark Linimon wrote: >> On Wed, Jul 18, 2007 at 10:05:59AM -0700, Jeremy Chadwick wrote: >>> Bottom line here is that the kernel panics when removing a USB device >>> that has filesystems mounted. >> s/USB // > > Just a dumb question: what does "umount -f" does? And doing something like > that when a fs goes away shouldn`t fix it? > > If the problem is in general with a file system, regardless of the provider, > then what does one do when a mounted smbfs becomes unavailable due to remote > host down, no route to host or some other network related problems? Same > question for NFS mounted filesystems? > > > > ------------------------------------------------------------------------ > > !DSPAM:1,469e538b20763944420674! Wow, quite a thread going on over this issue. I'll throw my 2cents into the ring also :) >From a desktop perspective, it makes total sense to not have the system crash just because a USB disk was unplugged while mounted. When a new end user does this for the first time and the system crashes, usually the first thing they assume is that it's a bug. Then somebody like me comes around and tells them to unmount it first. Then usually the next thing they say is something along the lines of "That's so early 90's, why can't you guys get your act together?" I can understand requiring unmounting for devices such as CD's or internal IDE / SCSI hard drives. With a CD at least you can physically "lock" the drive bay to prevent the user from ejecting until unmounted first. However, with a USB the ballgame changes, the whole concept is to be hot-swappable, plugin and unplug at will. If a "normal" desktop user copies a file to a USB disk and the file transfer dialog is done, then they should be able to unplug it, without a total system crash. That being said, I think it would be a good idea to at least have the kernel / HAL or some process maybe warn the user that they should unmount the USB disk first, to prevent data loss at minimum. But I think this can be improved, so you don't have to deal with an entire system panic :P When that happens you gotta reboot, fsck, and run the risk of something really being corrupted on the drive :( -- Kris Moore PC-BSD Software http://www.pcbsd.com