files filled with \0 after freeze
Bill Rugolsky Jr.
brugolsky at telemetry-investments.com
Fri Jan 13 17:45:14 UTC 2006
On Fri, Jan 13, 2006 at 12:22:29PM -0500, Gaspar Bakos wrote:
> I am trying to figure our what is causing it:
> hardware error? If yes, harddrive or memory?
I can't help you there.
> One clue; some of the last files that were open before the freeze will
> contain only \0 characters.
>
> E.g.
>
> bash$ od -c .lastfile
> 0000000 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
> *
> 0010740 \0 \0 \0 \0 \0 \0 \0 \0 \0
> 0010751
>
> This is quite annoying as you may imagine.
This is a "feature" of metadata-only journaling filesystems such as XFS,
where a file can be extended, but its blocks haven't hit the disk yet.
As a security precaution, those blocks are replaced with zeros, rather
than the stale contents of the disk blocks at the time of the crash,
for security reasons.
Ext3's default "data=ordered" mode guarantees that this will not happen.
Ext3 "data=writeback" can expose stale disk blocks.
There's some discussion of this in Daniel Robbins's filesystem
articles at IBM developerWorks:
http://www-128.ibm.com/developerworks/linux/library/l-fs11.html
Ext3, despite its warts, really is a solid bit of engineering --
and still improving! :-)
Regards,
Bill Rugolsky
More information about the fedora-list
mailing list