Panic on external HD disconnection

Ian Smith smithi at nimnet.asn.au
Fri Jun 9 13:37:08 UTC 2017


In freebsd-questions Digest, Vol 679, Issue 5, Message: 4
On Fri, 9 Jun 2017 09:35:02 +0200 Andrea Venturoli <ml at netfence.it> 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)


More information about the freebsd-questions mailing list