Home > Workload Solutions > Container Platforms > Red Hat OpenShift Container Platform > Archive > Deployment Guide—Red Hat OpenShift Container Platform 4.2 > Creating a PV using iSCSI LUN
To create a PV:
targetcli
targetcli shell version 2.1.fb49
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.
/> ls /iscsi
o- iscsi ................................................................................................................ [Targets: 1]
o- iqn.2003-01.org.linux-iscsi.nfs.x8664:sn.aa06c8c9ac41 ............. [TPGs: 1]
apiVersion: v1
kind: PersistentVolume
metadata:
name: <iscsi pv name>
spec:
capacity:
storage: <capacity>
accessModes:
- ReadWriteOnce
iscsi:
targetPortal: <ip address of iscsi server>:3260
iqn: <target iqn of the iscsi server>
lun: 0
fsType: <file system type>
readOnly: false
oc apply -f iscsipv.yaml
oc get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
iscsipv 10Gi RWO Retain Available