Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jul 2007 11:54:19 -0700
From:      Kris Moore <kris@pcbsd.com>
To:        freebsd-stable@freebsd.org
Subject:   Re: removing external usb hdd without unmounting causes reboot?
Message-ID:  <469E61DB.4000402@pcbsd.com>
In-Reply-To: <200707181942.45045.idiotbg@gmail.com>
References:  <200707181541.l6IFf4ht051775@lurza.secnetix.de>	<20070718170559.GA11915@eos.sc1.parodius.com>	<20070718173406.GA16748@soaustin.net> <200707181942.45045.idiotbg@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


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





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