Skip to main content
NetApp Knowledge Base

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

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

Applies to

  • OpenStack Cinder
  • NetAppDriver
  • SolidFireDriver

Answer

NetAppDriver (ONTAP)

  • In-use volume extension is not supported by the NetAppDriver cinder driver.
  • Currently, it is not possible to extend the size of a root volume that is attached to a server and uses a NetApp ONTAP backend.
  • The extension can only be done by detaching a non-root volume from the server. 
  • When attempting to extend a root volume, the following event is seen in Cinder scheduler.log:

/var/log/cinder/scheduler.log:2023-01-05 10:46:12.116 8985 DEBUG cinder.scheduler.filters.capabilities_filter [req-598b1f1c-f1b6-42c6-b481-d9491f36f88a 9f61737278e74e299ecf78393c6f2cc4 aa13b5b8c1e449fd93e598af2b4af8d0 - default default] Backend doesn't support attached volume extend _satisfies_extra_specs /usr/lib/python2.7/site-packages/cinder/scheduler/filters/capabilities_filter.py:45

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.