如何修复陷入“attaching”状态的Cinder卷?

huangapple go评论65阅读模式
英文:

How can I fix a cinder volume stuck in "attaching" state?

问题

After resizing an instance, some volumes attached to it were reattached correctly, but several volumes are now stuck in the "attaching" state.

我无法将任何卷分离以重新附加它们,因为它们不处于正确的状态:

# nova volume-detach d7d22b3c-f7a8-4e3d-9cf4-8588ca3c2b4e b3d7b7f4-e7af-493b-9a47-fabcda03d259
ERROR (BadRequest): Invalid volume: Invalid input received: Invalid volume: Unable to detach volume. Volume status must be 'in-use' and attach_status must be 'attached' to detach. (HTTP 400) (Request-ID: req-57cb42eb-e47a-476a-a9d7-f6234a7fb5ab) (HTTP 400) (Request-ID: req-fa52d6e4-76e0-441c-8c59-c1ea557f1c59)

openstack volume show 命令显示没有附件并且状态为 "attaching"。

我在红帽知识库上找到了类似的问题,但不幸的是,发布的解决方案要求进行数据库工作,并且建议联系红帽支持人员:
https://access.redhat.com/solutions/5277781

我该如何解决这个问题并重新附加这些卷?

英文:

After resizing an instance, a few volumes attached to it reattached correctly but a number of volumes are now stuck in "attaching" state.

I am unable to detach any volumes to reattach them as they are not in the correct state:

# nova volume-detach d7d22b3c-f7a8-4e3d-9cf4-8588ca3c2b4e b3d7b7f4-e7af-493b-9a47-fabcda03d259
ERROR (BadRequest): Invalid volume: Invalid input received: Invalid volume: Unable to detach volume. Volume status must be 'in-use' and attach_status must be 'attached' to detach. (HTTP 400
) (Request-ID: req-57cb42eb-e47a-476a-a9d7-f6234a7fb5ab) (HTTP 400) (Request-ID: req-fa52d6e4-76e0-441c-8c59-c1ea557f1c59)

The openstack volume show command shows no attachments and a status of "attaching".

I came across a similar issue on the redhat kb but unfortunately the solution posted is that this requires database work and that redhat associates should be contacted:
https://access.redhat.com/solutions/5277781

How can I resolve this and reattach the volumes?

答案1

得分: 0

你可以尝试使用 cinder reset-state 命令:

cinder reset-state --state available --attach-status detached VOLUME
英文:

You can try using the cinder reset-state command:

cinder reset-state --state available --attach-status detached VOLUME

答案2

得分: 0

问题已通过在nova数据库的block_device_mapping表和cinder数据库的volume_attachments表中将卷条目标记为已删除来解决,并重新附加卷:

nova volume-attach

然后关闭并重新启动相关服务器。

英文:

The issue was resolved by marking entries for the volume as deleted in the block_device_mapping table of the nova db, and the volume_attachments table of the cinder db, re-attaching the volumes with

nova volume-attach <server> <volume>

And turning off and on the server in question.

答案3

得分: 0

我在Openstack Train版本遇到了这个问题,通过重新启动所有节点的rabbitmq服务来解决它。

我猜这里可能是消息队列出了问题。

英文:

I experienced this issue with Openstack Train version, fixed it by restarted all nodes rabbitmq services.

I guess there was something wrong with message queue.

huangapple
  • 本文由 发表于 2023年4月20日 02:18:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/76057696.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定