Changing Management of Volumes in a Shared Storage Backend
Problem
In an environment where volumes are provisioned under a shared storage backend (e.g. NetApp Solidfire, ONTAP, Tintri, etc.), one or more Block Storage hosts will manage the lifecycle of volumes associated with those backends from an OpenStack/Cinder perspective.
In that regard, should a Block Storage host need to be deauthorized, brought down for maintenance, or repurposed to another role, it may be necessary to re-manage the existing volumes under another Block Storage host. CRD (create, update, delete) operations will fail if this is not performed.
Note: any existing volumes managed by backend(s) associated with any Block Storage host(s) will otherwise go uninterrupted as the iSCSI connections for I/O operations from within the VMs are established directly with the backend, and are not reliant on the Block Storage host(s) being up.
Environment
Platform9 Managed OpenStack - All versions
OpenStack CLI
Cinder
Procedure
Identify the backend storage pools.
$cinderget-poolsor$openstackvolumeservicelist
Example:
From the list of storage pools, identify host_uuid@backend-name#pool of the current host and of the destination host.
Update the host information for all volumes currently managed by the current host to be instead be managed by the destination host.
Info
The cinder-manage binary is available only on the Platform9 Management Plane and Block Storage hosts.
If running from the control plane:
If running from Block Storage Host:
The os-vol-host-attr:host parameter should now be updated for all the volumes to reflect the destination host.
To further verify that volumes are no longer managed by the previous host.
$ openstack volume list --all-projects --host [HOST_UUID]
or
$ openstack volume list --all-projects -f value -c ID | while read -r vol_id; do
host=$(openstack volume show "$vol_id" -f value -c os-vol-host-attr:host)
echo "$vol_id | $host"
done