OpenStack: Is it possible to migrate Cinder volumes outside of OpenStack?
Applies to
- OpenStack
- ONTAP
Answer
You can use the 'vol move' command in ONTAP to perform a non-disruptive migration of a Cinder storage pool (i.e. a flexvol) from one aggregate to another aggregate.
A few notes:
- Be aware of Selective LUN mapping. If SLM is in place and you perform a vol move from one HA pair to another HA pair, the volume could be moved to a node that is not one of the reporting nodes for SLM. This could be disruptive.
- Performing a LUN move is not supported. This will introduce inconsistencies into Cinder (specifically into the
host
andprovider_location
metadata).
'vol move' example:
- There are two data aggregates present in ONTAP:
ontap913::> aggr show
Aggregate Size Available Used% State #Vols Nodes RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr1_ontap913
94.92GB 94.75GB 0% online 2 ontap913-01 raid_dp,
normal
aggr2_ontap913
79.10GB 79.10GB 0% online 0 ontap913-01 raid_dp,
normal
- In OpenStack, there are three 'in-use' cinder volumes being used by running instances:
[root@openstack-xena-standalone ~(tenant01_user)]# openstack volume list
+--------------------------------------+---------------------+-----------+------+--------------------------------------------+
| ID | Name | Status | Size | Attached to |
+--------------------------------------+---------------------+-----------+------+--------------------------------------------+
| 09da3411-b16f-4998-9a87-dbe807bba515 | vol_move_test03 | in-use | 1 | Attached to vol_move_vm03 on /dev/vda |
| 2df3389e-e6b6-4b14-aaff-35079d84fab0 | vol_move_test02 | in-use | 1 | Attached to vol_move_vm02 on /dev/vda |
| 70c8aec7-567c-4d30-8ceb-c875c744d661 | vol_move_test01 | in-use | 1 | Attached to vol_move_vm01 on /dev/vda |
+--------------------------------------+---------------------+-----------+------+--------------------------------------------+
[root@openstack-xena-standalone ~(tenant01_user)]# openstack server list
+--------------------------------------+-------------------+---------+-----------------------------------------+--------------------------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+-------------------+---------+-----------------------------------------+--------------------------+---------+
| 55db85a2-8966-4ae6-a226-b56a32d66259 | vol_move_vm03 | ACTIVE | private_network_tenant01=192.168.98.215 | N/A (booted from volume) | m1.tiny |
| 36ee8e47-51d4-40c1-aa60-ecde82d99951 | vol_move_vm02 | ACTIVE | private_network_tenant01=192.168.98.201 | N/A (booted from volume) | m1.tiny |
| 53597579-9811-494f-9fff-57c59449333b | vol_move_vm01 | ACTIVE | private_network_tenant01=192.168.98.194 | N/A (booted from volume) | m1.tiny |
+--------------------------------------+-------------------+---------+-----------------------------------------+--------------------------+---------+
- All three Cinder volumes live on
aggr1_ontap913
in flexvol ‘vol_move_test‘:
[root@openstack-xena-standalone ~(tenant01_user)]# cinder get-pools --detail
+-----------------------------------+-----------------------------------------------------------------------------+
| Property | Value |
+-----------------------------------+-----------------------------------------------------------------------------+
| QoS_support | True |
| allocated_capacity_gb | 3 |
| cacheable | True |
| consistencygroup_support | True |
| consistent_group_snapshot_enabled | True |
| driver_version | 3.0.0 |
| filter_function | capabilities.utilization < 70 |
| free_capacity_gb | 15.98 |
| goodness_function | 100 - capabilities.utilization |
| max_over_subscription_ratio | 20.0 |
| multiattach | True |
| name | openstack-xena-standalone.xyz.local@ontap-iscsi-913#vol_move_test |
| netapp_aggregate | aggr1_ontap913 |
| netapp_aggregate_used_percent | 0 |
| netapp_compression | false |
| netapp_dedup | false |
| netapp_dedupe_used_percent | 0.0 |
| netapp_disk_type | ['FCAL'] |
| netapp_flexvol_encryption | false |
| netapp_hybrid_aggregate | false |
| netapp_is_flexgroup | false |
| netapp_mirrored | false |
| netapp_qos_min_support | false |
| netapp_raid_type | raid_dp |
| netapp_thin_provisioned | true |
| online_extend_support | True |
| pool_name | vol_move_test |
| replication_enabled | False |
| reserved_percentage | 0 |
| storage_protocol | iSCSI |
| thick_provisioning_support | False |
| thin_provisioning_support | True |
| timestamp | 2023-07-26T12:59:57.009707 |
| total_capacity_gb | 19.0 |
| utilization | 8.22 |
| vendor_name | NetApp |
| volume_backend_name | ontap-iscsi-913 |
+-----------------------------------+-----------------------------------------------------------------------------+
- A
vol move
is performed from 'aggr1_ontap913' to 'aggr2_ontap913':
ontap913::> vol move start -vserver ontap913_data -volume vol_move_test -destination-aggregate aggr2_ontap913
[Job 45] Job is queued: Move "vol_move_test" in Vserver "ontap913_data" to aggregate "aggr2_ontap913". Use the "volume move show -vserver ontap913_data -volume vol_move_test" command to view the status of this operation.
ontap913::> vol move show
Vserver Volume State Move Phase Percent-Complete Time-To-Complete
--------- ---------- -------- ---------- ---------------- ----------------
ontap913_data
vol_move_test
healthy replicating
86% Wed Jul 26 13:10:36 2023
ontap913::> vol move show
Vserver Volume State Move Phase Percent-Complete Time-To-Complete
--------- ---------- -------- ---------- ---------------- ----------------
ontap913_data
vol_move_test
healthy cutover 98% Wed Jul 26 13:10:34 2023
ontap913::> vol show -fields aggregate -volume vol_move_test
vserver volume aggregate
---------------- ------------- -----------------
ontap913_data vol_move_test aggr2_jdwontap913
cinder get-pools --detail
will still display the former aggregate. Restart Cinder services. After service restart, Cinder will update thenetapp_aggregate
field:
+-----------------------------------+-----------------------------------------------------------------------------+
| Property | Value |
+-----------------------------------+-----------------------------------------------------------------------------+
| QoS_support | True |
| allocated_capacity_gb | 3 |
| cacheable | True |
| consistencygroup_support | True |
| consistent_group_snapshot_enabled | True |
| driver_version | 3.0.0 |
| filter_function | capabilities.utilization < 70 |
| free_capacity_gb | 15.98 |
| goodness_function | 100 - capabilities.utilization |
| max_over_subscription_ratio | 20.0 |
| multiattach | True |
| name | openstack-xena-standalone.xyz.local@ontap-iscsi-913#vol_move_test |
| netapp_aggregate | aggr2_ontap913 |
| netapp_aggregate_used_percent | 0 |
| netapp_compression | false |
| netapp_dedup | false |
| netapp_dedupe_used_percent | 0.0 |
| netapp_disk_type | ['FCAL'] |
| netapp_flexvol_encryption | false |
| netapp_hybrid_aggregate | false |
| netapp_is_flexgroup | false |
| netapp_mirrored | false |
| netapp_qos_min_support | false |
| netapp_raid_type | raid_dp |
| netapp_thin_provisioned | true |
| online_extend_support | True |
| pool_name | vol_move_test |
| replication_enabled | False |
| reserved_percentage | 0 |
| storage_protocol | iSCSI |
| thick_provisioning_support | False |
| thin_provisioning_support | True |
| timestamp | 2023-07-26T13:35:17.988838 |
| total_capacity_gb | 19.0 |
| utilization | 6.38 |
| vendor_name | NetApp |
| volume_backend_name | ontap-iscsi-913 |
+-----------------------------------+-----------------------------------------------------------------------------+
Additional Information