path: root/lib/geom
diff options
authorKyle Evans <kevans@FreeBSD.org>2019-09-03 20:57:20 +0000
committerKyle Evans <kevans@FreeBSD.org>2019-09-03 20:57:20 +0000
commitef03f57dd201827cc74615571c410273e49a5964 (patch)
tree817841551cbdd7b5ab38853f4cd816fb400f6830 /lib/geom
parentdca52ab480bfe71c3dc1d86822e551a7d1c9ec72 (diff)
Allow more nesting of GEOM partitioning schemes
GEOM is supposed to be topology-agnostic, but the GPT and BSD partition code has arbitrary restrictions on nesting that are annoying in cases such as running VMs on raw partitions (since the VM's partitioning scheme is not visible to the host). This patch adds sysctls to disable the restrictions except in the case of BSD label (and similar) partitions with offset 0 (where we need to avoid recursively recognizing the label). Submitted by: Andrew Gierth MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21350
Notes: svn path=/head/; revision=351797
Diffstat (limited to 'lib/geom')
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/geom/part/gpart.8 b/lib/geom/part/gpart.8
index 80ea0a317d3a..a19f06dd67be 100644
--- a/lib/geom/part/gpart.8
+++ b/lib/geom/part/gpart.8
@@ -24,7 +24,7 @@
.\" $FreeBSD$
-.Dd June 17, 2018
+.Dd September 3, 2019
@@ -1207,7 +1207,13 @@ variables can be used to control the behavior of the
GEOM class.
The default value is shown next to each variable.
.Bl -tag -width indent
-.It Va kern.geom.part.auto_resize: No 1
+.It Va kern.geom.part.allow_nesting : No 0
+By default, some schemes (currently BSD, BSD64 and VTOC8) do not permit
+further nested partitioning.
+This variable overrides this restriction and allows arbitrary nesting (except
+within partitions created at offset 0).
+Some schemes have their own separate checks, for which see below.
+.It Va kern.geom.part.auto_resize : No 1
This variable controls automatic resize behavior of
GEOM class.
@@ -1228,6 +1234,9 @@ disk metadata.
If some inconsistency is detected, the partition table will be
rejected with a diagnostic message:
.Sy "GEOM_PART: Integrity check failed (provider, scheme)" .
+.It Va kern.geom.part.gpt.allow_nesting : No 0
+By default the GPT scheme is allowed only at the outermost nesting level.
+This variable allows this restriction to be removed.
.It Va kern.geom.part.ldm.debug : No 0
Debug level of the Logical Disk Manager (LDM) module.
This can be set to a number between 0 and 2 inclusive.