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
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
parameters
the parameters
field is a structure that allows to define NVMesh specific parameters. The following parameters are accepted:
fsType
– When a PVC hasvolumeMode: FileSystem
thefsType
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
andec
diskClasses
(list, optional) – limit volume allocation to specific diskClasses, defaults to NoneserverClasses
(list, optional) – limit volume allocation to specific serverClasses, defaults to NonelimitByDisks
(list, optional) – limit volume allocation to specific disks, defaults to NonelimitByNodes
(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
orraid10
stripeSize
(integer, optional) – number in blocks of 4k, i.e. stripeSize:32 = 128k, optional, defaults to 32stripeWidth
(integer, optional) – number of disks to use, defaults to 2
- If raidLevel is
ec
dataBlocks
(integer, optional) – number of disks to use, defaults to 8parityBlocks
(integer, optional) – number of disks to use, defaults to 2protectionLevel
(string, optional) – protection level to use, allowed values areFull Separation
,Minimal Separation
,Ignore Separation
defaults toFull Separation
Post your comment on this topic.