gjournal and zfs, questions

John Nielsen lists at jnielsen.net
Tue Mar 6 16:19:35 UTC 2007


On Tuesday 06 March 2007 09:37, Vince wrote:
> Ivan Voras wrote:
> > Daniel Eriksson wrote:
> >> When will gjournal and zfs be committed to the CVS tree? Will either of
> >> them be merged to STABLE?
> >
> > GJournal aready is:
> > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/geom/journal/g_journal.c?re
> >v=1.9&content-type=text/x-cvsweb-markup
> >
> > It's unlikely they will be merged to 6-STABLE because they introduce
> > lots of changes.
>
> That said there are patches for -STABLE although they are a little stale
> now, as changes have been made to stable, however last time i tried only
> cosmetic changes were needed (the patches wouldnt apply cleanly because
> the file(s) had changed but applying the rejected patches by hand worked
> fine, just look for rejects and see why its been rejected. Usually its
> because a line has been added to the file or removed and so the line
> number in the patch is wrong.)
> See Pawels patches at
> http://people.freebsd.org/~pjd/patches/
> in particular
> http://people.freebsd.org/~pjd/patches/gjournal6_20061024.patch
> however also search the freebsd-geom and freebsd-current mailing lists
> for how to apply them and build with gjournal support (for a start
> Before applying the patch, create the following directories in your
> source directory:
>
> sbin/geom/class/journal
> sys/geom/journal
> sys/modules/geom/geom_journal )
>
> That said I've a 6.2-RELEASE box thats got /var and /usr journaled and
> its been running happily for a month and a half. Give a scary sounding
> message in dmesg about
> GEOM_JOURNAL: Cannot suspend file system /usr (error=35).
> but this post
> http://lists.freebsd.org/pipermail/freebsd-hackers/2006-August/017894.html
> indicates its harmless and i havent seen any problems.

I'm running gjournal with -STABLE here as well. The box is my work desktop and 
pseudo-server with a 450GB gmirror'ed /usr. The one problem I have is a 
consistent crash at shutdown. I suspect it's a result of poor interaction 
between gjournal and gmirror. Fortunately, it only happens after the 
filesystems are unmounted so the only real downside is being unable to reboot 
remotely (manual power cycle required). I haven't taken the time to 
document/report this yet but hopefully I'll get around to it sooner or later.

I'm attaching the patch I use. It applied cleanly last time I updated a couple 
weeks ago. It's the same as the other one available from the mailing lists 
with one change so it doesn't choke on sys/sys/vnode.h.

If you plan to use it refer to the original instructions here:

http://lists.freebsd.org/pipermail/freebsd-fs/2006-June/001962.html

and also look at the manpage (from -CURRENT):

http://www.freebsd.org/cgi/man.cgi?query=gjournal&apropos=0&sektion=0&manpath=FreeBSD+7-current&format=html

In brief, you need to make the new directories in the source tree, apply the 
patch, add the gjournal option to your kernel, rebuild kernel and world and 
reinstall, create a journalled volume, remember to use the -J flag with newfs 
(or with tunefs if you forgot), mount it async, and if you're using gmirror 
do a "gmirror configure -n".

JN
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gjournal6_20061030_1.patch
Type: text/x-diff
Size: 187970 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20070306/3c849ee1/gjournal6_20061030_1-0001.bin


More information about the freebsd-questions mailing list