Re: FFS data integrity



On 6/16/06, Pablo Marín Ramón <pabmara@xxxxxxxxxx> wrote:
Here goes a newbie question about classical FFS (without
softupdates).

As metadata is updated synchronously, can an i-node, at some
point, end pointing to not written yet data blocks? Is this a
security risk, i.e., can those pointed to data blocks pertain to
another user's deleted on memory but not deleted on disk data, or
that deleted data will be marked in metadata as not initialized
and after a crash fsck will fix all i-nodes pointing to it?


The short answer is that fsck can detect the bad inodes and fix or
delete them. Assuming no programming errors, you don't have to worry
about a file containing bogus data after fsck has run. Unfortunately,
if write-caching is enabled on your hard drive (and it probably is,
for speed), then the drive may internally re-order the writes and the
carefully crafted sequence of writes disappears, so there are no
guarantees (or at least, not as many). Whether this is actually a
problem depends on the brand, model, and firmware version of the
drive, because some drives claim that data has been written to the
disk when it is actually only in the drive buffer, while other drives
are more honest.

More details are found in
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-disk.html

AFAIK, softupdates and ext3 in the default mode (data=ordered)
don't have this problem, but journalling filesystems that journal
only metadata do. Is this correct?

I think that is answered in the handbook section referenced above.

- Bob
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • FFS data integrity
    ... As metadata is updated synchronously, can an i-node, at some ... security risk, i.e., can those pointed to data blocks pertain to ... and after a crash fsck will fix all i-nodes pointing to it? ...
    (freebsd-questions)
  • Re: What causes the CDROMs playlist to reset?
    ... CDs in one of the drives, it stays on the previously seen metadata. ... The only thing I can see different is that it creates a player and keeps it ... But why does the CDROM object retain the old data across completely ...
    (microsoft.public.windowsmedia.sdk)
  • Re: New BSD Installer
    ... given that the space is needed for metadata. ... this sounds to me like the equivalent of if GEOM was to ... overwrites the backup GPT partition table. ... gptboot does not see the mirror, but will boot from one of the mirrored drives. ...
    (freebsd-stable)
  • Re: Motherboard killing my Hard Drives
    ... killing drives, and test it there. ... a PCI IDE card in it, install a driver for the PCI IDE ... writes metadata to suit itself, ... RAID controllers have three choices, ...
    (alt.comp.hardware.pc-homebuilt)
  • Re: Motherboard killing my Hard Drives
    ... killing drives, and test it there. ... a PCI IDE card in it, install a driver for the PCI IDE ... writes metadata to suit itself, ... RAID controllers have three choices, ...
    (alt.comp.hardware.pc-homebuilt)