diff --git a/src/middlewared/middlewared/etc_files/scst.conf.mako b/src/middlewared/middlewared/etc_files/scst.conf.mako index 8c905d33cd3f7..02fcdf9dd622b 100644 --- a/src/middlewared/middlewared/etc_files/scst.conf.mako +++ b/src/middlewared/middlewared/etc_files/scst.conf.mako @@ -137,6 +137,7 @@ missing_extents = [] extents_io = {'vdisk_fileio': [], 'vdisk_blockio': []} for extent in extents.values(): + extent['name'] = extent['name'].replace('.', '_').replace('/', '-') # CORE ctl device names are incompatible with SCALE SCST if extent['locked']: middleware.logger.debug( 'Skipping generation of extent %r as the underlying resource is locked', extent['name'] @@ -160,7 +161,6 @@ missing_extents.append(extent['id']) continue - extent['name'] = extent['name'].replace('.', '_') # CORE ctl device names are incompatible with SCALE SCST extents_io[extents_io_key].append(extent) all_extent_names.append(extent['name']) diff --git a/src/middlewared/middlewared/plugins/iscsi_/global_linux.py b/src/middlewared/middlewared/plugins/iscsi_/global_linux.py index f8d218324b619..4e889eed25e09 100644 --- a/src/middlewared/middlewared/plugins/iscsi_/global_linux.py +++ b/src/middlewared/middlewared/plugins/iscsi_/global_linux.py @@ -108,8 +108,8 @@ def resync_lun_size_for_zvol(self, id_): try: # CORE ctl device names are incompatible with SCALE SCST - # so (similarly to scst.mako.conf) replace period with underscore - extent_name = extent[0]["name"].replace('.', '_') + # so (similarly to scst.mako.conf) replace period with underscore, slash with dash + extent_name = extent[0]["name"].replace('.', '_').replace('/', '-') with open(f'/sys/kernel/scst_tgt/devices/{extent_name}/resync_size', 'w') as f: f.write('1') except Exception as e: