zoukankan      html  css  js  c++  java
  • 第 6 章 Cinder

    Detach Volume 操作

     

    下图是 Detach 操作的流程图

    1、向 cinder-api 发送 detach 请求

    2、cinder-api 发送消息

    3、nova-compute detach volume

    4、cinder-volume 删除 target

     

    详细分析:

    1、向 cinder-api 发送 detach 请求

    客户(可以是 OpenStack 最终用户,也可以是其他程序)向 cinder-api 发送请求:“请 detach 指定 instance 上的 volume。”

    这里将 detach instance “c2”上的 volume “volume1” 进入 GUI 操作菜单Project -> Volumes -> Volumes。

    选择 volume “volume1”,点击“Manage Attachments”。

    点击 “Detach Volume”。

    再次确认。

    cinder-api 将接收到 detach volume 的请求。

     

    cinder-api 发送消息

    cinder-api 发送消息 detach 消息。

    cinder-api 没有打印发送消息的日志,只能通过源代码查看 /opt/stack/cinder/cinder/volume/api.py,方法为 detach。

    Detach 的操作由 nova-compute 和 cinder-volume 共同完成:

    • 首先 nova-compute 将 volume 从 instance 上 detach,然后断开与 iSCSI target 的连接。
    • 最后 cinder-volume 删除 volume 相关的 iSCSI target。

     

    nova-compute detach volume

    nova-compute 首先将 volume 从 instance 上 detach 。

    这时通过 virsh edit可以看到 XML 配置文件中已经不在有 volume 的虚拟磁盘。

    接下来断开与 iSCSI target 的连接。

    具体有下面几个步骤:

    将缓存中的数据 Flush 到 volume。

    删除计算节点上 volume 对应的 SCSI 设备。

    通过 iscsiadm 的 logout,delete 操作断开与 iSCSI target 的连接。

    compue-nova 完成了 detach 工作,接下来 cinder-volume 就可以删除 volume 相关的 target 了。

     

    cinder-volume 删除 target

    存储节点 cinder-volume 通过 tgt-admin 命令删除 volume 对应的 target。

    至此 detach volume 操作已经完成,GUI 也会更新 volume 的 attach 信息。

    -----------------------------------------------------------引用来自-----------------------------------------------------------------------

    https://www.cnblogs.com/CloudMan6/p/5636510.html

    https://mp.weixin.qq.com/s?__biz=MzIwMTM5MjUwMg==&mid=2653587735&idx=1&sn=f7e723c2d1f8cdf79f90d73644859b5d&chksm=8d30810eba47081803815e0d67655a142e297f78f641bbe66b53749ba8903de20783eafef1c8&scene=21#wechat_redirect

  • 相关阅读:
    Python 字符串(一)
    UVA 11552 四 Fewest Flops
    UVA 10534 三 Wavio Sequence
    UVA 1424 二 Salesmen
    UVA 11584 一 Partitioning by Palindromes
    CodeForces 549G Happy Line
    CodeForces 451C Predict Outcome of the Game
    CodeForces 567C Geometric Progression
    CodeForces 527B Error Correct System
    CodeForces 552C Vanya and Scales
  • 原文地址:https://www.cnblogs.com/gsophy/p/11075464.html
Copyright © 2011-2022 走看看