From 0b760eefc3ae8787e4d83235ca20e2ae886cf166 Mon Sep 17 00:00:00 2001 From: Kevin Scott Adams Date: Sat, 21 May 2022 15:19:46 -0400 Subject: [PATCH] Fix TrueNAS-Scale slash replacement. - When changing from slashes (/) to dashes (-), I did not provide the global parameter so a Storage/Tank/Disks would turn out to be Storage-Tank/Disks causing a iSCSI: Failed to connect to LUN : iscsi_service failed with : iscsi_service_reconnect_if_loggedin. Can not reconnect right now. --- perl5/PVE/Storage/LunCmd/FreeNAS.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perl5/PVE/Storage/LunCmd/FreeNAS.pm b/perl5/PVE/Storage/LunCmd/FreeNAS.pm index 28975b2..1bb75c6 100644 --- a/perl5/PVE/Storage/LunCmd/FreeNAS.pm +++ b/perl5/PVE/Storage/LunCmd/FreeNAS.pm @@ -535,7 +535,7 @@ sub freenas_iscsi_create_extent { $name =~ s/^.*\///; # all from last / my $pool = $scfg->{'pool'}; if ($product_name eq "TrueNAS-SCALE") { - $pool =~ s/\//-/; + $pool =~ s/\//-/g; } $name = $pool . ($product_name eq "TrueNAS-SCALE" ? '-' : '/') . $name;