LVM: lock on volume_resize
This is important for shared LVM storages. As with deletes and creates of images, as else we may have not the up-to-date metadata and extents may get reused if another node created an image during the same time, for example. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
committed by
Wolfgang Bumiller
parent
a4bdab17bb
commit
49cc7802f7
@ -491,7 +491,10 @@ sub volume_resize {
|
|||||||
|
|
||||||
my $path = $class->path($scfg, $volname);
|
my $path = $class->path($scfg, $volname);
|
||||||
my $cmd = ['/sbin/lvextend', '-L', $size, $path];
|
my $cmd = ['/sbin/lvextend', '-L', $size, $path];
|
||||||
run_command($cmd, errmsg => "error resizing volume '$path'");
|
|
||||||
|
$class->cluster_lock_storage($storeid, $scfg->{shared}, undef, sub {
|
||||||
|
run_command($cmd, errmsg => "error resizing volume '$path'");
|
||||||
|
});
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user