From owner-freebsd-fs@FreeBSD.ORG Sun Mar 22 16:09:29 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 E1D711065673 for ; Sun, 22 Mar 2009 16:09:29 +0000 (UTC) (envelope-from gsutter@zer0.org) Received: from kyanos.zer0.org (kyanos.zer0.org [149.20.54.45]) by mx1.freebsd.org (Postfix) with ESMTP id C47368FC12 for ; Sun, 22 Mar 2009 16:09:29 +0000 (UTC) (envelope-from gsutter@zer0.org) Received: from localhost (localhost [127.0.0.1]) by kyanos.zer0.org (Postfix) with ESMTP id 3E567126366B; Sun, 22 Mar 2009 05:05:22 -0700 (PDT) X-Virus-Scanned: amavisd-new at zer0.org Received: from kyanos.zer0.org ([127.0.0.1]) by localhost (kyanos.zer0.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DeNSsehInk2A; Sun, 22 Mar 2009 05:05:22 -0700 (PDT) Received: by kyanos.zer0.org (Postfix, from userid 1001) id D7D341263667; Sun, 22 Mar 2009 05:05:21 -0700 (PDT) Date: Sun, 22 Mar 2009 05:05:21 -0700 From: Gregory Sutter To: Pawel Jakub Dawidek Message-ID: <20090322120521.GA5584@kyanos.zer0.org> References: <20090311215518.GA25410@gvr.gvr.org> <20090312195904.GA1786@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline In-Reply-To: <20090312195904.GA1786@garage.freebsd.pl> Organization: Zer0 X-Purpose: For great justice! Mail-Copies-To: poster X-PGP-Fingerprint: D161 E4EA 4BFA 2427 F3F9 5B1F 2015 31D5 845D FEDD X-PGP-Key: http://zer0.org/~gsutter/gsutter.pgp User-Agent: Mutt/1.5.18 (2008-05-17) 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: Sun, 22 Mar 2009 16:09:30 -0000 --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2009-03-12 20:59 +0100, Pawel Jakub Dawidek 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. > >=20 > > Anyway, when rebooting, geli does not detach and this the gmirror is > > never destroyed resulting in a rebuild each time. >=20 > 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. and - 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. --=20 Gregory S. Sutter A little nonsense now and then mailto:gsutter@zer0.org is relished by the wisest men. http://zer0.org/~gsutter/ --Roald Dahl (as Willy Wonka) --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iD8DBQFJximBIBUx1YRd/t0RAm77AJ9GBw477mj4IR5jN+248ptZBYf4uACfbJ+2 U7nHNVM5oqrx3TBXIihG7kU= =U/07 -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM--