removing external usb hdd without unmounting causes reboot?

Momchil Ivanov idiotbg at gmail.com
Wed Jul 18 15:03:11 UTC 2007


On Wednesday 18 July 2007 15:52:42 [LoN]Kamikaze wrote:
> Josh Paetzel wrote:
> > On Wednesday 18 July 2007, Momchil Ivanov wrote:
> >> Hi,
> >>
> >> I am running FreeBSD 6.2-STABLE #11: Sat Jul 14 16:27:12 CEST 2007
> >> and accidently unplugged the USB hub to which my external hdd
> >> together with a mouse were connected and this caused my machine to
> >> freeze for some seconds and then reboot. At that moment the hdd was
> >> mounted and I was playing music out of it.
> >> After that I tried to reproduce it :) so just plugged only the hdd
> >> directly, mounted it and started playing music files from it. When
> >> I unplugged the USB cable the same thing happened: short freeze,
> >> and then reboot. Is this expected behaviour? And is there some way
> >> to avoid the freeze and reboot?
> >>
> >> Thanks.
> >
> > Yes, it's expected behavior.  The workaround is to not unplug mounted
> > devices. (There's nothing special about USB here, if you unplugged an
> > IDE drive you'd get the same behavior)
>
> Wouldn't it make some sense not to panic if mounted devices that are in
> sync get removed? A few applications might get in trouble, but that's
> hardly a reason to bring a whole system down.

I don`t know how things work, but shutting down the system when some mounted 
fs is no longer present seems like the wrong thing to me. It`s surely safe :) 
just bring everything down in order to ensure not messing things ups. But 
nowadays there are a lot of USB devices and umounting every time is something 
that one is surely going to forget once and ooops everyting goes down.
If the same thing happens when a network fs is mounted (say NFS or SMBFS) and 
then becomes unavailable due to network outages (wireless connections break 
easily compared to cable connections, and nowadays the former become 
popular), then I think it should be fixed.
"Windows" doesn`t reboot if you unplug the usb or network cable, which I think 
is the right way of handling these kind of situations.

Idea: do something like "umount -f" when a fs becomes unavailabe, just tell 
every program that files are unaccessible?

I don`t have the programming skills and knowledge of how freebsd works, that`s 
why I can only help with feedback and ideas :) Shutting down the system 
without user`s desire seems like a problem to me, regardless of the reason. 
And problems are there to be solved.

-- 
PGP KeyID: 0x3118168B
Keyserver: pgp.mit.edu
Key fingerprint BB50 2983 0714 36DC D02E  158A E03D 56DA 3118 168B
  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20070718/df74432c/attachment.pgp


More information about the freebsd-stable mailing list