Skip to main content

Rebalance the pool

POST 

/pool/rebalance

Required role: admin. Only an account or token with the admin role can call this operation.

Example request
curl --request POST \
--header "Authorization: Bearer $HOSERVA_TOKEN" \
--header "Content-Type: application/json" \
--data @body.json \
"https://$HOSERVA_HOST:8008/api/v1/pool/rebalance"

Recomputes the rebalance plan (never trusting a client-supplied one — a stale plan can only omit or skip files at run time, never misdirect a copy or delete) and, once confirmation matches the exact phrase the matching planRebalance call returned, queues a resumable rebalance job that runs that plan unchanged: copy and verify every batch, sync through the threshold guard, delete the batch's sources, sync again, batched so no trailing sync this run makes can ever trip the guard after sources are already gone. The recomputed plan leaves out a data disk in removal the same way planRebalance does. A wrong or missing confirmation is refused (confirmation_required) before anything runs.

Request​

Responses​

The queued, resumable rebalance job.