-
Notifications
You must be signed in to change notification settings - Fork 59
Feature Request: Enable LINSTOR Storage Pools Using Kubernetes PersistentVolumeClaims as Backing Storage #211
Description
Overview
This feature request proposes extending the LinstorSatelliteConfiguration CRD to support using Kubernetes PersistentVolumeClaims (PVCs) as backing storage for LINSTOR storage pools. This would enable LINSTOR to leverage cloud provider storage through standard Kubernetes abstractions.
Use Case
Organizations want to combine LINSTOR/DRBD's advanced features with cloud provider managed storage. By using PVCs as backing storage, users can:
- Leverage existing cloud provider storage classes (OCI Block Volumes, AWS EBS, Azure Disks, GCP Persistent Disks)
- Maintain a clean separation between infrastructure provisioning and storage management
- Use Kubernetes-native constructs for the entire storage stack
Proposed Architecture
Application Pod
↓
[DRBD Volume via LINSTOR CSI]
↓
[LINSTOR Storage Pool]
↓
[Mounted PVC path on node]
↓
[PersistentVolumeClaim]
↓
[PersistentVolume (e.g., iSCSI from cloud provider)]
↓
[Cloud Provider Storage Service]
Proposed Configuration Enhancement
Extend the LinstorSatelliteConfiguration to support PVC-backed pools:
apiVersion: piraeus.io/v1
kind: LinstorSatelliteConfiguration
metadata:
name: storage-satellites
spec:
storagePools:
# Existing pool types remain unchanged
- name: vg1
lvmPool: {}
# New: LVM pool backed by PVCs
- name: cloud-backed-lvm
lvmPool:
volumeGroup: vg-cloud
source:
persistentVolumeClaims:
- name: backing-pvc-1
namespace: linstor-system
mountPath: /mnt/cloud-storage-1
- name: backing-pvc-2
namespace: linstor-system
mountPath: /mnt/cloud-storage-2
# New: File pool backed by PVC
- name: cloud-backed-file
filePool:
directory: /mnt/cloud-file-storage
source:
persistentVolumeClaim:
name: file-backing-pvc
namespace: linstor-system
mountPath: /mnt/cloud-file-storage
# New: ZFS pool backed by PVCs
- name: cloud-backed-zfs
zfsPool:
zPool: cloud-zfs
source:
persistentVolumeClaims:
- name: zfs-backing-pvc-1
namespace: linstor-system
devicePath: /dev/disk/by-id/cloud-pvc-1Supporting Kubernetes Resources
Users would create PVCs using their cloud provider's storage class:
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: backing-pvc-1
namespace: linstor-system
spec:
accessModes:
- ReadWriteOnce
storageClassName: oci-bv-standard # Or any cloud provider storage class
resources:
requests:
storage: 100Gi
volumeMode: Block # For LVM/ZFS pools
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: file-backing-pvc
namespace: linstor-system
spec:
accessModes:
- ReadWriteOnce
storageClassName: oci-bv-standard
resources:
requests:
storage: 200Gi
volumeMode: Filesystem # For file-based poolsImplementation Requirements
-
PVC Management:
- LINSTOR operator should manage the lifecycle of PVCs used as backing storage
- Ensure PVCs are bound and available before creating storage pools
- Handle PVC mounting on appropriate satellite nodes
-
Node Affinity:
- Respect PVC node affinity constraints
- Ensure LINSTOR satellites run on nodes where PVCs can be attached
-
Device Discovery:
- Automatically discover block devices for
volumeMode: BlockPVCs - Handle device path mapping for cloud provider volumes
- Automatically discover block devices for
-
Dynamic Provisioning:
- Support automatic PVC creation based on pool requirements
- Allow scaling by adding new PVCs to existing pools
Benefits
- Cloud-Native Integration: Uses standard Kubernetes abstractions
- Flexibility: Mix local and cloud storage in the same cluster
- Portability: Works across any cloud provider with CSI support
- Management: Leverage existing Kubernetes tooling for storage management
- Cost Control: Use different storage tiers for different pools
Example Use Cases
-
Hybrid Storage:
- Performance-critical data on local NVMe (existing pools)
- Less frequently accessed data on cloud-backed pools
-
Disaster Recovery:
- Primary pools on local storage
- DR pools backed by cloud storage with provider-level replication
-
Development/Testing:
- Dynamically provision ephemeral environments using cloud storage
- Easy cleanup by deleting PVCs
This enhancement would make LINSTOR more versatile in cloud-native environments while maintaining its powerful feature set for distributed storage management.