recursive GPT partitioning

Warner Losh imp at bsdimp.com
Sat Oct 13 15:47:30 UTC 2018


On Sat, Oct 13, 2018 at 9:27 AM Wojciech Puchar <wojtek at puchar.net> wrote:

> i have 2 SSDs in server which is GPT partitioned. Among others there are
> lots of partitions for virtual machines. i use glabel to label these
> partitions
>
> Each partition is geli encrypted andthen partitioned MBR or GPT way
> depending on many things.
>
> for geli encrypted partition then subdivided with MBR i can directly
> access (of course if bhyve is not running on it) it with for example
>
> /dev/label/partitionname.elis1 - to access first subpartition of geli
> encrypted "partitionname" labeled partition.
>
>
> but with GPT subpartitioned partition it doesn't work. i need to use
> ggatel to access subpartition.
>
> can it be changed?
>

static int
g_part_gpt_probe(struct g_part_table *table, struct g_consumer *cp)
{
struct g_provider *pp;
        u_char *buf;
        int error, index, pri, res;

        /* We don't nest, which means that our depth should be 0. */
        if (table->gpt_depth != 0)
return (ENXIO);

is what enforces that. It would be easy enough to add an option here such
that you could do:

#ifndef GPT_MAX_DEPTH
#define GPT_MAX_DEPTH 0
#endif

...
if (table->gpt_depth > GPT_MAX_DEPTH) return ENXIO;

Warner


More information about the freebsd-hackers mailing list