From cc9707a14caec2f1c8ae8d8488992e4e49c773d1 Mon Sep 17 00:00:00 2001 From: Kevin Scott Adams Date: Tue, 13 Apr 2021 14:47:21 -0400 Subject: [PATCH] TrueNAS-Scale slash substitution. - Changed a slash (/) to a dash (-) on the $cfg->{'pool'} reference. SCST does not support '/' characters on the device. - Possible fix for #75. --- perl5/PVE/Storage/LunCmd/FreeNAS.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/perl5/PVE/Storage/LunCmd/FreeNAS.pm b/perl5/PVE/Storage/LunCmd/FreeNAS.pm index 1bc0198..ace1489 100644 --- a/perl5/PVE/Storage/LunCmd/FreeNAS.pm +++ b/perl5/PVE/Storage/LunCmd/FreeNAS.pm @@ -510,6 +510,8 @@ sub freenas_iscsi_create_extent { my $name = $lun_path; $name =~ s/^.*\///; # all from last / + if ($product_name eq "TrueNAS-SCALE") { + $scfg->{'pool'} =~ s/\//-/; $name = $scfg->{'pool'} . ($product_name eq "TrueNAS-SCALE" ? '-' : '/') . $name; my $device = $lun_path;