From owner-freebsd-stable@FreeBSD.ORG Wed Jul 18 20:34:21 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 E1D3D16A40B for ; Wed, 18 Jul 2007 20:34:21 +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 C2C7513C494 for ; Wed, 18 Jul 2007 20:34:21 +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 392A6145F42E for ; Wed, 18 Jul 2007 20:41:15 +0000 (UTC) Message-ID: <469E796B.3050609@pcbsd.com> Date: Wed, 18 Jul 2007 13:34:51 -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> <469E61DB.4000402@pcbsd.com> <20070718200937.GA15560@eos.sc1.parodius.com> In-Reply-To: <20070718200937.GA15560@eos.sc1.parodius.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 20:34:22 -0000 Jeremy Chadwick wrote: > On Wed, Jul 18, 2007 at 11:54:19AM -0700, Kris Moore wrote: >> 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 :( > > So there's two issues here: > > 1) Kernel panics when a device (regardless of type (USB, SATA, etc.)) > is removed from the system with filesystems mounted, > > 2) Concern over data loss when device is removed. > > As I mentioned earlier in the thread, Windows addresses #2 by marking > all filesystems on USB storage devices (thumb drives, HDDs, etc.) as > synchronous (e.g. mount -o sync). The impact is slow I/O, but it's > safe. > > It seems like we'd be able to implement such a transparent "feature" > into the subsystem where filesystems mounted from USB devices would use > synchronous I/O (mount -o sync). I don't know how this would be coded, > since there would have to be some way to figure out a physical device > type (USB mass storage devices show up as /dev/daXXX). > > Providing an override option for those who know what they're doing, > (umount /mnt then physically remove device) would be nice too. > > This would alleviate concerns over data loss, would it not? > This sounds like an excellent idea to me. If something along these lines were implemented, it would be very helpful for us on the desktop end of things. -- Kris Moore PC-BSD Software http://www.pcbsd.com