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.
This commit is contained in:
Kevin Scott Adams 2022-05-21 15:19:46 -04:00
parent c3b6f38c61
commit 0b760eefc3
1 changed files with 1 additions and 1 deletions

View File

@ -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;