Volumes: console walkthrough¶
The same operations as the step-by-step guide, done in the console.
List¶
WebHosting > Storage > Volumes lists the persistent volume claims in the selected project.
Read the Status column: Bound means a disk is attached to the claim. A claim sitting
at Pending has not been given one yet - open it and read the events at the bottom, which
name the reason.
Unlike the other pages in this section, Volumes is the console's own storage page rather than one this platform adds, so it offers the full set of actions rather than a guided subset.
Create¶
Create PersistentVolumeClaim opens the console's form.
- Storage class - decides what kind of disk you get. See Choose a storage class for which to pick; the short version is a block class for one workload, a file class for several.
- Name - how workloads in the project refer to it.
- Access mode -
ReadWriteOncefor one workload,ReadWriteManyfor several. The options offered depend on the storage class. - Size - can be grown later, never shrunk.
Access mode is the decision to get right
A ReadWriteOnce volume can be mounted by one pod at a time. Give one to a Deployment
with two replicas and the second pod stays Pending indefinitely, with an event saying
the volume is attached elsewhere. If more than one pod needs the same data, choose a
file storage class and ReadWriteMany at creation - it cannot be changed afterwards.
Change¶
Open the claim and use Actions > Expand PVC to grow it. The new size takes effect when the pod next starts, or immediately if the storage class supports expanding a mounted volume.
Shrinking is not possible, and neither the storage class nor the access mode can be changed after creation.
Delete¶
Use Actions > Delete PersistentVolumeClaim on the claim, or the kebab menu in the list.
This usually destroys the data
The storage classes on this platform are set to delete the disk with the claim. There is no undo and no snapshot taken on your behalf.
A claim mounted by a running pod stays Terminating until that pod is gone. Scale the
workload down rather than forcing the deletion - the protection is what stops a running
application losing its disk underneath it.
Where the console differs from the CLI¶
| Console | oc |
|
|---|---|---|
| Access modes offered | Filtered to what the class supports | You can request one it cannot provide |
| Expanding | Actions > Expand PVC | oc patch the storage request |
| Why a claim is Pending | Events shown on the claim page | oc describe pvc |
| Reclaim policy | Not shown | Read it off the storage class |