Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jun 2017 20:47:40 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Andrea Venturoli <ml@netfence.it>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Panic on external HD disconnection
Message-ID:  <20170608204740.9ad9b1c3.freebsd@edvax.de>
In-Reply-To: <929de353-94c4-cbf2-9b33-67f60b007a71@netfence.it>
References:  <929de353-94c4-cbf2-9b33-67f60b007a71@netfence.it>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 8 Jun 2017 15:12:49 +0200, Andrea Venturoli wrote:
> Today I was taking a backup to an external UFS HD when I accidentally 
> touched the cable and it sort of unplugged.

So the disk was mounted at that specific point in time?
Partially understandable. The system will somehow react
to a mass media device surprisingly removed when it is
writing to it...



> While I understand this falls either into hardware or "stupid user" 
> category of panics, is a whole crash normal?

That depends on the kind of operation the system has been
performing at that moment. Disconnecting an unmounted
device isn't a problem, and a mounted device which is not
written to (or read from) often results in a normal application
error.



> Or should I expect better resilience, like fail that filesytem, spit a 
> whole bunch of offenses at me, but keep the on working with the rest, 
> and look for something wrong on my setup?

In case of accidental UFS disconnect, reconnect the drive,
do _not_ attempt to mount it right away, but instead perform
a full fsck ("fsck -yf /dev/da0", for example) of the file
system on that disk. In best case, fsck will repair any
damages that did appear, and then return the file system into
a consistent state, ready for mounting.

But as I said: It highly depends on _what exactly_ was happening
to the disk when it was disconnected...



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170608204740.9ad9b1c3.freebsd>