Hello,
Been having some issues making anything really happen with this setup. There isn't much to read in regards issues with this particular combination of software.
I am using:
RHEL 6.1 x32
DRBD 8.4.1
Pacemaker 1.1.8-7
CMAN 3.0.12.1
ccs 0.16.2
mysql-5.5.28
Basically I have configured this setup based on the DRBD user guide (including the bit about the cluster.conf file ,
http://www.drbd.org/users-guide/s-rh...-clusters.html) pacemaker RHEL 6 quickstart guide (
http://clusterlabs.org/quickstart-redhat.html)and changed my config a bit to match this suggestion (
https://github.com/rozofs/rozofs/wik..._on_centos_6.3).
My /etc/drbd.d/mysql.res looks as follows:
# You can find an example in /usr/share/doc/drbd.../drbd.conf.example
resource mysql {
net {
# Automatic split brain recovery policies
after-sb-0pri discard-zero-changes;
after-sb-1pri discard-secondary;
after-sb-2pri call-pri-lost-after-sb;
}
syncer {
verify-alg sha1;
}
on shalva1 {
device /dev/drbd0;
disk /dev/system/mysql_drbd;
address 172.16.101.249:7788;
meta-disk internal;
}
on shalva2 {
device /dev/drbd0;
disk /dev/system/mysql_drbd;
address 172.16.101.250:7788;
meta-disk internal;
}
DRBD Status outputs:
shalva1
[root@shalva1 home]# service drbd status
drbd driver loaded OK; device status:
version: 8.4.1 (api:1/proto:86-100)
GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by gardner@, 2012-05-24 20:42:05
m:res cs ro ds p mounted fstype
0:mysql WFConnection Primary/Unknown UpToDate/DUnknown C
shalva2
[root@shalva2 ~]# service drbd status
drbd driver loaded OK; device status:
version: 8.4.1 (api:1/proto:86-100)
GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by gardner@, 2012-05-24 20:42:05
m:res cs ro ds p mounted fstype
0:mysql StandAlone Secondary/Unknown UpToDate/DUnknown r-----
my /etc/cluster/cluster.conf:
<cluster config_version="10" name="mysql">
<fence_daemon/>
<clusternodes>
<clusternode name="shalva1" nodeid="1">
<fence>
<method name="pcmk-redirect">
<device name="pcmk" port="shalva1"/>
</method>
</fence>
</clusternode>
<clusternode name="shalva2" nodeid="2">
<fence>
<method name="pcmk-redirect">
<device name="pcmk" port="shalva2"/>
</method>
</fence>
</clusternode>
</clusternodes>
<cman/>
<fencedevices>
<fencedevice agent="fence_pcmk" name="pcmk"/>
</fencedevices>
<rm>
<failoverdomains/>
<resources/>
<service autostart="1" name="mysql">
<drbd name="mysql" resource="mysql">
<fs device="/dev/drbd0"
mountpoint="/var/lib/mysql"
fstype="ext3"
name="mysql"
options="noatime"/>
</drbd>
<ip address="172.16.101.251" monitor_link="1"/>
<mysql config_file="/etc/my.cnf"
listen_address="172.16.101.251"
name="mysqld"/>
</service>
</rm>
</cluster>
The cluster wouldn't take ownership of the node so I added a virtual IP via the pcs tool because I didn't know how else to do it:
[root@shalva2 ~]# pcs status
Last updated: Sun Apr 21 10:38:36 2013
Last change: Sat Apr 20 22:45:44 2013 via crmd on shalva1
Stack: cman
Current DC: shalva2 - partition with quorum
Version: 1.1.8-7.el6-394e906
2 Nodes configured, unknown expected votes
1 Resources configured.
Online: [ shalva1 shalva2 ]
Full list of resources:
ip_mysql (ocf::heartbeat:IPaddr2): Started shalva2
From my understanding after this setup the /dev/drbd0 should be mounted to /var/lib/mysql based on who owns the IP and everything should be happy but I am pretty sure I am missing something and I am not 100% sure what that is. If anyone could give some advice, point me in the right direction or point me in the direction of some good documentation I would greatly appreciate it.
Thanks.