What happened?
When creating a PersistentVolumeClaim (PVC) with a StorageClass that specifies mkfsOptions, the open-local CSI driver does not pass these options to the mkfs command during volume formatting.
For example, with the following StorageClass:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: local-ext4-casefold
provisioner: local.csi.aliyun.com
parameters:
mkfsOptions: "-O casefold -E nodiscard"
The actual mkfs.ext4 command executed by the CSI plugin is:
mkfs.ext4 -F -m0 /dev/open-local-pool-0/volume-xxx
The expected command should include the user-provided options:
mkfs.ext4 -F -m0 -O casefold -E nodiscard /dev/open-local-pool-0/volume-xxx
This prevents users from enabling critical ext4 features like casefold or disabling discard for performance reasons.Does the StorageClass of Open-Local support the mkfsOptions parameter? If not, why not?
What happened?
When creating a PersistentVolumeClaim (PVC) with a StorageClass that specifies
mkfsOptions, the open-local CSI driver does not pass these options to themkfscommand during volume formatting.For example, with the following StorageClass:
The actual mkfs.ext4 command executed by the CSI plugin is:
mkfs.ext4 -F -m0 /dev/open-local-pool-0/volume-xxxThe expected command should include the user-provided options:
mkfs.ext4 -F -m0 -O casefold -E nodiscard /dev/open-local-pool-0/volume-xxxThis prevents users from enabling critical ext4 features like casefold or disabling discard for performance reasons.Does the StorageClass of Open-Local support the
mkfsOptionsparameter? If not, why not?