From 525ed353dc2bf01936bbf8b1d91a6865cfd11395 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 18 Sep 2019 17:15:44 +0200 Subject: [PATCH] Don't remove and recreate lun when changing a volume It's not needed, LIO sees the new size automatically. And it was broken anyway. Partially fix #2335 Signed-off-by: Daniel Berteaud --- PVE/Storage/LunCmd/LIO.pm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/PVE/Storage/LunCmd/LIO.pm b/PVE/Storage/LunCmd/LIO.pm index e0fac82..1ddc02d 100644 --- a/PVE/Storage/LunCmd/LIO.pm +++ b/PVE/Storage/LunCmd/LIO.pm @@ -322,14 +322,8 @@ my $import_lun = sub { # needed for example when the underlying ZFS volume has been resized my $modify_lun = sub { my ($scfg, $timeout, $method, @params) = @_; - my $msg; - - $msg = $delete_lun->($scfg, $timeout, $method, @params); - if ($msg) { - $msg = $create_lun->($scfg, $timeout, $method, @params); - } - - return $msg; + # Nothing to do on volume modification for LIO + return undef; }; my $add_view = sub {