Raspberry Pi k3s fleet — Longhorn storage configuration sequence¶
Parent runbook: How to provision k3s, Longhorn, and Rancher on a Raspberry Pi fleet. Capture: Longhorn CSI on K3s.
Preconditions (mandatory)¶
- Working k3s cluster with all nodes
Ready(Bootstrap sequence). open-iscsiandiscsiadmon every node that will host Longhorn replicas or components required by the docs.- Disks prepared per your layout (raw device, partition, or LVM LV)—follow current Longhorn documentation for disk selection and tags.
Mandatory — operator sequence (outline)¶
Exact commands change by Longhorn version—use the upstream install guide (Helm or manifest) you select.
- Install Longhorn manager, engine, and CSI driver per Longhorn-on-K3s instructions; confirm CRDs exist (
kubectl get crd | grep longhorn). - Confirm nodes and disks appear schedulable in the Longhorn UI or via
kubectl; fix unschedulable reasons before production PVCs. - Decide default StorageClass policy deliberately:
- P0: Often acceptable to leave Longhorn non-default until replica cost is understood.
- P1+: Mark default only after accepting replica CPU and IO overhead on Pis.
- Create a test PVC and Pod that write and read data; delete and recreate to validate binding.
Mandatory — resource realism on Raspberry Pi¶
| Knob | Guidance |
|---|---|
| Replica count | Three replicas means write amplification and CPU load on small ARM cores—prefer fewer replicas for non-critical PVCs in P1. |
| Over-provisioning | Disable or tighten if you see OOM during volume rebuilds. |
| Replicas on server node | Some operators taint or exclude the etcd node from storage—validate against your HA plan (Hardware BOM). |
Optional (HA / scale)¶
- Backup target to S3-compatible or NFS storage—only after base volumes work (
Backup and restore sequence). - Recurring snapshot/backup jobs: watch CPU during scheduled hours; prefer stable utility power on off-grid sites.
Health flow (reference)¶
mermaid
flowchart TD
I[Install Longhorn] --> D[Disks schedulable]
D --> T[Test PVC]
T --> P{P1+?}
P -->|yes| B[Backup target + policies]
P -->|no| OK[P0 complete]
B --> OK2[P1 storage ready]