gpart on top of eli inside a slice is not working

Marcel Moolenaar xcllnt at mac.com
Thu Mar 26 09:06:05 PDT 2009


On Mar 25, 2009, at 11:29 PM, Bjoern A. Zeeb wrote:

> On Wed, 25 Mar 2009, Marcel Moolenaar wrote:
>
>>
>> On Mar 25, 2009, at 2:57 PM, Bjoern A. Zeeb wrote:
>>
>>> Here´s a script to reproduce this on head.
>>
>> First of all: exemplary problem reporting!
>>
>>> Any ideas?
>>
>> The probe method of the GPT scheme explicitly disallows nesting.
>> This is inconsistent with the create method, which happily allows
>> creating a GPT underneath a MBR.
>>
>> The bug is in the create method: GPT cannot be created inside a
>> MBR slice (or any other partioning for that matter). I'll fix
>> that shortly.
>
> Well technically it is created inside some random garbage from eli and
> not directly inside the MBR slice.

When I refer to nesting, I mean the on-disk layout. It's almost
meaningless to talk in terms of GEOM nesting, because you can't
assume anything.

Thus: the fact that geli is in between the two gpart instances is
irrelevant.

> So the only possible solutions for those would be:
> 1) Somehow convert the entire disk to part and then exposing the 3
>   freebsd-* partitions and have a dedicated eli inside each.

I don't understand what you're trying to say. Can you
elaborate?

> 2) try (and stick with) bsdlabel on top of the eli inside the mbr
>   slice?

A different scheme, one that is allowed to be nested (again, from
an on-disk layout PoV), is the right thing to do.

> So can you explain why there is the restriction that part cannot be
> used inside a MBR slice or rather somewhere on top of such?

There's no such restriction in gpart. If there was, then gpart
would not be able to implement the BSD scheme or the EBR scheme.
FYI,

-- 
Marcel Moolenaar
xcllnt at mac.com





More information about the freebsd-geom mailing list