Date: Thu, 30 Apr 2009 14:20:36 -0500 From: CyberLeo Kitsana <cyberleo@cyberleo.net> To: Terje Elde <terje@elde.net> Cc: freebsd-geom@freebsd.org Subject: Re: gmirror, geli and gjournal Message-ID: <49F9FA04.3040306@cyberleo.net> In-Reply-To: <49F98768.8000907@elde.net> References: <49F98768.8000907@elde.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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@CyberLeo.Net> Furry Peace! - http://wwww.fur.com/peace/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49F9FA04.3040306>