You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for a new `mkfsOptions` StorageClass parameter that allows
cluster admins to pass custom mkfs flags when formatting volumes. This
is particularly useful for Ceph-backed storage where passing
`-E nodiscard` to mkfs.ext4 can dramatically speed up provisioning
(e.g. from ~7 minutes to seconds for a 100 GB volume).
The parameter value is comma-separated, with each token further split
on whitespace to produce individual mkfs command-line arguments.
Example: `mkfsOptions: "-E nodiscard,-O ^metadata_csum"`
Implementation:
- Extract mkfsOptions from StorageClass params in CreateVolume and pass
via VolumeContext (both new-volume and idempotent early-return paths)
- Parse mkfsOptions in NodeStageVolume using parseMkfsOptions() helper
- Use FormatAndMountSensitiveWithFormatOptions() from k8s.io/mount-utils
to pass format options separately from mount options
- No behavior change when mkfsOptions is not set
Inspired by the Ceph CSI implementation (ceph/ceph-csi#621).
| StorageClass `parameters`|`availability`|`nova`| String. Volume Availability Zone |
285
285
| StorageClass `parameters`|`type`| Empty String | String. Name/ID of Volume type. Corresponding volume type should exist in cinder |
286
+
| StorageClass `parameters`|`mkfs-options`| Empty String | String. Comma-separated mkfs options passed to mkfs when formatting the volume. |
286
287
| VolumeSnapshotClass `parameters`|`force-create`|`false`| Enable to support creating snapshot for a volume in in-use status |
287
288
| VolumeSnapshotClass `parameters`|`type`| Empty String |`snapshot` creates a VolumeSnapshot object linked to a Cinder volume snapshot. `backup` creates a VolumeSnapshot object linked to a cinder volume backup. Defaults to `snapshot` if not defined |
288
289
| VolumeSnapshotClass `parameters`|`backup-max-duration-seconds-per-gb`|`20`| Defines the amount of time to wait for a backup to complete in seconds per GB of volume size |
0 commit comments