Ethernet bonding refers to aggregating multiple
ethernet channels together to form a single channel. This is primarily
used for redundancy in ethernet paths or for load balancing. This page
refers in particular to performing ethernet bonding under linux, and so
does not limit itself to discussion of 802.3ad Trunk Aggregation.
Ethernet Bonding Types
The linux kernel bonding module supports a number of bonding types.
Round Robin
Packets are transmitted in a round robin fashion over the available
slave interfaces. Provides both load balancing and fault tolerance
Active Backup
One slave interface is active at any time. If one interface fails,
another interface takes over the MAC address and becomes the active
interface. Provides fault tolerance only. Doesn’t require special switch
support
Balance XOR
Tranmissions are balanced across the slave interfaces based on
((source MAC) XOR (dest MAC)) modula slave count. The same slave is
selected for each destination MAC. Provides load balancing and fault
tolerance.
Broadcast
Transmits everything on all slave interfaces. Provides fault tolerance.
802.3ad
This is classic IEEE 802.3ad Dynamic link aggregation. This requires
802.3ad support in the switch and driver support for retrieving the
speed and duplex of each slave.
Balance TLB
Adaptive Transmit Load Balancing. Incoming traffic is received on the
active slave only, outgoing traffic is distributed according to the
current load on each slave. Doesn’t require special switch support
Balance ALB
Adaptive Load Balancing – provides both transmit load balancing (TLB)
and receive load balancing for IPv4 via ARP negotiation. Doesn’t
require special switch support, but does require the ability to change
the MAC address of a device while it is open
Setup Bonding Ethernet on Debian and ubuntu with a 2.4 kernel
To use Bonding Ethernet for High-Availability (fail-over) on Debian
(Woody, Sarge,etch or Sid with a 2.4.x kernel) and ubuntu you need to:
install package ifenslave-2.4.To install this package follow this command
#apt-get install ifenslave-2.4
make sure the real NICs kernel modules are loaded automatically
edit /etc/network/interfaces to look like this:
iface bond0 inet static
address 10.31.1.5
netmask 255.255.255.0
network 10.31.1.0
gateway 10.31.1.254
up /sbin/ifenslave bond0 eth0
up /sbin/ifenslave bond0 eth1
comment or borrow the lines referring to your real NICs in the same file
add the following lines to your /etc/modutils/arch/i386:
GFS Best Practices and Performance Tuning Configuration and Setup - Locking, and single to clustered filesystem changes - Distributed lock management - Switching from lock_nolock to a clustered filesystem: - Display the superblock: -gfs_tool sb /dev/vg00/mygfs all ## gfs volume 정보 확인 - Change Locking: -gfs_tool sb /dev/vg00/mygfs proto lock_dlm ## protocol 변경 - Change Cluster: -gfs_tool sb /dev/vg00/mygfs locktable mycluster:mygfs ## locktable 변경
## 상황에 따라선 LVM Locking Type 를 변경 한 후 적용해야 될때도 있다.
기존 2대의 GFS 시스템에서 1대의 Single GFS 로 갈경우 RHCS 가 Start 되어 있지 않아서 LVM 이 Cluster Volume 라고 활성화가 안 된다.
이 경우 일반 LVM 으로 변경 후 Cluster LVM 을 해제 한다. 방법은 아래와 같다.
/etc/lvm/lvm.conf locking_type=1 to locking_type=0 ## 1 을 0 으로 변경 한다.
vgchange -aln ## VG 비 활성화 vgchange -cn VG_Name ## VG cluster No
/etc/lvm/lvm.conf
locking_type=0
to
locking_type=1 ## 0 을 1 으로 원복 한다.