Wedge system == lost files

Kirk McKusick mckusick at mckusick.com
Fri Jan 26 01:40:55 UTC 2018


> To: freebsd-current at freebsd.org
> Subject: Wedge system == lost files
> 
> So, my system just wedge itself.  No panic.  No keyboard.
> No mouse.  No remote login.  Nothing.  Just wedged.
> 
> The system is FreeBSD 12.0-CURRENT r326432 Fri Dec 1 2017 amd64.
> 
> Imagine my surprise when I rebooted system and the file
> I had been editing (and saving after every change) is
> gone.  /usr/lost+found is empty.  The file pl19-21.tex is
> gone along with a few files from latex.
> 
> -rw-r--r--  1 kargl  kargl  -      0 Jan 25 14:53 pl19-21.aux
> -rw-r--r--  1 kargl  kargl  -      0 Jan 25 14:53 pl19-21.log
> -rw-r--r--  1 kargl  kargl  -      0 Jan 25 14:53 pl19-21.out
> -rw-r--r--  1 kargl  kargl  -      0 Jan 25 14:53 pl19-21.pdf
> -rw-r--r--  1 kargl  kargl  -      0 Jan 25 14:52 pl19-21.tex
> 
> /dev/ada0p5 on /usr (ufs, local, journaled soft-updates)
> 
> Are there known issues with SUJ, again? 
> 
> -- 
> Steve

I have not seen any recent issues with SUJ other than a complaint
that it corrupted cylinder-group check hashes (which has been fixed).

A hanging system as you describe can occur if your system disk
locks up, though the machine generally does remain pingable. But
it would explain missing files if the system had not been able to
flush them out (the writes simply accumulate in memory). But most
editors do an fsync after each file is written which would have
hung if you could not write to the disk.

So, regretably, I do not have an explanation. If you are suspicious
about SUJ, you can disable it using:

	tunefs -j disable /dev/ada0p5

That will leave soft updates enabled so will not cause a slowdown
in your disk throughput.

	Kirk McKusick


More information about the freebsd-fs mailing list