Dynamic provisioning of Persistent Volume in filesystem

You can create and manage storage classes for dynamic provisioning of workloads.

There are two versions of storage classes that you can use with IBM Spectrum Scale. The default version works with all versions of IBM Spectrum Scale while the second version requires IBM Spectrum Scale on Storage Cluster.

Note: For IBM Storage Scale Container Storage Interface Driver volume expansion function, include 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/spectrum-scale-csi?topic=driver-volume-expansion.
The IBM Storage Fusion detects the version of IBM Spectrum Scale.
Note: IBM Storage Fusion creates storage class for each filesystem.
  1. Create the following YAML and store it in the location of your choice. Retain this YAML until you create the storage class.
    Storage Class(version 2) for Spectrum 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 is dependent on the storage class type.

    For more information about the additional parameters, see https://www.ibm.com/docs/en/spectrum-scale-csi?topic=driver-volume-expansion.

    Example storage class(version 1) for IBM Spectrum 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 https://www.ibm.com/docs/en/spectrum-scale-csi?topic=driver-storage-class.

    The ibm-storage-fusion-cp-sc storage class is the default for use with IBM Cloud Paks, IBM Spectrum Scale (All). For IBM Cloud Paks, the permissions parameter is set to shared: true on the storage class.

    The ibm-storage-fusion-cp-sc storage class is available from IBM Storage Fusion HCI System 2.6.1 or higher:

    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
    
    Note: For supported IBM Cloud Paks versions, see IBM Cloud Paks support for IBM Storage Fusion.

    Example of a storage class compatible with IBM Storage Fusion deployed on Amazon Web Services ROSA:

    kind: StorageClass
    apiVersion: storage.k8s.io/v1
    metadata:
      name: gp3-immediate
    provisioner: ebs.csi.aws.com
    parameters:
      encrypted: 'true'
      type: gp3
    reclaimPolicy: Delete
    allowVolumeExpansion: true
    volumeBindingMode: Immediate
    Note: Ensure that you have a CSI compliant provisioner, such as ebs.csi.aws.com, and the volumeBindingMode is set to Immediate.
    Example of a storage class compatible with IBM Storage Fusion deployed on Microsoft Azure ARO:
    kind: StorageClass
    apiVersion: storage.k8s.io/v1
    metadata:
      name: managed-csi-immediate
    provisioner: disk.csi.azure.com
    parameters:
      skuname: Premium_LRS
    reclaimPolicy: Delete
    allowVolumeExpansion: true
    volumeBindingMode: Immediate
    Note: Ensure that you have a CSI compliant provisioner, such as disk.csi.azure.com, and the volumeBindingMode is set to Immediate.
  2. Run the following command to apply it:
    oc apply -f <filename>