Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jun 2009 14:51:02 +0200
From:      Ivan Voras <ivoras@freebsd.org>
To:        Marcel Moolenaar <xcllnt@mac.com>
Cc:        freebsd-current@freebsd.org, freebsd-questions@freebsd.org, freebsd-geom@freebsd.org
Subject:   Re: gmirror gm0 destroyed on shutdown; GPT corrupt
Message-ID:  <9bbcef730906280551r26e30b61oc84acdd02d94743e@mail.gmail.com>
In-Reply-To: <2FFFB36F-EFA3-4D92-98A3-692BA2D6F63E@mac.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>

next in thread | previous in thread | raw e-mail | index | archive | help
2009/6/28 Marcel Moolenaar <xcllnt@mac.com>:

> Using the last sector is not only flawed because it creates a race
> condition, it's flawed in the assumption that you can always make
> a geom part of a mirror by storing meta-data on the geom without
> causing corruption. This whole idea of using the last sector was
> so that a fully partitioned disk with data could be turned into a
> mirrored disk. A neat idea, but hardly the basis for a generic
> mirroring implementation when it silently corrupts a disk.
>
> I think it's better to change gmirror to use the first sector on the
> provider.

Yes, it would be cleaner to implement but it would also make the
mirrored devices unbootable.

But maybe the class of users needing the functionality is smaller now.

> This never creates a race condition and as such, you don't
> need to invent a priority scheme, that has it's own set of flaws on
> top of it. The only downside is that it's not easy to make a fully
> partitioned and populated disk part of a mirror: one would need to
> move the data forward one sector to free the first sector. This we
> can actually do by inserting a GEOM that does it while I/O is still
> ongoing. The good thing is: we need a class that does exactly this
> for implementing the "move" verb in gpart.

Looks too complicated and fragile. Maybe there's a need for
metadata-less automatic mirrors in some way, by storing the
configuration somewhere else, possibly in /etc.



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