Project title

FreeBSD GEOM Journaling Layer (gjournal)


A FreeBSD kernel GEOM class, providing data journaling (or “logging”) services of underlying storage devices to any higher-level consumers.

Project Description

Primary purpose of the gjournal facility is to host filesystems that don't have integrated data journaling, but it also provides a special delayed-commit mode which can be used for e.g. disaster recovery. The GEOM class will use two underlying devices, one for the data (henceforth called “data disk”) and one for the journal (“journal disk”). The data disk (eventually) contains verbatim data passed to the layer, and after the journal is disconnected or committed can be used standalone. This property allows for implementing the delayed-commit mode, in which data is accumulated in the journal but not written to the data disk (or discarded) until a special request arrives.

Technical Details

The facility will be implemented as a GEOM class in a kernel-loadable module, controlled by the usual GEOM mechanisms. The journal will be implemented as a cyclic buffer, and will be flushed either asynchronously via a kernel thread or when it gets full.

Benefits for FreeBSD

This data journaling layer implemented in the GEOM subsystem will provide journaling facility to all supported filesystems (presumably mounted with synchronous writes to ensure data integrity). By setting the journal to a separate device, various performance tradeoffs can be achieved; for example: using a fast and small SCSI disk as a journal for a large and slow IDE one, or using a NVRAM-like device for the journal for speed and data integrity. The delayed-commit mode can be used for data recovery and some experimental or forensic purposes; examples are running fsck on a disk whose metadata structures are beyond automatic repair, and new filesystem development. It will be licensed under the BSD license.




PoulHenningKamp, PawelJakubDawidek

gjournal_proposal (last edited 2008-06-17T21:37:44+0000 by anonymous)