Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Oct 2018 09:47:17 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Wojciech Puchar <wojtek@puchar.net>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: recursive GPT partitioning
Message-ID:  <CANCZdfo35fnK3OG=N-2rjPewqPXAN30AG4-Trzx4=jNz2XVR1Q@mail.gmail.com>
In-Reply-To: <alpine.BSF.2.20.1810131720260.68658@puchar.net>
References:  <alpine.BSF.2.20.1810131720260.68658@puchar.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Oct 13, 2018 at 9:27 AM Wojciech Puchar <wojtek@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfo35fnK3OG=N-2rjPewqPXAN30AG4-Trzx4=jNz2XVR1Q>