lvmplugin : volume_resize
resize the lvm device (online or offline) return 1 to use qmp block_resize to online update size in guest Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
81f5058c01
commit
530defb603
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user