Xen Cluster Management With Ganeti On Debian Etch - Page 4

6 Installing LVM And A Few Other Needed Packages

node1/node2:

Now we install LVM and some other needed packages:

apt-get install lvm2 ssh bridge-utils iproute iputils-arping fping python2.4 python-twisted-core python-pyopenssl openssl mdadm

You will see this question:

MD arrays needed for the root filesystem: <-- all

 

7 Reconfiguring The Network For Ganeti

Ganeti relies on Xen running in bridge mode, using a bridge called xen-br0 on dom0. Therefore we have to reconfigure the network on our physical nodes (dom0):

node1:

Edit /etc/network/interfaces and replace the eth0 stanza with a stanza for xen-br0 so that it looks like this:

vi /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp
auto xen-br0
iface xen-br0 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

Then take down eth0 and bring up xen-br0:

ifdown eth0
ifup xen-br0

Afterwards, check that your new bridge is working:

ip a show xen-br0

node1:~# ip a show xen-br0
4: xen-br0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue
    link/ether 00:0c:29:d6:b1:55 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.100/24 brd 192.168.0.255 scope global xen-br0
    inet6 fe80::20c:29ff:fed6:b155/64 scope link
       valid_lft forever preferred_lft forever
node1:~#

brctl show xen-br0

node1:~# brctl show xen-br0
bridge name     bridge id               STP enabled     interfaces
xen-br0         8000.000c29d6b155       no              eth0
node1:~#

ifconfig

node1:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:D6:B1:55
          inet6 addr: fe80::20c:29ff:fed6:b155/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:26917 errors:7 dropped:1408 overruns:0 frame:0
          TX packets:1571 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:22665198 (21.6 MiB)  TX bytes:178098 (173.9 KiB)
          Interrupt:17 Base address:0x1400

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)

xen-br0   Link encap:Ethernet  HWaddr 00:0C:29:D6:B1:55
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fed6:b155/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:101 errors:0 dropped:0 overruns:0 frame:0
          TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6727 (6.5 KiB)  TX bytes:10936 (10.6 KiB)

node1:~#

node2:

Now do the same on node2.example.com:

vi /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp
auto xen-br0
iface xen-br0 inet static
        address 192.168.0.101
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

ifdown eth0
ifup xen-br0

ip a show xen-br0

node2:~# ip a show xen-br0
4: xen-br0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue
    link/ether 00:0c:29:d0:19:53 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.101/24 brd 192.168.0.255 scope global xen-br0
    inet6 fe80::20c:29ff:fed0:1953/64 scope link
       valid_lft forever preferred_lft forever
node2:~#

brctl show xen-br0

node2:~# brctl show xen-br0
bridge name     bridge id               STP enabled     interfaces
xen-br0         8000.000c29d01953       no              eth0
node2:~#

ifconfig

node2:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:D0:19:53
          inet6 addr: fe80::20c:29ff:fed0:1953/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9469 errors:8 dropped:3521 overruns:0 frame:0
          TX packets:1655 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8597242 (8.1 MiB)  TX bytes:183126 (178.8 KiB)
          Interrupt:16 Base address:0x1400

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)

xen-br0   Link encap:Ethernet  HWaddr 00:0C:29:D0:19:53
          inet addr:192.168.0.101  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fed0:1953/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:18 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1070 (1.0 KiB)  TX bytes:2832 (2.7 KiB)

node2:~#

Falko Timme

About Falko Timme

Falko Timme is an experienced Linux administrator and founder of Timme Hosting, a leading nginx business hosting company in Germany. He is one of the most active authors on HowtoForge since 2005 and one of the core developers of ISPConfig since 2000. He has also contributed to the O'Reilly book "Linux System Administration".

Share this page:

Suggested articles

0 Comment(s)

Add comment

Comments

By: Falko Timme