Openstack: Does cinder driver allow in-use volumes to be extended
Applies to
- OpenStack Cinder
- NetApp Driver
- NetApp SolidFire Driver
Answer
NetAppDriver (ONTAP)
- In-use volume extension support was introduced in the Stein release for iSCSI and FCP
- For this feature to be functional however, the following fix that was commited in the Ussuri branch needs to be in place: https://review.opendev.org/c/openstack/cinder/+/737267
- For NFS, OpenStack does not currently support exending in-use volumes (at the time of this writing, this support is not yet present in the Hibiscus release). Adding support is on the roadmap for both Nova and Cinder projects.
SolidFireDriver
- It is possible to extend a in-use root volume by toggling the volume to 'available'. The procedure for doing so is:
- Power down VM
# openstack server stop extend_vm
# openstack server list
+--------------------------------------+-----------------+---------+----------------------+-------+----------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+-----------------+---------+----------------------+-------+----------+
| ad0af6b4-9d24-4195-8095-6603b0426044 | extend_vm | SHUTOFF | intnet=192.168.0.70 | | m1.small |
# openstack volume list
+--------------------------------------+------------------+-----------+------+------------------------------------------+
| ID | Name | Status | Size | Attached to |
+--------------------------------------+------------------+-----------+------+------------------------------------------+
| e1ec70e4-eb4e-425c-a141-38c00aa6df9e | solidfire_extend | in-use | 2 | |
- Reset the cinder volume state to 'available':
# cinder reset-state --state available e1ec70e4-eb4e-425c-a141-38c00aa6df9e
- Resize the volume:
# openstack volume set e1ec70e4-eb4e-425c-a141-38c00aa6df9e --size 4
# openstack volume show e1ec70e4-eb4e-425c-a141-38c00aa6df9e | grep size
| size | 4
Note that after the volume resize, the status should return to in-use:
# openstack volume show e1ec70e4-eb4e-425c-a141-38c00aa6df9e | grep status
| migration_status | None |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| replication_status | None |
| status | in-use
- Power VM on
# openstack server start extend_vm
]# openstack server list
+--------------------------------------+-----------------+---------+----------------------+-------+----------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+-----------------+---------+----------------------+-------+----------+
| ad0af6b4-9d24-4195-8095-6603b0426044 | extend_vm | ACTIVE | intnet=192.168.0.70 | | m1.small |
Additional Information
Refer to this article: Redhat has a solution for this issue documented in "How to extend attached/in-use volume in Openstack? "
Extract (edited):
You can use the cinder client when mentioning a microversion equal or greater than 3.42 to ensure volume extend works:# cinder --os-volume-api-version <Microversion> extend <volume_id> <new_size_in_GiB>
Example:# cinder --os-volume-api-version 3.42 extend 582a5eb4-0bfc-460b-a32e-d051a9a72d2a 10
Note: OpenStack unified client does not yet support cinder microversion hence it can not be used
