Discussion:
recursive GPT partitioning
(too old to reply)
Wojciech Puchar
2018-10-13 15:24:21 UTC
Permalink
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?
Warner Losh
2018-10-13 15:47:17 UTC
Permalink
Post by Wojciech Puchar
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

Loading...