Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jun 2009 17:25:40 -0500
From:      "Rick C. Petty" <rick-freebsd2008@kiwi-computer.com>
To:        Ivan Voras <ivoras@freebsd.org>
Cc:        Marcel Moolenaar <xcllnt@mac.com>, freebsd-geom@freebsd.org
Subject:   Re: gmirror gm0 destroyed on shutdown; GPT corrupt
Message-ID:  <20090630222540.GA34541@keira.kiwi-computer.com>
In-Reply-To: <9bbcef730906301508l6f2ae344tff8f7495e870049e@mail.gmail.com>
References:  <20090625110253.GA31443@mech-cluster238.men.bris.ac.uk> <10FCC74D-6D46-4112-AD89-BBB4C5933957@mac.com> <h24v15$70v$1@ger.gmane.org> <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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 01, 2009 at 12:08:25AM +0200, Ivan Voras wrote:
> 2009/6/30 Rick C. Petty <rick-freebsd2008@kiwi-computer.com>:
> > 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090630222540.GA34541>