跳转到主内容

OpenStack:cinder驱动程序是否允许扩展正在使用的卷

Views:
Visibility:
Public
Votes:
0
Category:
openstack
Specialty:
virt
Last Updated:

适用场景

  • OpenStack Cinder
  • NetApp驱动程序
  • NetApp SolidFire驱动程序

问题解答

NetApp驱动程序(ONTAP)

  • NetApp驱动程序cinder驱动程序不支持使用中的卷扩展
  • 目前、无法扩展连接到服务器并使用NetApp ONTAP后端的根卷的大小
  • 只能通过将非根卷与服务器分离来完成扩展
  • 尝试扩展根卷时、Cinder计划程序.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

  • 可以通过将正在使用的根卷转换为"可用"来扩展该卷。  这样做的操作步骤是:
  1. 关闭虚拟机

# 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. 将Cinder卷状态重置为"可用":

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

  1. 调整卷大小:

        # openstack volume set e1ec70e4-eb4e-425c-a141-38c00aa6df9e --size 4

# openstack volume show e1ec70e4-eb4e-425c-a141-38c00aa6df9e | grep size
| size                           | 4        

请注意、调整卷大小后、此状态应恢复为"in-used"(正在使用):

# 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. 启动VM

# 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 |

 

追加信息

请参阅 本文: Redhat has a解决方案for this问题描述、相关文档请参见How to extend extend extain/in-use volume in OpenSTACK?"

提取(已编辑):

在提及等于或大于3.42的微版本时、您可以使用cinder客户端来确保卷扩展正常工作:
# cinder  --os-volume-api-version <Microversion> extend <volume_id> <new_size_in_GiB>

示例:
# cinder  --os-volume-api-version 3.42 extend  582a5eb4-0bfc-460b-a32e-d051a9a72d2a  10

注意: OpenStack统一客户端尚不支持cinder微型版本、因此无法使用

 

 

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.