Raw block devices in OpenShift vSphere
Summary and Key concepts
Summary
This article explains how to use Portworx CSI Driver for creating and managing raw block devices in Kubernetes or OpenShift environments. It highlights support for both file and block volume types and describes how to create a PersistentVolumeClaim (PVC) with block volume mode for applications that require raw block devices. The article walks through creating a PersistentVolumeClaim
and deployment YAML configurations for using raw block storage with a Kubernetes deployment. Specific instructions for applying these configurations differ slightly based on the environment, whether using kubectl
or oc
for OpenShift.
Kubernetes Concepts
- PersistentVolumeClaim (PVC): A request for storage by a user.
- VolumeMode: By setting a Block mode in PVCs allows raw block devices to be requested instead of file-based volumes.
- StorageClass: Defines the class of storage to be used for PVCs.
- Deployment: A Kubernetes object that manages a replicated application, updating and scaling based on specifications.
- VolumeDevices: Used to mount raw block devices inside containers.
Portworx Concepts
- Portworx CSI Driver: Implements the CSI specification to expose Portworx storage as file or block volumes in Kubernetes.
- CSI Enabled Storage Classes: Preconfigured storage classes for CSI in Portworx.
The Portworx CSI Driver supports both File and Block volume types in OpenShift cluster PVCs. While file has more supported features, block support for ReadWriteOnly
PVCs was added in Portworx Enterprise in version 2.8.0.