From owner-freebsd-fs@FreeBSD.ORG Thu Mar 12 19:58:38 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 9BD3010656BF for ; Thu, 12 Mar 2009 19:58:38 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206045082.chello.pl [87.206.45.82]) by mx1.freebsd.org (Postfix) with ESMTP id C45988FC29 for ; Thu, 12 Mar 2009 19:58:37 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 0C57145685; Thu, 12 Mar 2009 20:58:35 +0100 (CET) Received: from localhost (chello087206045082.chello.pl [87.206.45.82]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 71B1745684; Thu, 12 Mar 2009 20:58:29 +0100 (CET) Date: Thu, 12 Mar 2009 20:59:05 +0100 From: Pawel Jakub Dawidek To: Guido van Rooij Message-ID: <20090312195904.GA1786@garage.freebsd.pl> References: <20090311215518.GA25410@gvr.gvr.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <20090311215518.GA25410@gvr.gvr.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@freebsd.org Subject: Re: 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: Thu, 12 Mar 2009 19:58:39 -0000 --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Anyway, when rebooting, geli does not detach and this the gmirror is > never destroyed resulting in a rebuild each time. >=20 > I just commited a fix for this (set the G_ELI_FLAG_WO_DETACH in g_eli_tas= te(). > However, this seems to break zfs as zfs might actually close the geli dev= ice > and later opening it (but it is then no longer there). >=20 > We must therefor make this configurable. >=20 > 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. >=20 > 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? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFJuWmIForvXbEpPzQRAt1hAJ9UW8NOv7XmqOYkEq+MSUxKE1npaQCfTvzA DpmexskXV1aX4s6W2EG5IDI= =HFd3 -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL--