Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Oct 2011 16:59:00 +0300
From:      Daniel Kalchev <daniel@digsys.bg>
To:        Pieter de Goeje <pieter@degoeje.nl>
Cc:        freebsd-current@freebsd.org
Subject:   Re: RFC: Project geom-events
Message-ID:  <4E8DB424.6050106@digsys.bg>
In-Reply-To: <201110061604.15036.pieter@degoeje.nl>
References:  <1927112464.20111004220507@serebryakov.spb.ru> <j6k7cm$mv0$1@dough.gmane.org> <4E8DA257.9080406@digsys.bg> <201110061604.15036.pieter@degoeje.nl>

next in thread | previous in thread | raw e-mail | index | archive | help


On 06.10.11 17:04, Pieter de Goeje wrote:
> The layering *is* correct and you *can* create a GPT inside a glabel
> label, but then
>
> 1) you get device names like /dev/label/somethingp1,
> /dev/label/somethingp2, etc.
>> .. and, you overwrite the last sector of the device, not of the
>> provider. This is incorrect layering -- GPT should see only the provider
>> it was given and nothing at different layers.
> If you stack GPT on top of glabel, then your statement is not true. GPT will
> overwrite the last sector of the (glabel) provider, not the underlying device.
> There is no layering violation.

I stand corrected. Sorry for creating confusion with this statement.

Most of the time I was blaming GPT, I was actually blaming GLABEL (see 
below)

> Because physically the first sector of the device is still GPT data the BIOS
> will still try to boot from it, hence it would probably be wise to disallow
> GPT on anything other then raw devices.
Yes, but.. what is a raw device? Probably disallow GPT on devices that 
are not bootable, but how this can be indicated? GPT is very useful for 
it's ability to create labeled partitions.

> This problem wouldn't exist if geom classes would write their metadata to the
> first sector, but then you could no longer boot from for example
> gmirrored/glabeled devices with a MBR.
>
We seem to blame GPT here, but it is really GLABEL the culprit here.

If GLABEL writes to the first sector of the provider and that makes the 
disk non-bootable, then there is little chance that somebody will try to 
use first GLABEL, then GPT etc and create the current situation.

Unfortunately, the GLABEL + GMIRROR setup is so common..



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