diff --git a/src/driver/freenas/index.js b/src/driver/freenas/index.js index 491b334..19c8ba0 100644 --- a/src/driver/freenas/index.js +++ b/src/driver/freenas/index.js @@ -295,12 +295,16 @@ class FreeNASDriver extends ControllerZfsSshBaseDriver { ? this.options.iscsi.extentRpm : "SSD"; - const extentAvailThreshold = this.options.iscsi.hasOwnProperty( + let extentAvailThreshold = this.options.iscsi.hasOwnProperty( "extentAvailThreshold" ) - ? this.options.iscsi.extentAvailThreshold + ? Number(this.options.iscsi.extentAvailThreshold) : null; + if (!(extentAvailThreshold > 0 && extentAvailThreshold <= 100)) { + extentAvailThreshold = null; + } + switch (apiVersion) { case 1: { response = await httpClient.get(