前置條件
更新時間 2025-06-17 17:13:07
最近更新時間: 2025-06-17 17:13:07
分享文章
本節主要介紹使用HBlock Cinder驅動插件的前置條件。
安裝部署HBlock 3.5.0或以上版本,詳細安裝過程可以參考服務器端部署。
如果對接HBlock集群版,Cinder、Glance、Nova所在節點需要安裝iSCSI工具及配置MPIO。
安裝iSCSI工具:
如果操作系統是CentOS/RHEL,請安裝iscsi-initiator-utils,安裝命令如下:
yum -y install iscsi-initiator-utils注意
安裝iSCSI initiator 6.2.0-874-10 或以上版本。
如果操作系統是Ubuntu Ubuntu/Debian,安裝命令如下:
apt install open-iscsi
配置MPIO步驟:
安裝 MPIO
說明
如果已安裝MPIO,可以忽略此步驟。
對于CentOS
yum install device-mapper-multipath device-mapper-multipath-libs #CentOS對于Ubuntu
apt install multipath-tools #Ubuntu
配置 MPIO
復制 /usr/share/doc/device-mapper-multipath-X.Y.Z/multipath.conf(其中X.Y.Z為multipath的實際版本號,請根據實際情況查找multipath.conf)到 /etc/multipath.conf。
在/etc/multipath.conf中增加如下配置:
注意
配置文件multipath.conf中,如果multipath部分與devices部分中有相同參數,multipath中的參數值會覆蓋devices中的參數值。為了正常使用HBlock卷,需要刪除multipath中的與下列字段相同的參數。
defaults { user_friendly_names yes find_multipaths yes uid_attribute "ID_WWN" } devices { device { vendor "CTYUN" product "iSCSI LUN Device" path_grouping_policy failover path_checker tur path_selector "round-robin 0" hardware_handler "1 alua" rr_weight priorities no_path_retry queue prio alua } }重啟multipathd服務
對于CentOS
systemctl restart multipathd # CentOS systemctl enable multipathd對于Ubuntu
systemctl restart multipath-tools.service # Ubuntu