System Administration Guide
Chapter 2, Administering filesystems

Logging filesystem transactions

Logging filesystem transactions

Intent logging minimizes system downtime after abnormal shutdowns by logging filesystem transactions. When the system is halted unexpectedly, this log can be replayed and outstanding transactions completed. The check and repair time for filesystems can be reduced to a few seconds, regardless of the filesystem size.

NOTE: Intent logging does not increase the reliability of filesystem. Only transactions concerning file meta data (the structures concerned with storing data) are logged. The purpose is to minimize system downtime.

The ability to locate and check only affected areas of the disk for inconsistencies is central to the logging mechanism. The structure of the mechanism is:

If the system crashes before the log is written, it is as if the change (any modifications to the filesystem) never occurred. If the system crashes after the log is written, but before the transaction complete, fsck either completes the change or undoes it. If the system crashes after the transaction is completed, then the modification has been completed, and there is nothing for fsck to do.

NOTE: For optimum benefit, both logging and checkpointing should be enabled. Checkpointing marks the filesystem as clean whenever the filesystem is inactive. If the system needs to be checked (in the event of an abnormal system halt, for instance) only areas of the disk manipulated since the last checkpoint operation need to be examined for inconsistencies.

See also: