SynologyOpenSource / synology-csi

Apache License 2.0
466 stars 96 forks source link

Add ability to provide format options #49

Closed rtim75 closed 1 year ago

rtim75 commented 1 year ago

Fixes #25

by upgrading mount-utils to 0.26.4 I was able to use FormatAndMountSensitiveWithFormatOptions and pass -E nodiscard options to it, which made plugin create and mount PV a lot faster.

I expanded that solution to be able to pass any mkfs arguments to the driver via StorageClass parameters:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
    storageclass.kubernetes.io/is-default-class: "true"
  name: synology-iscsi-hdd
provisioner: csi.san.synology.com
parameters:
  fsType: 'ext4'
  formatOptions: "-E nodiscard"
  location: '/volume6'
reclaimPolicy: Delete
allowVolumeExpansion: true

image

dcharbonnier commented 1 year ago

do you have a public available image to test this feature @rtim75 ?

rtim75 commented 1 year ago

https://hub.docker.com/r/rtim/synology-csi/tags

I've been running the only tag there for 2 months in my home lab with no issues. Let me know if you need anything else and I'll see what I can do

rtim75 commented 1 year ago

https://hub.docker.com/r/rtim/synology-csi/tags

I hope that it's a public image. Cannot check it right now

dcharbonnier commented 1 year ago

perfect it went from an infinite time to provision btrfs to few seconds, good job :+1:

      parameters:
        fsType: 'btrfs'
        formatOptions: "--nodiscard"
        protocol: 'iscsi'