[pve-devel] [PATCH storage 1/3] Don't remove and recreate lun when changing a volume

Daniel Berteaud daniel at firewall-services.com
Tue Sep 17 12:44:02 CEST 2019


It's not needed, LIO sees the new size automatically.
And it was broken anyway. Partially fix #2335
---
 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 {
-- 
2.21.0





More information about the pve-devel mailing list