buffers not syncing correctly during shutdown
ivoras at freebsd.org
Thu Oct 15 09:47:33 UTC 2009
Alexey Shuvaev wrote:
> On Wed, Oct 14, 2009 at 03:13:00PM +0200, Ivan Voras wrote:
>> Gary Jennejohn wrote:
>>> I personally don't see why it ever should be handled. This is UNIX not
>>> Windows and users should be smart enough to know that they umount such
>>> devices before removing them otherwise nasty things can happen.
>> Yes, but this is 2009 not 1978.
> Well, the other side of being in 2009 is that filesystems have evolved too.
> For example, I have UFS2 + SU on most of my removable media (sticks and
> external hard drives). I was always interested how
> this new "feature" of FreeBSD, to allow removable media disappear almost
> silently, plays in this case?
I see what you mean - UFS+SU is definitely not suitable for this
environment. UFS without SU (mounted "normal" or "sync") OTOH is better.
Windows mounts removable devices sync (unless told otherwise) since
sometime around Win98SE.
> I've had one case when I lost my external hard drive during
> tar -xvf ports.tar.bz2 into it. I haven't touched it at the moment
> (voltage spikes?). It was quite funny trying to browse through
> the half-cached content then... have spent ~5 minutes before noticing
> kernel message.
> Re-plugging the drive has brought it back, with dirty filesystem, of course.
> Maybe it would be better if the system paniced then :/)
This would not help since the newly inserted device would get its own
descriptor structure, whose pointer is obviously different from the old
> Anyway, my point is that removing the media with most of
> modern filesystems on it without unmounting is an operator error.
> IMHO, the system should warn such an operators in one or the other way...
Warn about what? That the media has been removed? AFAIK USB does this
right now. Or you are suggesting another message from the file system
layer saying: "see, about that in-transit data you are thinking about...
well, it's gone now." :)
More information about the freebsd-current