In Kubernetes, a PersistentVolumeClaim (PVC) is a request for storage by a user.

Let’s look at an example of a PVC yaml, and then describe the fields relevant for NVMesh and their options.
For more information on PersistentVolumeClaims, see K8s Docs – PersistentVolumesClaims.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: block-pvc
spec:
  accessModes:
    - ReadWriteMany
  volumeMode: Block
  resources:
    requests:
      storage: 10Gi
  storageClassName: nvmesh-concatenated

Access Modes (accessModes)

The Kubernetes accessMode defines a per Node semantics of how the user wants to access the volume.
The following values are accepted:

  • ReadWriteOnce – the volume can be mounted as read-write by a single node.
  • ReadOnlyMany – the volume can be mounted read-only by many nodes.
  • ReadWriteMany – the volume can be mounted as read-write by many nodes.

Volume Mode (volumeMode)

The volumeMode field controls which type of volume will be created. accepted values are:

  • Block – Will create a raw block NVMesh volume.
  • FileSystem – Will create a block NVMesh volume and upon first attach the volume will be formatted into a FileSystem according to the FileSystem defined in the StorageClass. See Important Nodes and Known Issues for more info on FileSystem volumes limitations.

For more information on volumeMode please refer to K8s Docs – PersistentVolumesClaims

Request Storage (resources.requests.storage)

This enables entering the amount of Storage to be provisioned for the requested volume.
A value of 100Gi will create a 100GiB Volume in NVMesh.

Storage Class Name (storageClassName)

This is the name of the StorageClass object in Kubernetes.
It will tell Kubernetes that NVMesh is the storage backend as well as declare the volume type and its parameters.
After installing the nvmesh-csi-driver, default StorageClass objects for each of the default NVMesh Volume Provisioning Groups (VPGs) will be created.
Following is the list of default StorageClass names and their corresponding VPG in NVMesh:

StorageClass name NVMesh VPG
nvmesh-concatenated DEFAULT_CONCATENATED_VPG
nvmesh-raid0 DEFAULT_RAID_0_VPG
nvmesh-raid1 DEFAULT_RAID_1_VPG
nvmesh-raid10 DEFAULT_RAID_10_VPG
nvmesh-ec-dual-target-redundancy DEFAULT_EC_DUAL_TARGET_REDUNDANCY_VPG
nvmesh-ec-single-target-redundancy DEFAULT_EC_SINGLE_TARGET_REDUNDANCY_VPG

See more about StorageClasses here.

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