Skip to content

StorageClass Examples

Ready-to-use StorageClass configurations for common deployment patterns. All examples use the io.meshstor.csi.mesh provisioner.

For all MeshStor StorageClass parameters — types, defaults, minimums, and constraints — see StorageClass Parameters.

The Helm chart ships two of these by default

A chart install creates meshstor-replicated (2 replicas, cluster default) and meshstor-local-storage (1 replica) out of the box. The examples below are the full menu; apply them with kubectl apply -f <file>.yaml when you need geometries beyond the defaults, or provide a custom storageClasses: list in values.yaml to have the chart manage them for you.

512-byte drives need an explicit sectorSize

These examples omit sectorSize, so they use the default "4096". If your NVMe drives report 512-byte logical blocks, add sectorSize: "512" or provisioning fails with "not enough nodes" — see sectorSize.

Two replicas across two nodes. Survives a single node failure.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: mesh-2copy-tcp
provisioner: io.meshstor.csi.mesh
parameters:
  replicaCount: "2"
  stripeWidth: "1"
reclaimPolicy: Delete
allowVolumeExpansion: true

Use for: Most workloads. Databases, application state, logs.

RAID10 (Striped + Replicated)

Two replicas, each striped across two drives. Higher throughput for sequential I/O.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: mesh-raid10
provisioner: io.meshstor.csi.mesh
parameters:
  replicaCount: "2"
  stripeWidth: "2"
reclaimPolicy: Delete
allowVolumeExpansion: false

Use for: High-throughput workloads. Requires 2 nodes (replicaCount) with 2 NVMe drives each (stripeWidth), for 4 partitions total.

Expansion not supported

Volume expansion is not supported when stripeWidth > 1. Set allowVolumeExpansion: false to prevent resize requests. RAID10 expansion is part of the roadmap.

Single Replica (Non-Replicated)

One replica with a placeholder for relocation. No fault tolerance — data is on a single drive.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: mesh-single
provisioner: io.meshstor.csi.mesh
parameters:
  replicaCount: "1"
  stripeWidth: "1"
reclaimPolicy: Delete
allowVolumeExpansion: true

Use for: Ephemeral data, caches, or scratch space where performance matters more than durability.

RAID0 (Striped, Non-Replicated)

One replica striped across multiple drives on the same node. Maximum sequential throughput from local drives, no fault tolerance — losing any of the stripeWidth drives loses the volume.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: mesh-raid0
provisioner: io.meshstor.csi.mesh
parameters:
  replicaCount: "1"
  stripeWidth: "2"
reclaimPolicy: Delete
allowVolumeExpansion: false

Use for: Scratch space and ephemeral workloads that want striped throughput from local drives without paying the replication cost.

Still relocatable, still striped

MeshStor implements replicaCount=1, stripeWidth>1 as MD RAID10 with placeholder mirror slots, not literal RAID0, so the volume can still relocate to another node when the pod reschedules. Throughput is RAID0-like; the relocation story is the single-replica story. Like RAID10, expansion is not supported when stripeWidth > 1.

Aggressive Replacement Timeout

Standard 2-replica replication with a shorter replacement timeout. Missing members are replaced after 2 minutes instead of the default 15 minutes.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: mesh-fast-replace
provisioner: io.meshstor.csi.mesh
parameters:
  replicaCount: "2"
  stripeWidth: "1"
  memberMissingTimeout: "120"
reclaimPolicy: Delete
allowVolumeExpansion: true

Use for: Environments where node failures are permanent (cloud-like disposable nodes) and fast recovery matters more than avoiding unnecessary rebuilds.

Performance is degraded during resync

A shorter timeout means transient blips (a 30-second network glitch, a brief NVMe-oF reconnect) trigger a full resync of a fresh partition instead of the incremental bitmap-driven recovery you'd get when the original member returns. While that resync runs, the array is degraded: application I/O competes with rebuild traffic and reads can no longer load-balance across all replicas. The default 15-minute timeout amortizes transient blips better; this setting trades that amortization for faster recovery from real failures.

What's Next