no discard

This commit is contained in:
Marius Guščius 2025-07-18 18:17:28 +03:00
parent 8193b689ed
commit 58fe4d7fbd
1 changed files with 7 additions and 0 deletions

View File

@ -1501,6 +1501,13 @@ class CsiBaseDriver {
case "ext3":
case "ext4":
case "ext4dev":
/**
* Skip the automatic blockdiscard (TRIM) phase so mkfs doesnt
* wait on the storage backend to zero/free every block. On many
* iSCSI or thinprovisioned 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;