RFC: geli+gmirror problem + solution
Pawel Jakub Dawidek
pjd at FreeBSD.org
Thu Mar 12 12:58:39 PDT 2009
On Wed, Mar 11, 2009 at 10:55:18PM +0100, Guido van Rooij wrote:
> We have a setup where we have two disks in a gmirror with GELI on top
> of it. We boot from it (using a small unencrypted USB stick).
> We this have the G_ELI_FLAG_BOOT set.
> Anyway, when rebooting, geli does not detach and this the gmirror is
> never destroyed resulting in a rebuild each time.
> I just commited a fix for this (set the G_ELI_FLAG_WO_DETACH in g_eli_taste().
> However, this seems to break zfs as zfs might actually close the geli device
> and later opening it (but it is then no longer there).
> We must therefor make this configurable.
> I thus propose to be able to set the G_ELI_FLAG_WO_DETACH in the geli-
> metadata, just like the G_ELI_FLAG_BOOT flag. This would mean an
> extra option to geli init, say the -d flag.
> Any objections?
I'd suggest not to do it. Maybe you could implement detaching on reboot
for geli providers? You can find example of how to do this in three last
functions in sys/geom/mirror/g_mirror.c.
Could you send me patches to review before committing?
Pawel Jakub Dawidek http://www.wheel.pl
pjd at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20090312/ef3dd2c6/attachment.pgp
More information about the freebsd-fs