Hello selfhosted !

Continuing my journey of setup up my home k3s cluster.

I’ve been asking myself if Longhorn might be overkill for my home cluster,here’s what i did:

3 machines running k3s each. One of them has a storage in Raid 5 and I dont want to use any storage from the other two.

Thing is, i had to configure replicas to 1 in longhorn for my pv to be green.

Hence my question, since data is already replicated in the array, shouldn’t I just use a NFS storage class instead?

Thanks !

  • Starbuck@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    You’re on the right track here. Longhorn kind of makes RAID irrelevant, but only for data stored in Longhorn. So anything on the host disk and not a PV is at risk. I tend to use MicroOS and k3s, so I’m okay with the risk, but it’s worth considering.

    For replicas, I wouldn’t jump straight to 3 and ignore 2. A lot of distributed storage systems use 3 so that they can resolve the “split brain” problem. Basically, if half the nodes can’t talk to each other, the side with quorum (2 of 3) knows that it can keep going while the side with 1 of 3 knows to stop accepting writes it can’t replicate. But Longhorn already does this in a Kubernetes native way. So it can get away with replica 2 because only one of the replicas will get the lease from the kube-api.