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.
This commit is contained in:
Kevin Scott Adams 2021-04-13 14:47:21 -04:00
parent bd13f0a8c8
commit cc9707a14c
1 changed files with 2 additions and 0 deletions

View File

@ -510,6 +510,8 @@ sub freenas_iscsi_create_extent {
my $name = $lun_path; my $name = $lun_path;
$name =~ s/^.*\///; # all from last / $name =~ s/^.*\///; # all from last /
if ($product_name eq "TrueNAS-SCALE") {
$scfg->{'pool'} =~ s/\//-/;
$name = $scfg->{'pool'} . ($product_name eq "TrueNAS-SCALE" ? '-' : '/') . $name; $name = $scfg->{'pool'} . ($product_name eq "TrueNAS-SCALE" ? '-' : '/') . $name;
my $device = $lun_path; my $device = $lun_path;