Storage class for creating lightweight volumes
Create lightweight volumes by using storage class.
The configuration is as follows:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ibm-spectrum-scale-csi-lt
provisioner: spectrumscale.csi.ibm.com
parameters:
volBackendFs: "gpfs0"
volDirBasePath: "pvfileset/lwdir"
reclaimPolicy: Delete
The following fields come under the parameters section of storageClass. Parameters section is
mandatory for IBM
Storage Scale CSI driver
storageClass:
Field name | Description |
---|---|
volBackendFs | The file system on which the directory-based volume must be created. |
volDirBasePath | The base path under which all volumes with this storage class is created. This path must exist. The relative path from the file system mount point. |
uid (optional) | The username of the directory. The uid/gid must exist on the IBM Storage Scale GUI node. |
gid (optional) | The group name of the directory. The uid/gid must exist on the IBM Storage Scale GUI node. |
shared (optional) | Use shared =true , if you have pods with
non-root users that are using PVCs with ReadWriteMany (RWX) access mode. Default
value is false. |
nodeClass (optional) | The user can specify a pre-existing nodeClass in
storageClass , so that the pre-existing nodeClass is used when a
volume is created from an existing volume or snapshot. If a nodeClass is specified,
only the node belonging to it participates in data copy.
|
Note:
- Since lightweight volume does not enforce quota, it can grow beyond defined size, which may result in consuming whole file system. To avoid this, you must manually create or use an existing fileset to host the lightweight PVC volumes. This can be done by specifying the directory inside fileset for volDirBasePath option.
- Do not use filesets that are created by the IBM Storage Scale Container Storage Interface driver for hosting lightweight volumes. When fileset-based volumes get deleted, all the data under the fileset, including lightweight PVC if created, also gets deleted.