起動時にリンクのないボンドインターフェース

起動時にリンクのないボンドインターフェース

サーバーの再起動後、スレーブ イーサネットの 1 つ ( ) にリンクがないbond0ため起動していないため、次のように手動で設定する必要がありました。eth2

ip link set dev eth2 up

サーバーには、LAN への結合が 1 つ (KVM 用のブリッジを使用)、および別のサーバーへの drbd 用の結合がもう 1 つあります。

    kvm + lan                       drbd
 ##############################################
 +------------------------+
 |           br0          |
 +------------------------+
 +---------------+ +------+   +---------------+
 |     bond0     | | vnet |   |     bond1     |
 +---------------+ +------+   +---------------+
 +------+ +------+            +------+ +------+
 | eth0 | | eth2 |            | eth1 | | eth3 |
 +------+ +------+            +------+ +------+

両方のサーバーは Debian Wheezy を実行しています/etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# to the switch
auto bond0
iface bond0 inet manual
  slaves eth0 eth2
  bond-mode 802.3ad
  bond-miimon 100
  bond-downdelay 200
  bond-updelay 200

# bridge for KVM
auto br0
iface br0 inet static
  address 192.168.0.92
  netmask 255.255.255.0
  network 192.168.0.0
  broadcast 192.168.0.255
  gateway 192.168.0.101
  bridge_ports bond0
  bridge_stp off
  bridge_fd 0
  bridge_maxwait 0

# bond for drbd
auto bond1
iface bond1 inet static
  address 10.200.200.2
  netmask 255.255.255.0
  network 10.200.200.0
  broadcast 10.200.200.255
  slaves eth1 eth3
  bond-mode balance-rr
  bond-miimon 100
  bond-downdelay 200
  bond-updelay 200

他のサーバーは正常に起動し、両者の唯一の違いはinterfaces宣言の代わりstaticmanualbond0

iface bond0 inet static

どうすれば再発を防ぐことができますか?

インターフェースを追加するip link setのは良い考えでしょうか?

auto bond0
iface bond0 inet manual
    pre-up ip link set eth0 up
    pre-up ip link set eth2 up
    (...)

staticとの違いは何ですかmanual? または、インターフェイス ファイルの完全なドキュメントはどこで見つかりますか? (man interfacesボンド、ブリッジ、ワイヤレスなどのオプションについては説明されていません)

答え1

単に以下を追加します:

auto eth0
iface eth0 inet manual
    up ip link set eth0 up
    down ip link set eth0 down

auto eth1
iface eth1 inet manual
    up ip link set eth1 up
    down ip link set eth1 down

auto eth2
iface eth2 inet manual
    up ip link set eth2 up
    down ip link set eth2 down

auto eth3
iface eth3 inet manual
    up ip link set eth3 up
    down ip link set eth3 down

staticとの違いはmanual、静的はパラメータ(アドレス、ネットマスク、スレーブなど)によって構成され、手動はコマンドシーケンス(pre-up、up、down、post-down)によって定義されることです。

関連情報