zfspoolplugin: fix volume_resize
copy methode volume_resize form ZFSPlugin.pm to ZFSPoolPlugin.pm refactor volume_resize Signed-off-by: Wolfgang Link <w.link@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
02c33525df
commit
a4034b9f19
@ -299,11 +299,12 @@ sub free_image {
|
||||
|
||||
sub volume_resize {
|
||||
my ($class, $scfg, $storeid, $volname, $size, $running) = @_;
|
||||
|
||||
my $new_size = $class->SUPER::volume_resize($scfg, $storeid, $volname, $size, $running);
|
||||
|
||||
my $new_size = ($size/1024);
|
||||
|
||||
$class->zfs_request($scfg, undef, 'set', 'volsize=' . $new_size . 'k', "$scfg->{pool}/$volname");
|
||||
$class->zfs_resize_lu($scfg, $volname, $new_size);
|
||||
|
||||
return $new_size;
|
||||
}
|
||||
|
||||
sub volume_snapshot_rollback {
|
||||
|
||||
@ -489,6 +489,16 @@ sub create_base {
|
||||
return $newvolname;
|
||||
}
|
||||
|
||||
sub volume_resize {
|
||||
my ($class, $scfg, $storeid, $volname, $size, $running) = @_;
|
||||
|
||||
my $new_size = ($size/1024);
|
||||
|
||||
$class->zfs_request($scfg, undef, 'set', 'volsize=' . $new_size . 'k', "$scfg->{pool}/$volname");
|
||||
|
||||
return $new_size;
|
||||
}
|
||||
|
||||
sub volume_has_feature {
|
||||
my ($class, $scfg, $feature, $storeid, $volname, $snapname, $running) = @_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user