[pve-devel] [PATCH v3 pve-container 3/3] Revert special case for LXC online resize.
mir at datanom.net
mir at datanom.net
Tue Jun 20 22:46:43 CEST 2017
From: Michael Rasmussen <mir at datanom.net>
The special handling is not needed since a fix is provided
in FreeNAS.pm
Signed-off-by: Michael Rasmussen <mir at datanom.net>
---
src/PVE/API2/LXC.pm | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index d333bea..3ea78ef 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1444,15 +1444,8 @@ __PACKAGE__->register_method({
PVE::Cluster::log_msg('info', $authuser, "update CT $vmid: resize --disk $disk --size $sizestr");
my $realcmd = sub {
# Note: PVE::Storage::volume_resize doesn't do anything if $running=1, so
- my $scfg = PVE::Storage::storage_config($storage_cfg, $storeid);
# we pass 0 here (parameter only makes sense for qemu)
- if ($scfg->{type} eq 'freenas') {
- # Since current FreeNAS API has a bug when doing online
- # resize give us a way to bail until the bug is fixed
- PVE::Storage::volume_resize($storage_cfg, $volid, $newsize, $running);
- } else {
- PVE::Storage::volume_resize($storage_cfg, $volid, $newsize, 0);
- }
+ PVE::Storage::volume_resize($storage_cfg, $volid, $newsize, 0);
$mp->{size} = $newsize;
$conf->{$disk} = PVE::LXC::Config->print_ct_mountpoint($mp, $disk eq 'rootfs');
@@ -1485,6 +1478,7 @@ __PACKAGE__->register_method({
} else {
# Some storage backends only exposes disks when VM is running
# and e2fsck and resize2fs requires access to the disk to work
+ my $scfg = PVE::Storage::storage_config($storage_cfg, $storeid);
if ($scfg->{type} eq 'freenas') {
PVE::Storage::activate_volumes($storage_cfg, [$volid]);
}
--
2.11.0
----
This mail was virus scanned and spam checked before delivery.
This mail is also DKIM signed. See header dkim-signature.
More information about the pve-devel
mailing list