Static provisioning in a dynamic way (recommended)
Static provisioning in a dynamic way can use an existing fileset by defining the
StorageClass and PVC, similar to dynamic provisioning. A cluster administrator is
required only to create a storage class (or multiple storage classes). A new volume is then
automatically provisioned and created on demand for each user's persistent volume claim (PVC)
request. This feature is supported starting with the IBM Storage Scale Container Storage Interface
2.14.x. It enhances the capabilities for volume operations, such as volume snapshot, cloning, and
restore, with greater flexibility
- Volume snapshot
- Volume cloning
- Volume expansion
- Volume restore
- Create a storage class based on the required fileset type (dependent or
independent).Independent fileset storage class:
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: ibm-spectrum-scale-csi-fileset provisioner: spectrumscale.csi.ibm.com parameters: volBackendFs: gpfs0 existingVolume: "yes" reclaimPolicy: DeleteDependent fileset storage class:apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: ibm-spectrum-scale-csi-fileset-dependent provisioner: spectrumscale.csi.ibm.com parameters: volBackendFs: "gpfs0" existingVolume: "yes" filesetType: "dependent" parentFileset: "independent-fileset-fset1" reclaimPolicy: DeleteThe following fields are available for the "parameters:" section in aStorageClassmanifest. The "parameters:" section is a mandatory section for the IBM Storage Scale Container Storage Interface driverstorageClass:Field name Description volBackendFs The name of the file system under which the fileset should be created. When a file system that is owned by a different cluster, the file system name is the name of the remotely mounted file system on the primary cluster.
existingVolume (must be used for static PV) The valid option is yes. This parameter is used to identify that the provisioned volume is a static volume.
filesetType The valid options are independent and dependent. The default value is independent. parentFileset Parent fileset name. Valid with filesetType=dependent. The default value is root. Note: Static provisioning in a dynamic way does not support the following features:- Consistency group
- ReadOnlyMany
- Apply the following configuration:
kubectl apply -f storageclass.yaml - Modify the following PVC manifest for the
name,storage, andstorageClassNamevalues according to your requirement:# cat pvc.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: scale-fset-pvc spec: accessModes: - ReadWriteMany resources: requests: storage: 1Gi storageClassName: [name_of_your_storageclass]Restriction: The PVC name must match the fileset name of the existing data that will be used for the mount. - Create a PVC with the modified manifest by issuing the following
command.
kubectl apply -f pvc.yaml
Limitation
When multiple PVCs and PVs are created from the same fileset, any PVC can trigger the expansion of the fileset. The other PVCs retain their originally requested sizes. However, they can still consume storage beyond their allocated size up to the total capacity of the expanded fileset. Because any PVC can increase the fileset size.