gmirror gm0 destroyed on shutdown; GPT corrupt
Rick C. Petty
rick-freebsd2008 at kiwi-computer.com
Tue Jun 30 22:25:41 UTC 2009
On Wed, Jul 01, 2009 at 12:08:25AM +0200, Ivan Voras wrote:
> 2009/6/30 Rick C. Petty <rick-freebsd2008 at 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
More information about the freebsd-geom
mailing list