Readit News logoReadit News
dpedu · 5 months ago
Kubernetes CSI drivers are surprisingly easy to write. You basically just have to implement a number of gRPC procedures that manipulate your system's storage as the Kubernetes control plane calls them. I wrote one that uses file-level syncing between hosts using Syncthing to "fake" network volumes.

https://kubernetes-csi.github.io/docs/developing.html

There are 4 gRPCs listed in the overview, that literally is all you need.

cmeacham98 · 5 months ago
I tried longhorn on my homelab cluster. I'll admit it's possible that I did something wrong, but I managed to somehow get it into a state where it seemed my volumes got permanently corrupted. At the very least I couldn't figure out how to get my volumes working again.

When restoring from backup I went with Rook (which is a wrapper on ceph) instead and it's been much more stable, even able to recover (albeit with some manual intervention needed) from a total node hardware failure.

nerdjon · 5 months ago
It is interesting seeing this article come up since just yesterday I setup longhorn in my homelab cluster needing better performance for some tasks than NFS was providing so I setup a raid on my r630 and tried it out.

So far things are running well but I can't shake this fear that I am in for a rude awakening and I loose everything. I backups but the recovery will be painful if I have to do it.

I will have to take a look at rook since I am not quite committed enough yet (only moved over 2 things) to switch.

master_crab · 5 months ago
If the information is truly important push it off to a database or NAS. I use rook at home but really only for long lived app data (config files, etc). Anything truly important (media, files, etc) is served from an NFS attached to the cluster.
cortesoft · 5 months ago
I have a small 4 node home cluster, and longhorn works great... on smaller volumes.

I have a 15TB volume for video storage, and it can't complete any replica rebuilds. It always fails at some point and then tries to restart.

devn0ll · 5 months ago
As an Enterprise user of Rancher, we had long discussions with Suse about Longhorn. And we are not using it.

You need a separate storage lan, a seriously beafy one at to use Longhorn. But even 25Gbit was not enough to keep volumes from being corrupted.

When rebuilds take too long, longhorn fails, crashes, hangs, etc, etc.

We will never make the mistake of using Longhorn again.

coopreme · 5 months ago
Go with Ceph… a little more of a learning curve but overall better.
studmuffin650 · 5 months ago
Where I work, we primarily use Ceph for the a K8s Native Filesystem. Though we still use OpenEBS for block store and are actively watching OpenEBS mayastor
__turbobrew__ · 5 months ago
I looked into mayastor and the NVME-of stuff is interesting, but it is so so so far behind ceph when it comes to stability and features. One ceph has the next generation crimson OSD with seastore I believe it should close a lot of the performance gaps with ceph.
dilyevsky · 5 months ago
> One ceph has the next generation crimson OSD with seastore I believe it should close a lot of the performance gaps with ceph.

only been in development for what like 5 years at this point? =) i have no horse in this race but seems to me openebs will close the gap sooner.

remram · 5 months ago
Be aware of its security flaws -- https://github.com/longhorn/longhorn/issues/1983

Allowing anyone to delete all your data is not great. When I found this I gave up on Longhorn and installed Ceph.

dilyevsky · 5 months ago
Anyone knows what's the story with NVMEoF/SPDK support these days? A couple years ago Mayastor/OpenEBS was running laps around Longhorn on every performance metrics big time, not sure if anything changed there...
scubbo · 5 months ago
(Copied from[0] when this was posted to lobste.rs) Longhorn was nothing but trouble for me. Issues with mount paths, uneven allocation of volumes, orphaned undeletable data taking up space. It’s entirely possible that this was a skill issue, but still - never touching it again. Democratic-csi[1] has been a breath of fresh air by comparison.

[0] https://lobste.rs/s/vmardk/longhorn_kubernetes_native_filesy... [1] https://github.com/democratic-csi/democratic-csi