From owner-freebsd-stable@FreeBSD.ORG Wed Jul 18 15:03:11 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 8B13516A401 for ; Wed, 18 Jul 2007 15:03:11 +0000 (UTC) (envelope-from idiotbg@gmail.com) Received: from smtp.studnetz.uni-leipzig.de (smtp.studnetz.uni-leipzig.de [139.18.143.252]) by mx1.freebsd.org (Postfix) with ESMTP id 1C3FF13C4AA for ; Wed, 18 Jul 2007 15:03:10 +0000 (UTC) (envelope-from idiotbg@gmail.com) Received: from localhost (localhost [127.0.0.1]) by smtp.studnetz.uni-leipzig.de (Postfix) with ESMTP id 3179F267; Wed, 18 Jul 2007 17:03:10 +0200 (CEST) X-Virus-Scanned: by amavisd-new at studnetz-ul Received: from smtp.studnetz.uni-leipzig.de ([127.0.0.1]) by localhost (smtp.studnetz.uni-leipzig.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y2lwuSZtMV6M; Wed, 18 Jul 2007 17:03:10 +0200 (CEST) Received: from [192.168.63.4] (a144026.studnetz.uni-leipzig.de [139.18.144.26]) by smtp.studnetz.uni-leipzig.de (Postfix) with ESMTP id 8CEA924B; Wed, 18 Jul 2007 17:03:09 +0200 (CEST) From: Momchil Ivanov To: "[LoN]Kamikaze" Date: Wed, 18 Jul 2007 17:03:03 +0200 User-Agent: KMail/1.9.6 References: <200707181142.27240.idiotbg@gmail.com> <200707180839.50113.josh@tcbug.org> <469E1B2A.3030901@gmx.de> In-Reply-To: <469E1B2A.3030901@gmx.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2548977.AsHXLgMVcJ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200707181703.07480.idiotbg@gmail.com> Cc: Josh Paetzel , freebsd-stable@freebsd.org 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 15:03:11 -0000 --nextPart2548977.AsHXLgMVcJ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 mounte= d=20 fs is no longer present seems like the wrong thing to me. It`s surely safe = :)=20 just bring everything down in order to ensure not messing things ups. But=20 nowadays there are a lot of USB devices and umounting every time is somethi= ng=20 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) a= nd=20 then becomes unavailable due to network outages (wireless connections break= =20 easily compared to cable connections, and nowadays the former become=20 popular), then I think it should be fixed. "Windows" doesn`t reboot if you unplug the usb or network cable, which I th= ink=20 is the right way of handling these kind of situations. Idea: do something like "umount -f" when a fs becomes unavailabe, just tell= =20 every program that files are unaccessible? I don`t have the programming skills and knowledge of how freebsd works, tha= t`s=20 why I can only help with feedback and ideas :) Shutting down the system=20 without user`s desire seems like a problem to me, regardless of the reason.= =20 And problems are there to be solved. =2D-=20 PGP KeyID: 0x3118168B Keyserver: pgp.mit.edu Key fingerprint BB50 2983 0714 36DC D02E =C2=A0158A E03D 56DA 3118 168B =20 --nextPart2548977.AsHXLgMVcJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBGniuo4D1W2jEYFosRAiOOAJ9bd6dBvMqyU08i8yhJwfeuN5R1qwCgv5bz 0oycV3bKXoZsA3TM+xXbA2k= =iyBn -----END PGP SIGNATURE----- --nextPart2548977.AsHXLgMVcJ--