From owner-freebsd-geom@FreeBSD.ORG Tue Jun 30 22:25:41 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80A311065675 for ; Tue, 30 Jun 2009 22:25:41 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from hamlet.setfilepointer.com (hamlet.SetFilePointer.com [63.224.10.2]) by mx1.freebsd.org (Postfix) with SMTP id 251B38FC1D for ; Tue, 30 Jun 2009 22:25:41 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 49440 invoked from network); 30 Jun 2009 17:25:40 -0500 Received: from keira.kiwi-computer.com (HELO kiwi-computer.com) (63.224.10.3) by hamlet.setfilepointer.com with SMTP; 30 Jun 2009 17:25:40 -0500 Received: (qmail 34700 invoked by uid 2001); 30 Jun 2009 22:25:40 -0000 Date: Tue, 30 Jun 2009 17:25:40 -0500 From: "Rick C. Petty" To: Ivan Voras Message-ID: <20090630222540.GA34541@keira.kiwi-computer.com> References: <20090625110253.GA31443@mech-cluster238.men.bris.ac.uk> <10FCC74D-6D46-4112-AD89-BBB4C5933957@mac.com> <2FFFB36F-EFA3-4D92-98A3-692BA2D6F63E@mac.com> <20090629210003.GA24038@keira.kiwi-computer.com> <704EE47D-F0C4-4C63-AA3C-3ADF92CC8379@mac.com> <20090630215345.GC33849@keira.kiwi-computer.com> <9bbcef730906301508l6f2ae344tff8f7495e870049e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9bbcef730906301508l6f2ae344tff8f7495e870049e@mail.gmail.com> User-Agent: Mutt/1.4.2.3i Cc: Marcel Moolenaar , freebsd-geom@freebsd.org Subject: Re: gmirror gm0 destroyed on shutdown; GPT corrupt X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2008@kiwi-computer.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2009 22:25:41 -0000 On Wed, Jul 01, 2009 at 12:08:25AM +0200, Ivan Voras wrote: > 2009/6/30 Rick C. Petty : > > On Tue, Jun 30, 2009 at 02:37:55PM -0700, Marcel Moolenaar wrote: > > > Both bar and baz should validate their metadata and it should be pretty > > apparent that one of them has a smaller size.  If the one that is smaller > > fits perfectly into the one that is bigger, the taste should pass to the > > latter first. > > This is how it's currently done with "native" GEOM classes like > gmirror - if gmirror is put where it and something else can taste the > metadata, gmirror will decide by checking the size - usually +/- 1 > sector. But we can't embed this logic into "foreign" classes like GPT. Then those foreign classes should be given the last opportunity to taste, not the first. > GTP check the first sector (and the last sector for backup), while > gmirror checks the first sector, and GPT metadata (AFAIK) doesn't > contain media size. According to wikipedia, the GPT header contains: - (offset 40) First usable LBA for partitions - (offset 48) Last usable LBA -- Rick C. Petty