thrashing + lost files

Polytropon freebsd at edvax.de
Wed Mar 18 09:22:20 UTC 2015


On Tue, 17 Mar 2015 23:56:25 -0800, CK wrote:
> I would like any thoughts or ideas on how to prevent the following problem,
> because it is making my computer completely unusable, wasting many efforts.
> I am using this mail-list because freebsd.forums.org has become completely
> unusable to those with dial-up connections, requiring 10 seconds for each
> character typed ...  no exaggeration.

A common reply would be: "Who still uses dial-up anyway?" ;-)



> The result is the loss of many critical files from a hard drive, as if a "rm
> *" was done in the home directory.  This occurs after the thrashing when
> Xwindow is accidently shutdown with Opera open with many javascript page tabs,
> eg, being a memory pig - consuming 1/2 of RAM (256M), which after dumping
> core, writes a large amount of data (crashlog) even after Xwindow is down:
> 
> pid 1118 (opera), uid 1001: exited on signal 11 (core dumped)

I thought Opera would simply write a core dump, well, still
several 100s of MB though...



> FSCK RESULTS:
> ------------
> Of interest, is that each time fsck was run, more files were lost!
> 
> # fsck -t ufs -p /dev/ada0p6.eli
> /dev/ada0p6.eli: NO WRITE ACCESS
> /dev/ada0p6.eli: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

This message should alert you. Don't just preen the disk.
In this mode, only a subset of errors will be detected,
and not all of them can be corrected. You should actually
perform

	# fsck -t ufs -f /dev/ada0p6.eli

with the disk (here: the "decrypted device") unmounted.
Performing checks on live file system usually is something
that's not encouraged.

There are several errors shown:

> INCORRECT BLOCK COUNT I=2327435 (8 should be 0)
> [...]
> UNREF FILE I=2327428  OWNER=abc MODE=100600
> [...]
> UNREF FILE I=2327439  OWNER=abc MODE=100600
> [...]
> FREE BLK COUNT(S) WRONG IN SUPERBLK
> [...]
> SUMMARY INFORMATION BAD
> [...]
> BLK(S) MISSING IN BIT MAPS

Unmount the partition, let fsck do its job. :-)

Keep in mind: You _can_ use -y as an additional parameter,
but you should know what you're doing. Sometimes, -y does
not result in what you think it does...



> A lost+found directory is never created, which ignorantly, I think should be
> created and filled with the "unreferenced inodes" (if that is the correct
> term).

This directory is created only in case it is needed, by fsck.
It won't be there by default.



> Regardless, I have lost weeks of work in the last few months from this
> problem, and I'm losing faith.

Copy files to a different disk (or maybe even external storage,
such as USB sticks) temporarily, just to be sure.

By the way, I actually _know_ how this feels. Due to a faulty
GPU, I lost data from time to time, and sometimes, fsck makes
it worse (files disappearing, or zero'd out). A defective file
system can be the cause of data loss. I had to learn this, and
a major accident (on my old system) has brought me to this list,
so there was "something good" in it. ;-)




> HARDWARE:
> --------
> [...]
> ada0: <WDC WD400AB-22CDB0 22.04A22> ATA-5 device
> ada0: 100.000MB/s transfers (UDMA5, PIO 8192bytes)
> ada0: 38166MB (78165360 512 byte sectors: 16H 63S/T 16383C)
> ada0: Previously was known as ad0
> ada1 at ata1 bus 0 scbus1 target 1 lun 0
> ada1: <WDC AC24300L 14.10R11> ATA-4 device
> ada1: 33.300MB/s transfers (UDMA2, PIO 8192bytes)
> ada1: 4112MB (8421840 512 byte sectors: 15H 63S/T 8912C)
> ada1: Previously was known as ad1
> [...]
> GEOM_ELI: Device ada0p3.eli created.
> GEOM_ELI: Encryption: 3DES-CBC 192
> GEOM_ELI:     Crypto: software
> GEOM_ELI: Device ada0p6.eli created.
> GEOM_ELI: Encryption: AES-XTS 128
> GEOM_ELI:     Crypto: software

Make sure the file systems are clean. No, really: Test it as
recommended (from unmounted devices, with -f). If you got _that_
possible cause off the table, take the next steps, but check
this "obvious" cause first. Sometimes, it is that easy. File
systems with defects can lead to the "funniest" observations...


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


More information about the freebsd-questions mailing list