[ZODB-Dev] Site crash and Data.fs truncated

Tim Peters tim at zope.com
Mon May 24 21:38:27 EDT 2004


[Ramon Aseniero]
> My Data.fs was suddenly truncated and it created a Data.fs.tr0 file.

You should look in your log files, for ZODB FS WARNING msgs.  One of those
is logged whenever a .tr<digit> file is created.  This only happens when the
FileStorage index is being read, and that happens when the database is first
opened.  The code reading the index determines that the .fs file is damaged,
and chops it off at the point of damage.  So the .tr0 file isn't the damage
itself, it's the result of earlier damage.  The .tr0 file contains
everything that was in the original .fs at and after the damaged point.

> ...
> Module ZODB.FileStorage, line 623, in _load 
> error: unpack str size does not match format

That's peculiar too, since the part *retained* in the .fs file should
contain whole records.

> Any idea?

Sorry, not really.  As you've already discovered, there's not much to go on.

> How can I fix it?

Revert to a backup at a known good state, if you have one.  If not, running
fsrecover.py may or may not yield a "good enough" repaired .fs file.




More information about the ZODB-Dev mailing list