Cancel a data disk's removal and return it to normal use
POST/disks/array/remove/cancel
Required role: admin. Only an account or token with the admin role can call this operation.
curl --request POST \
--header "Authorization: Bearer $HOSERVA_TOKEN" \
--header "Content-Type: application/json" \
--data @body.json \
"https://$HOSERVA_HOST:8008/api/v1/disks/array/remove/cancel"
Clears mountpoint's removal state synchronously — no job — and re-applies the pool live so the disk's branches go back to RW. Refused with disk_slot_not_found (404) when no data disk occupies mountpoint. Refused with disk_removal_not_cancellable (409) when the disk is not currently in removal; when it is unpooled or unlisted — it has already left the pool, so the only way forward is finishDiskRemoval, never back; or when it is evacuating and its evacuation job is still queued, running or interrupted — that job owns the state, so cancel it (cancelJob) instead. An evacuating disk whose evacuation job has already ended (no longer queued, running or interrupted — including a job the store no longer has a record of) is cancelled the same as an evacuated one: the copy it ran already stopped, and cancelling here is how the disk gets back to ordinary use instead of sitting stuck until it is evacuated again. A live-update failure while re-applying the pool is an internal error, and the removal state is left cleared — the same as the disk-topology jobs' own live-apply failures — rather than silently reporting success with the disk still no-create.
Request
Responses
- 204
- default
The removal is cancelled; the disk takes writes again.
An error response.