csi-lvm icon indicating copy to clipboard operation
csi-lvm copied to clipboard

Support custom filesystem type and mount options

Open LoadingZhang opened this issue 4 years ago • 4 comments

such as

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: csi-lvm
parameters:
  fsType: ext4/xfs/btrfs
  mkfsOptions: xxxxx
  mountOptions: xxxxx
provisioner: metal-stack.io/csi-lvm
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete

LoadingZhang avatar May 09 '20 09:05 LoadingZhang

Can be done of course, but this will also create a much bigger container for the provisioner because userspace tools to handle btrfs and xfs and zfs all have a different set of tools to create/manage them. Additionally the kernel need to have support for these filesystems, which is often the case, but cant be given as always present.

Can you please elaborate what are you specific use cases for other filesystems than ext4, which is in our opinion the most performant general purpose filesystem out there.

For reference you can have a look at a plethora of benchmarks here: https://www.phoronix.com/scan.php?page=article&item=linux-50-filesystems

majst01 avatar May 17 '20 07:05 majst01

My servers have battery backend, I would like to disable filesystem journal and write barrier to improve performance. mkfs.ext4 in tens of terabytes raid disk will take more then 20s, it cause mkfs failure. And In Elasticsearch use case: large amount of small file r/w, btrfs is better then ext4/xfs, so I would prefer to use btrfs.

LoadingZhang avatar May 19 '20 02:05 LoadingZhang

If you are interested in implementing this in a merge request i will review it and help to bring it into shape. WDYT ?

majst01 avatar May 19 '20 05:05 majst01

Ok, I haven't coded any kubernetes project, but I will try. Thx

LoadingZhang avatar May 19 '20 15:05 LoadingZhang