G_PART macro definitions

Andrey V. Elsukov bu7cher at yandex.ru
Wed Dec 1 10:50:12 UTC 2010


On 01.12.2010 12:25, perryh at pluto.rain.com wrote:
> There's _something_ -- probably several things -- about all this that
> I am not understanding at all, the most important being:
> 
>     How _should_ I be setting this up, so as to
>     * mirror only one partition -- not the whole disk or the whole
>       FreeBSD slice,
>     * subdivide that mirror into journalled root, /var, and /usr
>       filesystems, and
>     * have the resulting root partition be bootable
>     given that the system is too old for its BIOS to recognize GPT?

I do not know about any BIOS restrictions which can prevent booting
from GPT. BIOS does not should know anything about GPT. It only does
run boot code from PMBR, PMBR does run boot code from "freebsd-boot"
partition, and so on.

> Some of the rest, in no particular order:
> 
> How is the tasting of ad0s2a managing to see the "outer" label -- the
> one that defines ad0s2a -- when that label is on ad0s2 prior to the
> first block of ad0s2a?  Is tasting permitted to examine parts of the
> device outside the boundaries of the provider that is being tasted?

I did mean mirror/gm0, not ad0s2a. It was my guess. I needs to see
`gpart show` output to be sure.

About your example.

3. ad0s2 is offered for tasting. GPART finds the BSD label and creates
an instance of ad0s2 which has an attribute "PART::isleaf". Also it
creates any providers from BSD label (ad0s2a, ad0s2b).

4. ad0s2a is offered for tasting. It depends which ranges has this
provider, by default it starts with zero offset and in that case it contains
the same BSD label which was detected in ad0s2. But ad0s2 has attribute
"PART::isleaf" and this BSD label will be skipped. Ok, but ad0s2a also have
GMIRROR's meta-data and GMIRROR will create mirror/gm0.

5. mirror/gm0 is offered for tasting. GPART finds the BSD label and creates
new instance for mirror/gm0, because this provider does not have "PART::isleaf"
attribute. Also it creates any providers from BSD label (mirror/gm0a, mirror/gm0b).

Now you see why you can not get access to your nested BSD label.
I may be wrong, if so, Marcel can correct me.

-- 
WBR, Andrey V. Elsukov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20101201/1372557e/signature.pgp


More information about the freebsd-geom mailing list