k8s storage (CSI)

6 months ago by eutampieri to c/selfhosted

I’m looking for storage classes for a multi node cluster. I’m currently using Longhorn and NFS, but I'm not happy with the performance. My cluster doesn’t have beefy nodes, so Ceph/Rook is out of the question (for now).

Nodes:

  1. 8 GB RAM, 4 cores VM, control plane. 256 GB SSD
  2. 4 GB RAM, 2 cores, control plane, currently cordoned. 128 GB SSD
  3. 8 GB RAM, 4 cores, ARM, control plane. 512 GB SSD
  4. 8 GB RAM, 4 cores. 256 GB SSD
  5. 16 GB RAM, 6 cores. 256 GB SSD + 1 TB HD
  6. RPi 4, 4 GB RAM. 128 GB SSD
supersheep 4 points 6 months ago path: 0 22151506, hotness: undefined, score: 4, children: 7
eutampieri 2 points 6 months ago

Found a Reddit thread that says that LINSTOR has a lower CPU usage (which is my main gripe with Longhorn). Might as well try this and report back. Is there a good way to migrate PVs and PVCs?

path: 0 22151506 22151688, hotness: undefined, score: 2, children: 6
F04118F 2 points 6 months ago

Volsync

path: 0 22151506 22151688 22154626, hotness: undefined, score: 2, children: 1
eutampieri 1 point 6 months ago

Thanks!

path: 0 22151506 22151688 22154626 22161460, hotness: undefined, score: 1, children: 0
supersheep 2 points 6 months ago

I can confirm that the resource usage is quite low indeed. I only used it with Nomad instead of Kubernetes, so I can’t comment on how to best migrate PVs and PVCs.

path: 0 22151506 22151688 22151923, hotness: undefined, score: 2, children: 1
eutampieri 2 points 6 months ago

Thanks

path: 0 22151506 22151688 22151923 22152224, hotness: undefined, score: 2, children: 0
nebula 1 point 6 months ago

It's great, I spent 2 years finding perfect CSI for homelab and landed on Piraeus. The best part is you get full read performance of your local disk so I didn't have to use 10G, write are limited by network link between nodes. But that hasn't been a problem for me. Also, they're super responsive for any issues/bugs you hit.

Let me know if you have any specific questions about this.

path: 0 22151506 22151688 22173715, hotness: undefined, score: 1, children: 1
eutampieri 1 point 6 months ago

Thanks, I will!

path: 0 22151506 22151688 22173715 22177394, hotness: undefined, score: 1, children: 0
moonpiedumplings 3 points 6 months ago

Openebs mayastor

But you could fit ceph on that I think. As long as your network between nodes is fast enough.

path: 0 22151557, hotness: undefined, score: 3, children: 2
silenium_dev 3 points 6 months ago

Mayastor or Linstor, Ceph requires too much CPU for these nodes

path: 0 22151557 22152232, hotness: undefined, score: 3, children: 0
eutampieri 2 points 6 months ago

I used to use Ceph at work and I'm a bit reluctant to use it at home. Don’t get me wrong, it’s really cool, but those were beefy nodes, and I only have 1 Gbps between nodes

path: 0 22151557 22151614, hotness: undefined, score: 2, children: 0
Decronym 3 points 6 months ago

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
NFS Network File System, a Unix-based file-sharing protocol known for performance and efficiency
SSD Solid State Drive mass storage
k8s Kubernetes container management package

[Thread #95 for this comm, first seen 15th Feb 2026, 11:20] [FAQ] [Full list] [Contact] [Source code]

path: 0 22152922, hotness: undefined, score: 3, children: 1
surewhynotlem 1 point 5 months ago

Gotta add CSI to that

path: 0 22152922 22879340, hotness: undefined, score: 1, children: 0
custard_swollower 3 points 6 months ago

I’m not sure you’ll get nice performance in local network with small appliances (consumer network hardware, mini PCs and rpi 4). I’ve never got sub-ms network disk access on 1Gbps switch and router. In the end I’ve done the opposite - I’ve added one k8s host with a lot of storage, and any storage services are deployed there. All the other k8s services rely on local SSDs.

path: 0 22152899, hotness: undefined, score: 3, children: 1
eutampieri 1 point 6 months ago

Which CSI?

path: 0 22152899 22161447, hotness: undefined, score: 1, children: 0
h3ron 2 points 6 months ago

I have two storage nodes and one is much faster than the other.

I'm currently evaluating a juicefs deployment based on two minio instances (one per node, replicated with async bucket replication) through a load balancer (sidekick) in failover. Because juicefs also needs a db for metadata, I went with valkey + sentinel.

Juicefs provides a CSI driver that supports ReadWriteMany volumes and CSI snapshots and manages both read and write cache. Performance is much much better than Ceph. In theory it should be riskier (because of the async replication) but in practice I haven't yet lost a bit.

path: 0 22155735, hotness: undefined, score: 2, children: 2
eutampieri 1 point 6 months ago

Thanks! A bit more involved that I’d have thought but still worth considering! Could you update us after your evaluation?

path: 0 22155735 22161442, hotness: undefined, score: 1, children: 1
h3ron 2 points 6 months ago

Well actually it is very easy to spin up in docker and most of the configuration happens through env variables.

juicefs itself only exists on the client side, so you basically only have to install and configure the CSI driver with helm.

as it took me a few days to come up with this solution I'd be happy to share my config files.

Performance wise is quite fast on sequential reads (it saturates my 2.5G bandwidth) and slower than I expected on sequential writes (for me it caps at 60MB/s). Postgresql seems happy. I saw no visible performance degradation with Authentic, Immich and Opencloud. Nextcloud installation took ages. I've yet to try it with jellyfish and the *arr suite.

A simple NFS share would be faster, but it doesn't support replication, failover and CSI snapshots.

path: 0 22155735 22161442 22172013, hotness: undefined, score: 2, children: 0
performation 1 point 6 months ago

I started setting up longhorn today. My hardware is a little it beefier, but I still am curious: what performance problems did you run into exactly?

path: 0 22216429, hotness: undefined, score: 1, children: 3
eutampieri 1 point 6 months ago

My greatest problem is that the CPU load is too high and I ran into an issue with iSCSI that would occasionally peg one core to 100%. It would also make nodes NotReady when too many PVs were scheduled

path: 0 22216429 22224866, hotness: undefined, score: 1, children: 2
performation 1 point 6 months ago

What CPUs are you running exactly? I was under the assumption my greatest bottleneck would be an 1Gbps LAN

path: 0 22216429 22224866 22243720, hotness: undefined, score: 1, children: 1
eutampieri 1 point 6 months ago

Just don’t go below 4 cores of x86 and you’ll be fine

path: 0 22216429 22224866 22243720 22244128, hotness: undefined, score: 1, children: 0
eutampieri 1 point 6 months ago path: 0 22151512, hotness: undefined, score: 1, children: 2
jonathan 2 points 6 months ago

I'd expect the performance to be awful but it still has relatively niche usecases, especially where performance isn't a concern. I'm imagining legacy apps that don't speak S3.

path: 0 22151512 22152577, hotness: undefined, score: 2, children: 1
eutampieri 1 point 6 months ago

Thanks for the feedback! So not what I’m looking for

path: 0 22151512 22152577 22161470, hotness: undefined, score: 1, children: 0
selfhosted
selfhosted

@lemmy.world

login for more options
61555
6650
5623

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

go to feed...