Configuring Physical Volumes (PV)
As we mentioned previously, OpenShift cluster administrators can create PV resources for future usage by OpenShift users.
Note
This topic assumes that the OpenShift environment is up and running on the openshift.example.com
node. You may use oc cluster up
or do an advanced OpenShift installation by using Ansible.
As we mentioned previously, only cluster administrators can configure PVs. So, before you begin the following labs, you have to switch to the admin account:
# oc login -u system:admin
We recommend creating a new project to perform this persistent storage
-related lab:
# oc new-project persistent-storage
Note
The client will automatically change the current project to the newly created one.
In the upcoming examples, we will create the following PVs:
PV | Storage backend | Size |
| NFS | 2 GiB |
| GlusterFS | 3 GiB |
| iSCSI | 1 GiB |
Creating PVs for NFS shares
The NFS-related PersistentVolume
resource that was created by the OpenShift API can be defined using...