Date: Wed, 18 Jul 2007 13:34:51 -0700 From: Kris Moore <kris@pcbsd.com> To: freebsd-stable@freebsd.org Subject: Re: removing external usb hdd without unmounting causes reboot? Message-ID: <469E796B.3050609@pcbsd.com> In-Reply-To: <20070718200937.GA15560@eos.sc1.parodius.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?469E796B.3050609>