RFC: geli+gmirror problem + solution

Gregory Sutter gsutter at zer0.org
Sun Mar 22 09:09:30 PDT 2009

On 2009-03-12 20:59 +0100, Pawel Jakub Dawidek <pjd at FreeBSD.org> wrote:
> 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.
> 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.

Has this been filed as a PR, and has any progress been made on a fix?
I couldn't find anything exact in GNATS using the expected search terms,
but I did find some resemblances:

kern/119293: a similar-looking situation with GBDE on a gmirror
kern/113957: a case in which gmirror sometimes reports degraded arrays

As it happens, I just ran into this problem earlier today.
My gmirror is still rebuilding from the incident.  It was a
disconcerting thing to have happen upon the first reboot after
setting up the new storage.  (Until I read this thread, I didn't know
which layer had the problem; I've got quite the onion of geoms set up
in /dev/mirror/gm0s1e.eli.journal.)

It seems like a workaround could be to:
 - add the shutdown keyword to the geli rc script.  The script already
   has a geli_stop function.
 - use 'shutdown', send a signal to init, or make the 3-finger salute
   instead of using 'halt' or 'reboot', which don't use init and
   don't call rc.shutdown.

Gregory S. Sutter                   A little nonsense now and then
mailto:gsutter at zer0.org             is relished by the wisest men.
http://zer0.org/~gsutter/             --Roald Dahl (as Willy Wonka)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 155 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20090322/f7093a9b/attachment.pgp

More information about the freebsd-fs mailing list