1. 程式人生 > linux教程 > opensm inifiniband 多埠 配置 opensm.conf

opensm inifiniband 多埠 配置 opensm.conf

cat /etc/sysconfig/opensm這裡面是opensm的詳細資訊,裡面提到對於opensm的多埠有兩種配置方案:
1) Start opensm on multiple machines and configure it to manage different fabrics on each machine2) Configure opensm to start multiple instances on a single machine
大意是:1. 在一臺機器上啟動多個程序,每個程序負責一個網絡卡口,優點是簡單,並且能夠為每個埠的策略詳細定製2. 在一個配置檔案上指定多個網絡卡埠,一個程序負責管理這些埠,優點是夠簡單
我個人推薦方案1因為:
方案2在遇到主機上有多塊HCA卡時會出現錯誤,我遇到的現象就是交換機亮黃燈,或者ip addr show 的ib網絡卡狀態,有一個是DOWN
方案1:[[email protected] log]# cp -a /etc/rdma/opensm.conf /etc/rdma/opensm.conf.0
[[email protected] log]# cp -a /etc/rdma/opensm.conf /etc/rdma/opensm.conf.1一定要注意,我們要的是Port GUID,不是其他的GUID,因為預設的輸出還有system GUID等
[[email protected] log]# ibstat |grep PortPort 1:Port GUID: 0x248a070300001234Port 1:Port GUID: 0x248a070300bc5678
編輯/etc/rdma/opensm.conf.0和/etc/rdma/opensm.conf.1[[email protected] log]# cat /etc/rdma/opensm.conf.0 |grep guidguid 0x248a070300001234
..........omit............
[[email protected] log]# cat /etc/rdma/opensm.conf.1 |grep guidguid 0x248a070300005678
..........omit............
我們複製了/etc/rdma/opensm.conf.<數字> 這種,opensm就不會去讀取預設的opensm.conf了



方案2:當機器上只有1塊HCA卡,上面有2個埠時,可以採用第二個,因為配置簡單:[[email protected] log]# ibstat |grep PortPort 1:Port GUID: 0x248a070300001234Port 1:Port GUID: 0x248a070300bc5678
[[email protected] log]# cat /etc/rdma/opensm.conf |grep guidguid 0x248a070300001234guid 0x248a070300bc5678
..........omit............

重啟opensm,當然更推薦直接rebootsystemctl restart opensm