alibaba / open-local

cloud-native local storage management system for stateful workload, low-latency with simplicity
Apache License 2.0
464 stars 81 forks source link

I need LVM to specify a SSD or HDD type disk #255

Open dxygit1 opened 7 months ago

dxygit1 commented 7 months ago

Does the openlocal lvm type support specifying mediaType I need LVM to specify a SSD or HDD type disk

for example

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: lvm-xfs-ssd
{{ include "local.labels" . | indent 2 }}
provisioner: {{ .Values.driver }}
parameters:
  volumeType: "LVM"
  csi.storage.k8s.io/fstype: xfs
  mediaType: ssd
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
peter-wangxu commented 7 months ago

LVM can combine both SSD or HDD disk into one volume group, how do you think this scinario?

say, how you konw the VG is SSD or HDD or mixed?

dxygit1 commented 7 months ago

Add a new storage class binding to the corresponding volume group lvm-xfs-ssd. Specify that the volume group consists entirely of SSD disks. Is this feasible?

dxygit1 commented 7 months ago

Would it be possible to introduce a flexible approach where any storage class starting with 'lvm-xxx' follows the same logic of binding to a volume group? I'm defining two storage classes: lvm-xxx-ssd and lvm-xxx-hdd, which will bind to different volume groups. Do you think this is feasible

peter-wangxu commented 7 months ago

sure,but we need to a rule to detect the lvm type, eg, open-local needs to detect and report the vg type in node local storage CR

dxygit1 commented 7 months ago

Sure, can also add a parameter similar to mediaType to specify the name of the VG. Create the corresponding VG name in NLSC.

peter-wangxu commented 7 months ago

It's reasonable to add this feature via some coding change,do you have any further thoughts on this implementation?

dxygit1 commented 7 months ago

I'm not very familiar with writing Go code at the moment and don't have many ideas for implementing code.

dxygit1 commented 6 months ago

Hello, do you have time to implement this requirement?