fix SCALE iscsi resize issue

Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
Travis Glenn Hansen 2023-05-09 08:40:52 -06:00
parent d476a5721b
commit a3df4bcca0
1 changed files with 4 additions and 1 deletions

View File

@ -1982,6 +1982,9 @@ class FreeNASSshDriver extends ControllerZfsBaseDriver {
this.ctx.logger.debug("zfs props data: %j", properties); this.ctx.logger.debug("zfs props data: %j", properties);
let iscsiName = let iscsiName =
properties[FREENAS_ISCSI_ASSETS_NAME_PROPERTY_NAME].value; properties[FREENAS_ISCSI_ASSETS_NAME_PROPERTY_NAME].value;
// name correlates to the extent NOT the target
let kName = iscsiName.replaceAll(".", "_");
/** /**
* command = execClient.buildCommand("systemctl", ["reload", "scst"]); * command = execClient.buildCommand("systemctl", ["reload", "scst"]);
@ -1998,7 +2001,7 @@ class FreeNASSshDriver extends ControllerZfsBaseDriver {
*/ */
command = execClient.buildCommand("sh", [ command = execClient.buildCommand("sh", [
"-c", "-c",
`echo 1 > /sys/kernel/scst_tgt/devices/${iscsiName}/resync_size`, `echo 1 > /sys/kernel/scst_tgt/devices/${kName}/resync_size`,
]); ]);
reload = true; reload = true;
} else { } else {