lvmplugin: add external-snapshots option && forbid creation of qcow2 volumes without it
Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
This commit is contained in:
committed by
Wolfgang Bumiller
parent
d78a91fdbc
commit
4ef8ab60f6
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user