In Kubernetes, A StorageClass provides a way for administrators to describe the “classes” of storage they offer.
In relation to NVMesh, different StorageClasses could describe different type of volumes that will be created by the NVMesh backend. (e.g different RAID Levels)

Let’s look at an exapmle of a storageclass yaml, and then describe the NVMesh relevant fields and their options.
for more information on StorageClass please refer to K8s Docs – StorageClass

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: nvmesh-raid10
provisioner: nvmesh-csi.excelero.com
allowVolumeExpansion: true
volumeBindingMode: Immediate
mountOptions:
  - debug
parameters:
  vpg: DEFAULT_RAID_10_VPG

provisioner

the provisioner field determines which driver / plugin of storage backend will be used for provisioning the volume.
To create an NVMesh volume this field must be set to: nvmesh-csi.excelero.com

allowVolumeExpansion

The field allowVolumeExpansion controls weather the volume should be expandable or not.
for more info please refer to K8s Docs – Allow Volume Expansion

volumeBindingMode

The volumeBindingMode field controls when should the volume provisioning occur. The following values are accepted:

  • Immediate – This is the default if omitted. If this value is set, dynamic provisioning occurs once the PersistentVolumeClaim is created.
  • WaitForFirstConsumer – If this value is set, volume provisioning will be delayed until a Pod using the PersistentVolumeClaim is created.

For more info on volumeBindingMode please refer to K8s Docs – VolumeBindingMode

mountOptions

The mountOptions field allows to set the options passed to the mount command (mount -o <options>) and a special key allows to set the mount permissions

To set the mount permissions for example to 777 use:

mountOptions:
  - nvmesh:chmod=777

parameters

the parameters field is a structure that allows to define NVMesh specific parameters. The following parameters are accepted:

  • fsType – When a PVC has volumeMode: FileSystem the fsType field will determine which FileSystem type will be deployed on the volume. allowed values are: ext3, ext4, xfs
  • vpg – (string, optional) – The name of the NVMesh Volume Provisioning Group (VPG) as defined in the NVMesh Management.
  • raidLevel – (string, optional) – the volume type, allowed values are: concatenated, raid0, raid1, raid10 and ec
  • diskClasses (list, optional) – limit volume allocation to specific diskClasses, defaults to None
  • serverClasses (list, optional) – limit volume allocation to specific serverClasses, defaults to None
  • limitByDisks (list, optional) – limit volume allocation to specific disks, defaults to None
  • limitByNodes (list, optional) – limit volume allocation to specific nodes, defaults to None

If raidLevel is defined, the following parameters are accepted according to the selected raildLevel:

  • If raidLevel is raid0 or raid10
    • stripeSize (integer, optional) – number in blocks of 4k, i.e. stripeSize:32 = 128k, optional, defaults to 32
    • stripeWidth (integer, optional) – number of disks to use, defaults to 2
  • If raidLevel is ec
    • dataBlocks (integer, optional) – number of disks to use, defaults to 8
    • parityBlocks (integer, optional) – number of disks to use, defaults to 2
    • protectionLevel (string, optional) – protection level to use, allowed values are Full Separation, Minimal Separation, Ignore Separation defaults to Full Separation

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment