Relocate a share between cache and array
POST/shares/:name/relocate
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/shares/{name}/relocate"
Queues a share_relocation job moving name's files between its cache path and the array — hoserva share relocate <share> --to cache|array. Cache to array behaves as a mover run limited to this share, ignoring the grace period; array to cache follows the two-phase copy-verify-sync- delete-sync order, through the same threshold guard every other sync goes through. There is no second relocation-invocation path. A relocation in either direction needs the array's cache disk, so it is refused with 409 no_cache_disk before any job is queued while the array has no cache disk, and with 409 no_array while there is no array; a failure to read the array topology fails the request rather than assuming a cache.
Request
Responses
- 200
- default
The queued or running share relocation job.
An error response.