Re: removing external usb hdd without unmounting causes reboot?



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

Attachment: pgpoISiLLub3y.pgp
Description: PGP signature



Relevant Pages

  • Re: removing external usb hdd without unmounting causes reboot?
    ... At that moment the hdd was ... I unplugged the USB cable the same thing happened: short freeze, ... The workaround is to not unplug mounted ...
    (freebsd-stable)
  • Re: PPC 6600 does not Connnect over USB
    ... Judging by your Device Manager enumeration, ... it's connected via USB. ... Re-check the 'Allow USB Connections' check box in ActiveSync settings ...
    (microsoft.public.pocketpc.activesync)
  • Solved! Re: USB Router? - Re: Ping pmj
    ... attached to a USB port. ... USB Connections can sometimes be a bit ... What sort of Router is it? ... Sounds like it may be a BT Voyager - which *is* an ADSL Modem ...
    (uk.people.silversurfers)
  • Re: Active Sync 4.2 suddenly wont connect to Axim X51v
    ... There are three tabs along the bottom edge of the Settings screen. ... You'll see an icon named "USB to PC", ... Settings | Connections, selecting USB to PC, deselecting... ... firewall installed which blocks one or more of the ports that ActiveSync ...
    (microsoft.public.pocketpc.activesync)
  • Re: Reducing EMI
    ... those connections should be right next ... powered by the PCB via the USB cables, but there is also an external ... The spikes at the USB harmonic frequencies do get into the power ...
    (sci.electronics.design)

Loading