From 58fe4d7fbd96b5917cd8159657bc10abe1f177a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Gu=C5=A1=C4=8Dius?= Date: Fri, 18 Jul 2025 18:17:28 +0300 Subject: [PATCH] no discard --- src/driver/index.js | 7 +++++++ 1 file changed, 7 insertions(+) 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;