Home > Workload Solutions > Container Platforms > Red Hat OpenShift Container Platform > Archive > Deployment Guide—Integrating Dell VxFlex Systems with Red Hat OpenShift Clusters > Creating a persistent volume claim
A persistent volume (PV) is a logical volume handle in the OpenShift cluster. A PV defines access to a storage resource that can be used to store persistent data. When you want to dynamically provision storage, you can create a persistent volume claim (PVC) against a predefined PV, which creates a supporting PV. Create a PVC for persistent storage or dynamic storage depending on your requirements.
To create the volume:
scli --add_volume –size_gb <size> –volume_name <vol name> --protection_domain_name <PD Name> --storage_pool_name <SP Name> --thin_provisioned
kind: PersistentVolume
apiVersion: v1
metadata:
name: scaleio-persistent-volume
namespace: scaleio-ocp-integration
spec:
capacity:
storage: 16Gi
scaleIO:
gateway: 'https://192.168.20.19:443/api'
secretRef:
name: scaleio-secret
namespace: scaleio-ocp-integration
system: scaleio
protectionDomain: default
storagePool: default
volumeName: scaleio-vol-pv
fsType: xfs
accessModes:
- ReadWriteOnce
claimRef:
kind: PersistentVolumeClaim
namespace: scaleio-ocp-integration
name: scaleio-persistent-claim
storageClassName: scaleio-storageclass
oc create -f scaleio-pv.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: scaleio-persistent-claim
namespace: scaleio-ocp-integration
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 16G
storageClassName: scaleio-storageclass
oc create -f scaleio-pvc.yaml
To create dynamic storage without creating an image pool or PV:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: scaleio-persistent-claim
namespace: scaleio-ocp-integration
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 16G
storageClassName: scaleio-storageclass
oc create -f scaleio-pvc.yaml