From owner-freebsd-fs@FreeBSD.ORG Wed Mar 11 22:15:27 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DDCB10656C3 for ; Wed, 11 Mar 2009 22:15:27 +0000 (UTC) (envelope-from guido@gvr.org) Received: from gvr.gvr.org (gvr-gw.gvr.org [82.95.154.195]) by mx1.freebsd.org (Postfix) with ESMTP id 3531D8FC12 for ; Wed, 11 Mar 2009 22:15:26 +0000 (UTC) (envelope-from guido@gvr.org) Received: by gvr.gvr.org (Postfix, from userid 657) id A686142D821; Wed, 11 Mar 2009 22:55:18 +0100 (CET) Date: Wed, 11 Mar 2009 22:55:18 +0100 From: Guido van Rooij To: freebsd-fs@freebsd.org Message-ID: <20090311215518.GA25410@gvr.gvr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: RFC: geli+gmirror problem + solution X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2009 22:15:27 -0000 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? -Guido