gjournal & fsck

Brian McCann bjmccann at gmail.com
Thu Aug 28 14:57:24 UTC 2008

> You may wish to have a look at this article:
> http://www.freebsd.org/doc/en_US.ISO8859-1/articles/gjournal-desktop

Great article...thanks.  Bookmarked for future use too!

> In particular, you should make sure you use tunefs to enable Journaling and
> disable soft update on the journaled filesystems, i.e.:
> tunefs -J enable -n disable /dev/ad0s1f.journal

I was mistaken...I did this when I made the file system...I just
posted a message to the thread showing the output of tunefs -p, but
soft-updates are off, and journaling does show as on.

> Mount them using the async option:
> /dev/ad0s1f.journal     /usr            ufs     rw,async        2       2

Here's my fstab line:
/dev/da1.journal                /files6/array2          ufs
rw,async,nosuid,noatime         2       2

> Note that the pass # still indicates the filesystem should be checked. While
> I was writing the article, I was trying several scenarios were I had the
> pass # set to 0, thinking that a gjournaled filesystem would not need fsck
> at all. I would then press the reset button. In most cases, the system would
> refuse to mount them. However with the pass # set, the fsck would finish
> almost immediately, since the actual consistency check takes place when the
> gjournal module is loaded (you will get a "journal consistent" after a bad
> reboot) and before fstab is even parsed.  All fsck does in this case is
> simply confirm to the system it is a clean volume.
> In short, leaving the pass # to something that would cause an fsck is the
> safe way to go. The fsck will be almost instant anyway.

The file system is about 1.1TB, and I've got 2 of them that are
journaled on this particular server.  One is currently empty, and
fsck's in about 10-15 mins, while the other is 31% used, and takes
about 45 mins.

Thanks for your help thus far!

More information about the freebsd-questions mailing list