You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add automatic rebalancing after resource clone and snapshot restore #487
After rd clone or snapshot restore, replicas inherit the source volume's placement. When many volumes are cloned from the same source (e.g., golden image cloning for VMs), all replicas concentrate on the source nodes, creating storage hotspots.
LINSTOR could automatically rebalance newly created resources by checking query-size-info for optimal placement and running migrate-disk for misplaced replicas.
Currently we work around this in the CSI driver (see piraeusdatastore/linstor-csi#419), but a native LINSTOR solution would be more general and could benefit all LINSTOR users, not just CSI.
Possible approach:
After rd clone / snapshot restore completes, compare actual placement with query-size-info result
For each misplaced replica, create a diskless on the target node and run migrate-disk
This could be an opt-in resource group property (e.g., AutoRebalanceAfterClone)
I know of this problem and there is actually a PR floating around which was thought of a small fix, that would on clone create an additional diskful replica.
Then after the next BalanceResourceTask cycle it would remove the diskfull with the least space avialable and kinda helps in balancing.
I just also had a brief look at your rebalancer PR, but there are 2 things that I don't like.
The approach uses a rest api option, which means all plugins need to be adapted to use this (takes some time)
We plan to have a full rebalance task in the future, which would run in the background and try to keep resources well balanced between nodes. I guess as you can imagine that is not a trivial task so it might still take some time.
I understand the concern about the REST API option requiring changes across all plugins. The approach with creating an additional diskful replica on clone and letting BalanceResourceTask handle the cleanup sounds much cleaner.
A couple of questions:
Does the existing PR also cover snapshot restore, or only clone?
Is the BalanceResourceTask already functional, or is it part of the planned full rebalance feature?
Happy to close my PR if there's already a better solution in the pipeline. I just want to make sure the snapshot restore path is also covered.
Activity
feat(api): add rebalance field to clone and snapshot restore schemas
rp- commentedon Mar 6, 2026
Hey kvaps!
I know of this problem and there is actually a PR floating around which was thought of a small fix, that would on clone create an additional diskful replica.
Then after the next BalanceResourceTask cycle it would remove the diskfull with the least space avialable and kinda helps in balancing.
I just also had a brief look at your rebalancer PR, but there are 2 things that I don't like.
kvaps commentedon Mar 10, 2026
Hi @rp-! Thanks for the feedback.
I understand the concern about the REST API option requiring changes across all plugins. The approach with creating an additional diskful replica on clone and letting
BalanceResourceTaskhandle the cleanup sounds much cleaner.A couple of questions:
BalanceResourceTaskalready functional, or is it part of the planned full rebalance feature?Happy to close my PR if there's already a better solution in the pipeline. I just want to make sure the snapshot restore path is also covered.
refactor(linstor): hardcode relocate defaults, remove SC/VSC parameters
rp- commentedon Mar 16, 2026
I don't think it covers snapshot restore, but shouldn't be too hard to also add it there.
The BalanceResourceTask was introduced in 1.26.0, but it only will make sure resource definitions meet their replica-count settings.
A real rebalanceTask is still planned.