Kickstart 無法設定多個綁定介面

Kickstart 無法設定多個綁定介面

我在啟動腳本中設定綁定介面時遇到一些問題CentOS 6.5。我有 8 個實體網路接口,希望成對配置為 4 個綁定網路接口。

我的網路設定如下:

network --device=bond0 --noipv6 --bootproto=static --onboot=yes --ip=172.123.1.22 --netmask=255.255.255.0 --bondslaves=eth0,eth1 --bondopts=mode=active-backup,primary=eth0,miimon=80,updelay=60000

network --device=bond1 --noipv6 --bootproto=static --onboot=yes --ip=172.123.2.22 --netmask=255.255.255.0 --bondslaves=eth2,eth3 --bondopts=mode=active-backup,primary=eth2,miimon=80,updelay=60000

network --device=bond2 --noipv6 --bootproto=static --onboot=yes --ip=172.123.3.22 --netmask=255.255.255.0 --bondslaves=eth4,eth5 --bondopts=mode=active-backup,primary=eth4,miimon=80,updelay=60000

network --device=bond3 --noipv6 --bootproto=static --onboot=yes --ip=172.123.4.22 --netmask=255.255.255.0 --bondslaves=eth6,eth7 --bondopts=mode=active-backup,primary=eth6,miimon=80,updelay=60000

network --device=eth0 --noipv6 --nodns --bootproto=static --onboot=yes

network --device=eth1 --noipv6 --nodns --bootproto=static --onboot=yes

network --device=eth2 --noipv6 --nodns --bootproto=static --onboot=yes

network --device=eth3 --noipv6 --nodns --bootproto=static --onboot=yes

network --device=eth4 --noipv6 --nodns --bootproto=static --onboot=yes

network --device=eth5 --noipv6 --nodns --bootproto=static --onboot=yes

network --device=eth6 --noipv6 --nodns --bootproto=static --onboot=yes

network --device=eth7 --noipv6 --nodns --bootproto=static --onboot=yes

我的問題是這樣的:bond0設定正確,但是bond1bond2bond3沒有設定。

我看過許多關於類似主題的留言板帖子,解決方案似乎總是放入自訂 bash 腳本以設定綁定介面。但是,我不認為這是唯一的方法。如果 kickstart 檔案中存在設定綁定介面的機制無法正常運作,為什麼會發生這種情況?

答案1

您可能必須包含--activate每個eth{1..7}接口,因為預設僅啟動第一個接口。 (我想知道您的綁定介面實際上是否僅使用eth0,如果這是唯一的活動介面。)

答案2

如果 RHEL 系列版本中最近新增了新功能,則能夠在 kickstart 中設定綁定介面;可能 6.4 是第一個支持它的。你試過6.6嗎?

來自 RHEL 6.4 發行說明

配置綁定 現在,可以使用 bond 引導選項以及 --bondslaves 和 --bondopts kickstart 選項來配置綁定,作為安裝過程的一部分。有關如何配置綁定的更多信息,請參閱《Red Hat Enterprise Linux 6 安裝指南》的以下部分:“Kickstart 選項”部分和“引導選項”一章。

也就是說,6.5 和 6.6 的技術說明並沒有提供太多內容。 (儘管有一些關於慢速網路設備的“nicedelay”選項)

我最好的建議是捕獲 anaconda 的輸出。

我懷疑第一個正在工作,因為它包含 eth0,它可能已經啟動,或者驅動程式已經加載。

其他的在配置時可能不存在嗎?也許您應該將結果報告ifconfig -a到 %pre 或類似文件中,如下所示CentOS Kickstart wiki 頁面的提示和技巧部分

相關內容