Dynamic provisioning of Persistent Volume in filesystem
You can create and manage storage classes for dynamic provisioning of workloads.
Storage classes in IBM Storage Scale
There are two versions of storage classes that you can use with IBM Storage Scale. The default version works with all versions of IBM Storage Scale. For storage class examples, see #sf_sds_storage__ex1 and sf_sds_storage.html#sf_sds_storage__ex2. For the storage class to use with IBM Cloud Paks, IBM Storage Scale version (All), see Storage class to use with Cloud Paks.
allowVolumeExpansion=true
in your Storage
Classes. For information about how to set it in a storage class, see the example storage classes in
this topic. For more information about volume expansion in CSI documentation, see https://www.ibm.com/docs/en/storage-scale-csi?topic=driver-volume-expansion.The IBM Storage Fusion detects the version of IBM Storage Scale, and creates storage class for each filesystem.
- Create the following YAML and store it in the location of your choice. Retain this YAML until you create the storage class.
- Run the following command to apply it:
oc apply -f <filename>
- Storage class(version 1)
-
The default version that works with all versions of IBM Storage Scale. Example storage class (version 1) for IBM Storage Scale version (All):
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: ibm-spectrum-scale-csi-fileset-dependent-new provisioner: spectrumscale.csi.ibm.com parameters: volBackendFs: "ibm-spectrum-scale-fs-mcgpfs3-14544310586575975773" filesetType: "dependent" parentFileset: "primary-fileset-ibm-spectrum-scale-fs-mcgpfs3-14544310586575975773-2822920183822285462" reclaimPolicy: Delete allowVolumeExpansion: true
The file set path pattern is
primary-fileset-$FS_CR_NAME-$LocalClusterID
. If the fileset does not exist, then IBM Storage Fusion creates it automatically from remote storage class.For more information about the parameters, see Storage class.
- Storage class(version 2)
-
This second storage class version requires IBM Storage Scale on Storage Cluster. Example storage class(version 2) for IBM Storage Scale version >= 5.1.3:
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: ibm-spectrum-scale-csi-storageclass-version2 provisioner: spectrumscale.csi.ibm.com parameters: version: "2" volBackendFs: "mygpfs" reclaimPolicy: Delete allowVolumeExpansion: true
The optional parameter list depends on the storage class type.
For more information about the additional parameters, see Volume expansion.
Storage classes in Fusion Data Foundation
- Filesystem storage class
ibm-spectrum-fusion-mgmt-sc
andocs-storagecluster-cephfs
- Block storage class
ocs-storagecluster-ceph-rbd
Storage class to use with Cloud Paks
- Storage class to use with Cloud Paks for IBM Storage Scale
- Storage class to use with Cloud Paks for Fusion Data Foundation
- IBM Storage Scale
-
The
ibm-storage-fusion-cp-sc
storage class is the default for use with IBM Cloud Paks, IBM Storage Scale (All). For IBM Cloud Paks, the permissions parameter is set toshared: true
on the storage class.The
ibm-storage-fusion-cp-sc
storage class is available for IBM Storage Fusion:NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE ibm-storage-fusion-cp-sc spectrumscale.csi.ibm.com Delete Immediate true 2d4h
oc get sc ibm-storage-fusion-cp-sc -o yaml
allowVolumeExpansion: true apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: creationTimestamp: "2023-08-06T13:07:55Z" name: ibm-storage-fusion-cp-sc resourceVersion: "4107984" uid: c8be0a2f-e379-4498-9051-ce8d4cde8d93 parameters: shared: "true" version: "2" volBackendFs: ibmspectrum-fs provisioner: spectrumscale.csi.ibm.com reclaimPolicy: Delete volumeBindingMode: Immediate
- Data Foundation
- Fusion Data Foundation defines storage classes for
ReadWriteOnce (RWO) access and ReadWriteMany (RWX) access separately.
During the installation of IBM Cloud Paks, the
--block_storage_class
option must point to block storage class that supports ReadWriteOnce (RWO) access, which isocs-storagecluster-ceph-rbd
. The--file_storage_class
option must point to a file storage class that supports ReadWriteMany (RWX) access, which isocs-storagecluster-cephfs
.