diff --git a/PVE/Storage/LVMPlugin.pm b/PVE/Storage/LVMPlugin.pm index 8c0b613..d49a2b9 100644 --- a/PVE/Storage/LVMPlugin.pm +++ b/PVE/Storage/LVMPlugin.pm @@ -408,4 +408,16 @@ sub deactivate_volume { run_command($cmd, errmsg => "can't deactivate LV '$path'"); } +sub volume_resize { + my ($class, $scfg, $storeid, $volname, $size, $running) = @_; + + $size = ($size/1024/1024) . "M"; + + my $path = $class->path($scfg, $volname); + my $cmd = ['/sbin/lvextend', '-L', $size, $path]; + run_command($cmd, errmsg => "error resizing volume '$path'"); + + return 1; +} + 1;