Tag Archives: Debian

How to create bond interface

Don't use bond interfaces by ubuntu guid — it's a real bullshit.
If it works now, it doesn't matter that it will work after reboot if you have more then 1 bond interface.
You have to use debian-style bond interface settings.

Example of using with 8 interfaces combined by 4 interfaces to 2 bond interfaces.
/etc/network/interfaces

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
auto eth0
iface eth0 inet manual
    bond-master bond0

auto eth1
iface eth1 inet manual
    bond-master bond0

auto eth2
iface eth2 inet manual
    bond-master bond0

auto eth3
iface eth3 inet manual
    bond-master bond0

auto eth4
iface eth4 inet manual
    bond-master bond1

auto eth5
iface eth5 inet manual
    bond-master bond1

auto eth6
iface eth6 inet manual
    bond-master bond1

auto eth7
iface eth7 inet manual
    bond-master bond1

auto bond0
iface bond0 inet static
       address 192.168.1.11
       netmask 255.255.255.128
       network 192.168.1.0
       broadcast 192.168.1.127
       gateway 192.168.1.1
## following commented settings for auto generating resolve.conf
#       dns-nameservers 192.168.11.2 192.168.11.3
#       dns-search home.local work.local
#       dns-options timeout:1
       bond-mode 4
       bond-miimon 100
       bond-updelay 200
       bond-downdelay 200
       bond-lacp-rate 1
       bond-xmit_hash_policy layer3+4
       bond-max-bonds 2
       bond-slaves none

auto bond1
iface bond1 inet static
       address 8.8.8.8
       netmask 255.255.255.0
       network 8.8.8.0
       broadcast 8.8.8.255
       gateway 8.8.8.1
       bond-mode 4
       bond-miimon 100
       bond-updelay 200
       bond-downdelay 200
       bond-lacp-rate 1
       bond-xmit_hash_policy layer3+4
       bond-max-bonds 2
       bond-slaves none

Migrate from mysql to percona

1
2
gpg --keyserver hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A
gpg -a --export CD2EFD2A | sudo apt-key add -

add to /etc/apt/sources.list.d/percona.list

1
2
deb http://repo.percona.com/apt VERSION main
deb-src http://repo.percona.com/apt VERSION main

where VERSION is a name of your ubuntu version,
you can get it by command

1
lsb_release -a |grep name |awk '{print $2}'

backup data

1
2
cp -Rf /var/lib/mysql /var/lib/mysql-old
cp /etc/my.cnf /etc/my.cnf-old

Install percona (it automatically removes mysql and converts databases)

1
2
apt-get update
apt-get install percona-server-server-5.5 percona-server-client-5.5

Part of this article was taken from http://planet.jboss.org/post/drop_in_migration_from_mysql_to_percona_db_in_two_minutes