[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

NFS Boot (diskless)



Hallo

Ich möchte am Ende folgende Konstellation:



                |                                     |
                |port3                           port3|
          +-----+----+                          +-----+----+
          |          |port7       802.1q   port7|          |
          | switch A +--------------------------+ switch B |
          |          +--------------------------+          |
          | 802.3ad  |port8                port8|
 802.3ad  |
          +----++----+                          +-----++---+
          port2||port1                           port1||port2
               ||             +-------+               ||
               |+-------------+ host1 +---------------+|
               |         eth1 +-------+ eth2           |
               |                                       |
               |              +-------+                |
               +--------------+ host2 +----------------+
                         eth1 +-------+ eth2


Der Host1 und Host2 booten über NFS. Mit der folgenden Konfiguration hat es bereits geklappt.



DEFAULT linux
LABEL linux
KERNEL vmlinuz-3.2.0-4-amd64
# append fuer eine NIC
#append root=/dev/nfs initrd=initrd.img.netboot nfsroot=192.168.1.252:/mnt/xen_d
isks/kvm111 ip=::::kvm111:eth1:dhcp rw
#append fuer bonded ifaces
append root=/dev/nfs initrd=initrd.img.netboot nfsroot=192.168.1.252:/mnt/xen_di
sks/kvm111 bond=bond0:eth1,eth2:mode=4 ip=::::kvm111:bond0:dhcp rw


Ich möchte nun ein Brücke einrichten damit die Hosts als KVM-Hosts funktionieren würden.


Mit dem folgenden Script werden die Interfaces beim starten konfiguriert...
/etc/initramfs-tools/scripts/nfs-top/00_bonding_init

#!/bin/sh -e
PREREQS=""
case $1 in
        prereqs) echo "${PREREQS}"; exit 0;;
esac

    echo "Network interfaces loaded: "
    echo `ls /sys/class/net`

    echo "802.3ad" > /sys/class/net/bond0/bonding/mode
    echo "fast" > /sys/class/net/bond0/bonding/lacp_rate 
    echo "1" > /sys/class/net/bond0/bonding/xmit_hash_policy 
    echo "100" > /sys/class/net/bond0/bonding/miimon
    echo "200" > /sys/class/net/bond0/bonding/downdelay
    echo "200" > /sys/class/net/bond0/bonding/updelay
    echo "+eth1" > /sys/class/net/bond0/bonding/slaves
    echo "+eth2" > /sys/class/net/bond0/bonding/slaves


Im /etc/network/interfaces sind die Devices eth1, eth2, bond0 und br0 deklariert

Mit diesen Einstellungen wurde 
mkinitramfs -o initrd.img.netboot
durchgeführt.

Wie gesagt mit bond0 funktionierte es. Bei br0 kommt es beim Starten zur folgenden Fehlermeldung:

ipconfig: br0: SIOCGIFINDEX: No such device
ipconfig: no devices to configure
/init: .: 1: Can't open /tmp/net-br0.conf
[ 25.445685] Kernel panic - not syncing: Attempted to kill init! 

Irgendwann muss noch der Bridge eingerichtet werden.
/sbin/brctl addbr br0
/sbin/brctl addif br0 bond0
/sbin/ifup br0

Wie wird in dieser Konstellation das bond0 Interface im Bridge-Modus eingerichtet?

Besten Dank für jeden Hinweis

Gruss René 

Reply to: