To configure journaling on the UFS file system using
gjournal, one should
first create a
gjournal provider using the
gjournal utility, then run
newfs(8) or
tunefs(8) on it with the
-J flag which instructs UFS to coop-
erate with the
gjournal provider below. There are important differences
in how journaled UFS works. The most important one is that
sync(2) and
fsync(2) system calls do not work as expected anymore. To ensure that
data is stored on the data provider, the
gjournal sync command should be
used after calling
sync(2). For the best performance possible, soft-
updates should be disabled when
gjournal is used. It is also safe and
recommended to use the
async mount(8) option.