Essential OpenShift Storage Concepts Explained

OpenShift (OCP) Storage Deep Dive

Storage is one of the most important OpenShift interview topics because many production issues involve:

  • Persistent Volumes (PV)
  • Persistent Volume Claims (PVC)
  • Storage Classes
  • CSI Drivers
  • OpenShift Data Foundation (ODF)
  • Performance and Disaster Recovery

OpenShift Storage Architecture

Application Pod
|
v
PVC
|
v
PV
|
v
Storage Class
|
v
CSI Driver
|
v
Storage Backend

Core Storage Components

Persistent Volume (PV)

A storage resource in the cluster.

Example:

kind: PersistentVolume

Think of it as:

A disk made available to Kubernetes/OpenShift.


Persistent Volume Claim (PVC)

A request for storage.

Example:

kind: PersistentVolumeClaim

Developers request:

storage: 100Gi

Kubernetes finds matching storage.


Storage Class

Defines how storage is provisioned.

Examples:

  • Azure Managed Disk
  • AWS EBS
  • GCP Persistent Disk
  • Ceph RBD
  • NFS
  • NetApp

Example:

storageClassName: ocs-storagecluster-ceph-rbd

Dynamic Provisioning

Old approach:

Storage Admin
|
Create Disk
|
Create PV
|
Developer Uses PVC

Modern approach:

PVC Created
|
StorageClass
|
CSI Driver
|
Disk Automatically Created

Almost all production OpenShift environments use dynamic provisioning.


CSI Drivers

CSI = Container Storage Interface

CSI is the standard way Kubernetes talks to storage.

Examples:

PlatformCSI Driver
AzureAzure Disk CSI
AWSEBS CSI
GCPPD CSI
VMwarevSphere CSI
CephCeph CSI
NetAppTrident CSI

Access Modes

Very common interview question.

ReadWriteOnce (RWO)
One Node
Read + Write

Typical for:

  • Databases
  • Azure Disk
  • EBS

ReadOnlyMany (ROX)
Many Nodes
Read Only

ReadWriteMany (RWX)
Many Nodes
Read + Write

Typical for:

  • NFS
  • CephFS
  • NetApp

Which Access Mode for Databases?

Usually:

ReadWriteOnce

Example:

  • PostgreSQL
  • MySQL
  • Oracle

OpenShift Data Foundation (ODF)

Most important OpenShift storage platform.

OpenShift Data Foundation

Based on:

Ceph

Provides:

  • Block Storage
  • File Storage
  • Object Storage

ODF Architecture

Applications
|
v
PVC
|
v
Ceph Storage Cluster
|
+-----+-----+
| |
MON OSD
| |
MDS RGW

Ceph Components

MON (Monitor)

Maintains cluster state.

Usually:

3 or 5 MONs

OSD (Object Storage Daemon)

Stores actual data.

Most critical storage component.

Example:

12 OSDs

MDS

Metadata Server.

Used by:

CephFS

RGW

RADOS Gateway.

Provides:

S3-Compatible Storage

ODF Storage Types

Block Storage

Ceph RBD

Used for:

  • Databases
  • Stateful applications

Access Mode:

RWO

File Storage

CephFS

Used for:

  • Shared storage
  • RWX workloads

Access Mode:

RWX

Object Storage

S3 API

Used for:

  • Backups
  • AI workloads
  • Data lakes

Cloud Storage in OpenShift

Azure

Storage classes:

  • Azure Disk
  • Azure Files
TypeAccess Mode
Azure DiskRWO
Azure FilesRWX

AWS

Storage classes:

  • EBS
  • EFS
TypeAccess Mode
EBSRWO
EFSRWX

GCP

Storage classes:

  • Persistent Disk
  • Filestore

Storage Performance

For enterprise workloads:

Monitor:

IOPS

Input/output operations per second.

Latency

Target:

<10 ms

For databases:

<5 ms

Storage Monitoring

Monitor:

PVC usage
oc get pvc
Storage Classes
oc get storageclass
ODF
oc get pods -n openshift-storage

Common Storage Problems

PVC Pending

Check:

oc describe pvc

Common causes:

  • Missing StorageClass
  • CSI failure
  • No capacity

Pod Stuck ContainerCreating

Often:

PVC not mounted

Check:

oc describe pod

ODF Degraded

Check:

oc get cephcluster -A

Possible causes:

  • OSD failure
  • Disk failure
  • Network issue

Storage Full

Check:

oc adm top pvc

Or ODF dashboard.

Symptoms:

  • Write failures
  • Database crashes
  • PVC expansion requests

Storage Backup Best Practices

Storage backups should include:

Kubernetes Resources

Using:

OpenShift API for Data Protection

Storage Snapshots

Using:

  • Ceph snapshots
  • Azure Disk snapshots
  • EBS snapshots
Database Backups

Application-consistent backups.

Not just volume snapshots.


Enterprise OpenShift Storage Design

Example for a banking platform:

3 Control Plane Nodes
6 Worker Nodes
ODF Storage Cluster
3 MONs
6-12 OSDs
CephFS for RWX
Ceph RBD for Databases
S3 Object Storage for Backups

Benefits:

  • HA
  • Self-healing
  • Multi-petabyte scalability
  • Disaster recovery support

Interview Questions You Will Likely Get

What is the difference between PV and PVC?

PV = actual storage resource.

PVC = request for storage.


What is a StorageClass?

Defines how storage is dynamically provisioned.


Explain CSI.

Container Storage Interface.

Standard mechanism for Kubernetes/OpenShift to communicate with storage platforms.


What storage would you use for PostgreSQL?

Typically:

  • Ceph RBD
  • Azure Disk
  • AWS EBS

Access mode:

ReadWriteOnce (RWO)

What storage would you use for shared content across multiple pods?

Typically:

  • CephFS
  • Azure Files
  • AWS EFS

Access mode:

ReadWriteMany (RWX)

Architect-Level Interview Answer

“How would you design storage for a production OpenShift platform?”

I would use CSI-based dynamic provisioning and separate storage by workload type.

Databases would use block storage such as Ceph RBD, Azure Disk, or AWS EBS with ReadWriteOnce access.

Shared application content would use CephFS, Azure Files, or EFS with ReadWriteMany access.

For on-premises OpenShift, I would deploy OpenShift Data Foundation backed by Ceph with multiple MON and OSD nodes for high availability.

Object storage would be used for backups, registry content, and analytics workloads. Storage performance, latency, and capacity would be monitored through OpenShift Monitoring and ODF dashboards.

Backup and disaster recovery would combine OADP, storage snapshots, and application-consistent database backups. This design provides scalability, resiliency, and operational simplicity for enterprise workloads.

Leave a Reply