Developers guide
Chapter 8
Copyright © 2008-2013 Inverse inc.
Operating System Best Practices 68
global {
usage-count yes;
}
common {
protocol C;
}
resource mysql {
syncer {
rate 100M;
al-extents 257;
}
startup {
degr-wfc-timeout 120; # 2 minutes.
}
disk {
on-io-error detach;
}
device /dev/drbd0;
disk YOUR_PARTITION_DEVICE;
meta-disk internal;
on pf1_server_name {
address x.x.x.x:7788;
}
on pf2_server_name {
address y.y.y.y:7788;
}
}
where:
∏
mysql is the name of the partition you created when installing the OS
∏
pf1_server_name and pf2_server_name by the real server names
∏
x.x.x.x and y.y.y.y by the IP addresses dedicated to DRBD on each server (use a dedicated NIC for
this, not the main one with all the IPs)
∏
YOUR_PARTITION_DEVICE is the device to use for the MySQL partition (ie. /dev/sda2)
Then initialize the partition:
[root@pf1 ~]# drbdadm create-md mysql
Writing meta data...
initializing activity log
NOT initialized bitmap
New drbd meta data block successfully created.
success
Start DRBD on both servers:
# /etc/init.d/drbd start