StorageClass Parameters¶
All MeshStor StorageClass parameters, their types, defaults, and constraints. Parameters are set in the parameters field of a Kubernetes StorageClass resource.
Provisioner¶
Parameters¶
| Parameter | Type | Default | Minimum | Description |
|---|---|---|---|---|
replicaCount |
string (integer) | "2" |
"1" |
Number of data replicas. Each replica is placed on a different node. Higher values increase fault tolerance and storage overhead. |
stripeWidth |
string (integer) | "1" |
"1" |
Stripe width — number of drives a single replica is striped across. Value 1 create RAID1, values >1 create RAID10 (Stripe of mirrors). Minimum node count is still replicaCount; each of those nodes must have at least stripeWidth NVMe drives available. |
memberMissingTimeout |
string (integer, seconds) | "900" |
"60" |
How long to wait before replacing a missing RAID member. Lower values recover faster but may trigger unnecessary rebuilds during transient failures. |
sectorSize |
string (integer, bytes) | "4096" |
— | Logical block size every RAID member must report. Allowed values: "512" or "4096". Immutable after creation — an MD array's logical block size cannot change once data exists. All members of a volume share this size, so the volume is placed only on nodes whose NVMe drives report it (see warning below). |
String values
All parameters are strings in the Kubernetes StorageClass API. MeshStor parses them internally. Invalid values (non-numeric, below minimum, or outside the allowed set) return an InvalidArgument error on volume creation.
Sector size must match your drives
The default sectorSize is "4096". A volume is placed only on nodes that have at least replicaCount drives whose logical block size equals sectorSize; otherwise CreateVolume fails with FailedPrecondition ("not enough nodes"). On clusters whose NVMe drives report 512-byte logical blocks, set sectorSize: "512". Check a drive's reported size with cat /sys/block/<device>/queue/logical_block_size, or the SectorSize column of kubectl get msnd. This constraint prevents a mixed-block-size array, which the kernel would otherwise leave with a stranded, non-rebuilding member.
StorageClass Fields¶
These standard Kubernetes StorageClass fields are relevant to MeshStor:
| Field | Recommended Value | Notes |
|---|---|---|
reclaimPolicy |
Delete |
Retain is supported but leaves orphaned partitions on drives |
allowVolumeExpansion |
true |
Set to false when stripeWidth > 1 (expansion not supported for RAID10) — see Volume Expansion |
volumeBindingMode |
WaitForFirstConsumer |
Immediate also works. WaitForFirstConsumer defers CreateVolume until a pod is scheduled, which avoids zombie PVs from PVCs that are never claimed. The driver doesn't consume CSI topology hints today, so the topology-aware benefit of WaitForFirstConsumer doesn't apply — but the binding-deferral benefit does. |
allowedTopologies |
not strictly enforced today | The scoring algorithm already places partitions on the best available nodes (RDMA support, free space, network latency, subnet pairing). Strict allowedTopologies enforcement is planned — until it ships, use node labels and the meshstor.io/nvme-over-*-address annotations to shape the candidate set. |
Effective RAID Levels¶
replicaCount |
stripeWidth |
RAID Level | Total Partitions | Storage Overhead | Fault Tolerance |
|---|---|---|---|---|---|
1 |
1 |
RAID1 (1+placeholder) | 2 | 1x | Relocatable, no redundancy |
2 |
1 |
RAID1 | 2 | 2x | 1 node failure |
3 |
1 |
RAID1 | 3 | 3x | 2 node failures |
1 |
2 |
RAID0 (2+placeholders) | 4 | 1x | Relocatable, no redundancy |
2 |
2 |
RAID10 | 4 | 2x | 1 node failure |
Example¶
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: mesh-2copy-tcp
provisioner: io.meshstor.csi.mesh
parameters:
replicaCount: "2"
stripeWidth: "1"
memberMissingTimeout: "900"
sectorSize: "4096"
reclaimPolicy: Delete
allowVolumeExpansion: true
See StorageClass Examples for ready-to-use configurations.
What's Next¶
- StorageClass Examples — copy-paste configurations
- Volume Expansion — grow a volume online without downtime
- Project Status — feature support, hard constraints, and roadmap