08.存儲Cinder→4.Cinder組件詳解→3.cinder-volume

    cinder-volume 在存儲節點上運行,OpenStack 對 Volume 的操做,最後都是交給 cinder-volume 來完成的。cinder-volume 自身並無論理真正的存儲設備,存儲設備是由 volume provider 管理的。cinder-volume 與 volume provider 一塊兒實現 volume 生命週期的管理。功能包括:
  1. 經過 Driver 架構支持多種 Volume Provider,cinder-volume 爲這些 volume provider 定義了統一的接口,volume provider 只須要實現這些接口,就能夠 Driver 的形式即插即用到 OpenStack 系統中。
    1. 在 /opt/stack/cinder/cinder/volume/drivers/ 目錄下查看到 OpenStack 源代碼中已經自帶了不少 volume provider 的 Driver。參考見08.存儲Cinder→3.Cinder架構→2.物理部署方案
    2. 存儲節點在配置文件 /etc/cinder/cinder.conf 中用 volume_driver 選項配置使用的driver這裏 LVM 是咱們使用的 volume provider。
  2. 按期向 OpenStack 報告存儲節點的狀態
    1. cinder-scheduler 會用到 CapacityFilter 和 CapacityWeigher,它們都是經過存儲節點的空閒容量來作篩選。cinder-volume 會按期向 Cinder 報告使得Cinder得知每一個存儲節點的空閒容量信息
    2. 查看cinder-volume的日誌:root@controller:~# journalctl -af --unit devstack@c-vol.service
      1. Notifying Schedulers of capabilities:通知調度器存儲節點的capabilities
      2. Running periodic [ˌpɪriˈɑdɪk] task :運行週期性任務
      3. Updating volume stats:更新卷狀態
      4. 「vgs」Display information about volume groups和」lvs」Display information about logical volumes這兩個命令獲取 LVM 的容量使用信息
oslo.service:Library for running OpenStack services
oslo.concurrency:OpenStack library for all concurrency-related( [kən'kʌrənsɪ],併發(性);) code
  1. 實現 volume 生命週期管理
    1. Cinder 對 volume 的生命週期的管理最終都是經過 cinder-volume 完成的,包括 volume 的 create、extend、attach、snapshot、delete 等。
相關文章
相關標籤/搜索