From owner-freebsd-questions@freebsd.org Fri Jun 9 13:37:07 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF57BBF4E70 for ; Fri, 9 Jun 2017 13:37:07 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A96567912 for ; Fri, 9 Jun 2017 13:37:06 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id v59DadHU055572; Fri, 9 Jun 2017 23:36:40 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Fri, 9 Jun 2017 23:36:39 +1000 (EST) From: Ian Smith To: Andrea Venturoli cc: freebsd-questions@freebsd.org, Polytropon Subject: Re: Panic on external HD disconnection In-Reply-To: Message-ID: <20170609225952.D98304@sola.nimnet.asn.au> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jun 2017 13:37:08 -0000 In freebsd-questions Digest, Vol 679, Issue 5, Message: 4 On Fri, 9 Jun 2017 09:35:02 +0200 Andrea Venturoli wrote: > On 06/08/17 20:47, Polytropon wrote: > > > So the disk was mounted at that specific point in time? > > Yes, as I said I was taking a backup, so that disk was mounted and was > being written to. You said "external UFS HD" but not how attached. Can I assume USB? > > Partially understandable. The system will somehow react > > to a mass media device surprisingly removed when it is > > writing to it... > > Yes, *partially* understandable. > I just like to know to what extent that "partially" goes. > If I am to expect a full panic, it's ok. Assuming USB attached, all the more likely to panic. Even if you're not writing to it at the time - mounting noatime can help - external USB mounts never seem to survive disconnect / reconnect, even when they may initially appear to - e.g. ls /mnt/somedir may show cached contents, but attempts to read files from there (or write, no doubt) will fail. That said, I haven't had a panic from bumping a memstick since 7.x or so, but then I likely wasn't writing to it at the time. umount, a cautionary fsck, then remounting haven't failed me since FreeBSD 9. > If, somehow, I could get a partial failure, then something is wrong in > my setup and I'll have to investigate. Again assuming USB, you could ask in freebsd-usb@ re the current status for that scenario. Yes _in theory_ it shouldn't panic the whole system. Hope fsck gave you your disk back clean. Did /var/log/messages from before the panic indicate anything related? cheers, Ian (please cc me, I take the -digest)