Skip to main content
NetApp Knowledge Base

Openstack: Does cinder driver allow in-use volumes to be extended

Views:
2,274
Visibility:
Public
Votes:
1
Category:
openstack
Specialty:
virt
Last Updated:

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:
  1. 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 |                                          |

  1. Reset the cinder volume state to 'available':

# cinder reset-state --state available e1ec70e4-eb4e-425c-a141-38c00aa6df9e

  1. 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

  1. 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

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.