gmirror, geli and gjournal

CyberLeo Kitsana cyberleo at cyberleo.net
Thu Apr 30 19:38:21 UTC 2009


Terje Elde wrote:
> Hi,
> 
> I'm curious about GEOM combining gmirror geli and gjournal.
> 
> I'm setting up a rather slow machine (PentiumIII 450Mhz) and didn't want
> to encrypt once pr. drive, so I configured geli on top of gmirror so I
> encrypt once for the mirror, rather than once for each disk.  Seemed to
> make sense.
> 
> I now want to place UFS2 filesystems with journaling (using gmirror
> offcourse) on top of the encrypted mirror.  In the gjournal man page, I
> was pleased to read:
> 
>      When gjournal is configured on top of gmirror(8) or graid3(8)
> providers,
>      it also keeps them in a consistent state, thus automatic
> synchronization
>      on power failure or system crash may be disabled on those providers.
> 
> But what happens if I have geli sitting between gjournal and gmirror?
> 
> Will gjournal still take responsibility for keeping the mirror in sync?

This claim has to do with how gjournal does its work. Keeping the mirror
in sync is a side effect of the transactive nature of the journal. I.e.
an entry in the journal is considered either fully completed or not
completed at all. If the system stops running while it's writing to
disk, gjournal has a log (the journal) of what it's already done and
what it needs to do, and finishes the job when it comes back. Thus, if
one half of the mirror has data written and the other does not (a common
reason for resyncing mirrors), the fact that gjournal will redo all the
things it suspects never finished will make the mirror's members
identical once again. The presence of geli would not alter this
assumption. Unless it caches information and ignores flush commands,
that is.

If you have partitions on the mirror which are not journaled whose
contents you care about, it's still a good idea to sync those after a
crash, though.

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
<CyberLeo at CyberLeo.Net>

Furry Peace! - http://wwww.fur.com/peace/


More information about the freebsd-geom mailing list