[PATCH FOLLOW-UP storage 13/14] lvmplugin: add external-snapshots option && forbid creation of qcow2 volumes without it
Alexandre Derumier
alexandre.derumier at groupe-cyllene.com
Wed Jul 16 08:31:52 CEST 2025
Signed-off-by: Alexandre Derumier <alexandre.derumier at groupe-cyllene.com>
---
src/PVE/Storage/LVMPlugin.pm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index 6e77eb3..1f5a5f1 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -399,6 +399,7 @@ sub options {
base => { fixed => 1, optional => 1 },
tagged_only => { optional => 1 },
bwlimit => { optional => 1 },
+ 'external-snapshots' => { optional => 1 },
};
}
@@ -603,6 +604,10 @@ my sub alloc_lvm_image {
die "unsupported format '$fmt'" if $fmt ne 'raw' && $fmt ne 'qcow2';
+ die "external-snapshots option need to be enabled to use qcow2 format"
+ if $fmt eq 'qcow2'
+ && !$scfg->{'external-snapshots'};
+
$class->parse_volname($name);
my $vgs = lvm_vgs();
--
2.39.5
More information about the pve-devel
mailing list