Personal tools
You are here: Home kaeru's blog Archive 2008 January 24 gjournal + ufs
Document Actions

gjournal + ufs

by kaeru last modified 2008-01-24 22:47
Filed Under:

Upgraded the home server to FreeBSD 7.0 pre-release. It was very straightforward, the usual make kernel, make buildworld etc. Everything got back up without issues, except for a slight change from nve to nfe for Nforce network adaptor.

One of the new things in FreeBSD 7.0 that I really wanted to use was gjournal, which brings journaling to ufs.

It is similar to gmirror in how it uses the disk. I'm using an file backed md disk for testing.

gjournal graphics

When you type

gjournal label md0

gjournal will use the end sectors of the disk and allocate 1GB by default for the journal. The journaled disk then would be designated as /dev/md0.journal less 1GB of the total md0 capacity. As it says in the man page, using gjournal on small disks of a few gigabytes isn't very efficient.

You then do a newfs on this drive with the -J option:

newfs -J /dev/md0.journal

Then mount it:

mount -o /dev/md0.journal /mnt/md

It will look like this when you type mount:

/dev/md0.journal on /mnt/md0 (ufs, asynchronous, local, gjournal)

Now you don't have to fsck anymore on a crash, and even if you do, it is much faster than a normal one. Just like gmirror, as you can see if you disable gjournal, you can just mount the ufs file system /dev/md0 as normal without the journaling.

Next up is to test gjournal on top of a gmirror disk.


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: