Dynamic provisioning

Last published : Aug 25, 2026
You can dynamically provision a volume over shared storage (CVM) and shared nothing (FSS) storage. In dynamic provisioning, you must create a Storage Class that define the storage provisioner and the required parameters in the storage class yaml file and create the Persistent Volume Claim. The Pod references the Storage Class through an existing Persistent Volume Claim and dynamically allocates storage for the requesting Pod.
While allocating storage to pods dynamically, you can reclaim the storage when the previously provisioned storage is available for other applications to use. You can resize an existing volume using the Persistent Volume Claim (PVC) object.
Perform the following steps for allocating storage dynamically to container workloads:
  1. Create a Storage Class using a yaml file.
    oc create -f csi-infoscale-sc.yaml
    1. Define the Persistent Volume Claim and specify the appropriate Storage Class, access mode, and the required storage size.
    csi-dynamic-pvc.yaml
    ---
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      name: csi-infoscale-pvc
    spec:
      storageClassName: csi-infoscale-sc
      accessModes:
        -  ReadWriteMany

      resources:
        requests:
          storage: 5Gi
  2. Create a Persistent Volume Claim using the yaml.
    oc create -f csi-dynamic-pvc.yaml
    1. Update csi-mysql-app.yaml and specify the Persistent Volume Claim name.
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: mysql-deployment
      labels:
        app: mysql
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: mysql
      template:
        metadata:
          labels:
            app: mysql
        spec:
          containers:
            -  name: mysql
              image: mysql:latest
              ports:
                -  containerPort: 3306
              volumeMounts:
                -  mountPath: "/var/lib/mysql"
                  name: mysql-data
              env:
                -  name: MYSQL_ROOT_PASSWORD
                  value: root123
          volumes:
            -  name: mysql-data
              persistentVolumeClaim:
                claimName: csi-infoscale-pvc
  3. Create the application pod.
    oc create -f csi-mysql-app.yaml
    After the pod is created, start using the InfoScale PVC as a Persistent Storage.
    Enabling raw block volume support with dynamic provisioning
    1. Ensure that volumeMode is Block in as under in csi-dynamic-block-pvc.yaml.
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      name: csi-infoscale-block-pvc
    spec:
      volumeMode: Block
      storageClassName: csi-infoscale-sc
      accessModes:
        -  ReadWriteMany
      resources:
        requests:
          storage: 4Gi
  4. Run the following command to set Block as the VolumeMode oc apply -f csi-dynamic-block-pvc.yaml
Ensure that you resize the file system and drain I/O's from the file system under snapshots and clones for crash consistent snapshots.
After enabling raw block volume support, applications can write to the block device or create filesystem at the block level. Online resizing of block without detaching the block storage is supported. However, Resizing can be to a higher value only.