Installation¶
MeshStor is deployed using standard Kubernetes manifests. The deployment creates a namespace, CRDs, RBAC resources, a controller StatefulSet, and a node DaemonSet.
Before you start: complete the Prerequisites checklist.
Already have MeshStor running? Jump straight to Create Your First Volume below.
Deploy¶
Apply all manifests from the deploy/ directory:
kubectl apply -f https://raw.githubusercontent.com/meshstor/meshstor-csi/main/deploy/namespace.yaml
kubectl apply -f https://raw.githubusercontent.com/meshstor/meshstor-csi/main/deploy/
This creates:
| Resource | Name | Description |
|---|---|---|
| Namespace | meshstor |
All MeshStor components run here |
| CRDs | meshstorvolumes, meshstornodedevices |
Volume and device tracking |
| CSIDriver | io.meshstor.csi.mesh |
Registers MeshStor with Kubernetes |
| ServiceAccounts | meshstor-csi-controller, meshstor-csi-node |
Identity for controller and node pods |
| ClusterRoles | meshstor-csi-controller, meshstor-csi-node |
Permissions for CRs, nodes, PVCs, events |
| StatefulSet | meshstor-csi-controller |
Controller (1 replica) |
| DaemonSet | meshstor-csi-node |
Node plugin (every node) |
Verify the Deployment¶
Check that all pods are running:
NAME READY STATUS RESTARTS AGE
meshstor-csi-controller-0 4/4 Running 0 30s
meshstor-csi-node-abc12 3/3 Running 0 30s
meshstor-csi-node-def34 3/3 Running 0 30s
Verify the CSI driver is registered:
NAME ATTACHREQUIRED PODINFOONMOUNT STORAGECAPACITY TOKENREQUESTS REQUIRESREPUBLISH MODES AGE
io.meshstor.csi.mesh false false false <unset> false <unset> 30s
Verify device discovery (each node reports its NVMe drives):
NAME NODE DEVICE MODEL SIZE FREE VOLS AGE
node1-nvme0n1 node1 nvme0n1 Samsung 990 PRO 1.0TB 1.0TB 0 30s
node2-nvme0n1 node2 nvme0n1 Samsung 990 PRO 1.0TB 1.0TB 0 30s
No devices listed
If kubectl get msnd returns no resources, check that:
- NVMe drives are present on the nodes (
lsblk -d | grep nvme) - The node pods are running and not crash-looping (
kubectl -n meshstor logs daemonset/meshstor-csi-node -c csi-plugin) - Drive selection labels are correct if set (see Prerequisites)
Create Your First Volume¶
Create a replicated volume and verify it works end-to-end.
1. StorageClass¶
kubectl apply -f - <<'EOF'
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: mesh-2copy-tcp
provisioner: io.meshstor.csi.mesh
parameters:
numberOfCopies: "2"
drivesPerCopy: "1"
reclaimPolicy: Delete
allowVolumeExpansion: true
EOF
2. PersistentVolumeClaim¶
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-first-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: mesh-2copy-tcp
volumeMode: Filesystem
EOF
3. Workload¶
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: Pod
metadata:
name: writer
spec:
containers:
- name: writer
image: busybox
command: ["sh", "-c", "while true; do date >> /data/log.txt; sleep 5; done"]
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: my-first-volume
EOF
4. Verify the Volume¶
Check that the PVC is bound:
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
my-first-volume Bound pvc-abc123.. 1Gi RWO mesh-2copy-tcp 30s
Check the volume status — it should reach Synced with 2 active devices:
Check the partitions are on different nodes:
kubectl get msvol pvc-abc123.. -o jsonpath='{range .status.partitions[*]}{.nodeID} {.state}{"\n"}{end}'
Verify the workload is writing data:
Clean Up the Test Volume¶
kubectl delete pod writer
kubectl delete pvc my-first-volume
kubectl delete storageclass mesh-2copy-tcp
Uninstall MeshStor¶
To remove MeshStor and all its resources:
Data loss
Uninstalling MeshStor removes all CRDs, which deletes all MeshStorVolume and MeshStorNodeDevice custom resources. Volumes will become inaccessible. Ensure all PVCs are deleted and data is backed up before uninstalling.
What's Next¶
- StorageClass Examples — configurations for different workloads
- Replication — understand RAID levels and fault tolerance
- Monitoring — track volume health in production