This message was deleted.
# longhorn-storage
a
This message was deleted.
f
To clarify, you want Longhorn to schedule two replicas to the same node and ensure that they use different disks, correct? I'm not 100% sure on this. I think you will definitely need to check the box for
Replica Node Level Soft Anti-Affinity
or set it to true (https://longhorn.io/docs/1.4.2/references/settings/#replica-node-level-soft-anti-affinity) to get multiple replicas to schedule to the same node. Once you get past this restriction in the "node and zone selection stage" our documentation doesn't make any clear guarantee that both replicas won't schedule to the same disk in the "disk selection stage". We might have to experiment a bit. See the scheduling policy for more detailed information (https://longhorn.io/docs/1.4.2/volumes-and-nodes/scheduling/).
👍 1
b
got it, I think that currently it’s not possible to schedule on different disks..
f
This is an interesting! Have you tried it? If so, what was your experience exactly?
b
well, the documentation doesn’t seem to describe how to configure Longhorn to schedule replicas on two separate disks..
Replica Node Level Soft Anti-Affinity
allow the replicas to be scheduled on the same node, but not on different disks
for one node production environments, it’s crucial to be able to store the data on two separate disks, if one of it fails the other one will be used to recover the data
f
Yes, this makes sense to me. I'm scanning the GitHub issues to see if there is an existing one that covers this use case.
b
people might use one node production environments for services which do not require HA, but data lose is not acceptable
instead of configuring software raid, it would be much simpler to have this functionality in Longhorn and also, when we want to add more nodes, we just add the node and enable
Replica Node Level Soft Anti-Affinity
so we get HA in a few clicks
f
I think the correct way to proceed is to add your use case to https://github.com/longhorn/longhorn/issues/5149, which has already been opened as a catch-all for considering additional factors when scheduling replicas. Would you be willing to: 1. Like that issue to help bump it in priority. 2. Add the clear/concise explanation for what you want the replica scheduler to do and why you want it that you put above as a comment to that issue?
🙌 1
The implementation for that is definitely not going to make it into v1.5.0, but if we can get some interest behind it, hopefully we can get working on it sooner rather than later.
👍 1
b
if anyone need this functionality, please give it a 👍 here -> https://github.com/longhorn/longhorn/issues/5149#issuecomment-1559585527
yup, I imagine that the implementation will be similar with
Replica Node Level Soft Anti-Affinity
, instead of scheduling on different nodes we can schedule on different disks
f
Confirmed that we do not schedule the replicas to different disks on the same node (and instead are likely only looking at which disk has the most available space). Good raise @blue-kitchen-51801!
❤️ 1
b
thanks Eric for your support
maybe we could have
Replica Disk Level Soft Anti-Affinity
enabled by default as it’s a big risk to have two replicas on the same disk and also it doesn’t provide any value..