This commit is contained in:
masterjg 2025-07-18 18:17:59 +03:00 committed by GitHub
commit 921681af1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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;