diff --git a/src/driver/index.js b/src/driver/index.js index f0fe630..bb2c95e 100644 --- a/src/driver/index.js +++ b/src/driver/index.js @@ -1501,6 +1501,13 @@ class CsiBaseDriver { case "ext3": case "ext4": case "ext4dev": + /** + * Skip the automatic block‐discard (TRIM) phase so mkfs doesn’t + * wait on the storage backend to zero/free every block. On many + * iSCSI or thin‐provisioned volumes the discard step can stall + * mkfs for minutes—`-E nodiscard` makes the format finish immediately. + */ + formatOptions.unshift("-E", "nodiscard"); // disable reserved blocks in this scenario formatOptions.unshift("-m", "0"); break;