we are planing to use drbd to sync two servers (different hardware) to get kind of HA in case the master server dies. The servers are hosted physically in the same datacenter (Hetzner in germany) and they are running with openSUSE.
The main purpose of the servers is to host print-on-demand stuff and render or generate pdf.
We want to sync the "/var/www" folder as well as the database which stores at the default folder at the moment.
My plan is to move these folders to the drbd synced partition and link them via "ln" back to where they used to be. Or is it better to do the other way round? Or sync the Database via replication?
The main problem is, that we just have 100mbit uplink at each server, and I dont know if it is enough to sync the servers in drbd-mode C.
Maybe some of you have any advice or experience you want to share with me.
PS: I don't have the servers yet, I am just planing if everything would work.
edit: I got the drbd sync process running now, syncronizing /dev/drbd0 mounted to /srv/drbd on the primary node. I have linked (ln) the folder /srv/drbd/vhosts, containing my websites, back to /srv/www/ but always get error 404 errors in my browser. Is this just a chown problem?
At the moment I am trying to configure corosync/pacemaker via crm, but I can’t get all primitives running. Here is my config, maybe someone of you can figure out why it won't start.
============
Last updated: Mon Aug 5 16:37:54 2013
Last change: Mon Aug 5 16:37:32 2013 by root via cibadmin on alice
Stack: openais
Current DC: alice - partition with quorum
Version: 1.1.7-61a079313275f3e9d0e85671f62c721d32ce3563
2 Nodes configured, 2 expected votes
5 Resources configured.
============
Online: [ bob alice ]
Master/Slave Set: DRBD_MS [DRBD]
Masters: [ alice ]
Slaves: [ bob ]
Resource Group: APACHE_IP
APACHE (ocf::heartbeat:apache): Started bob
failover-ip (ocf::heartbeat:IPaddr2): Stopped
Failed actions:
failover-ip_start_0 (node=alice, call=57, rc=1, status=complete): unknown error
DRBD_FS_monitor_0 (node=alice, call=60, rc=5, status=complete): not installed
APACHE_monitor_15000 (node=bob, call=49, rc=7, status=complete): not running
failover-ip_start_0 (node=bob, call=57, rc=1, status=complete): unknown error
DRBD_FS_monitor_0 (node=bob, call=59, rc=5, status=complete): not installed
my cib.xml looks like:
node alice
node bob
primitive APACHE ocf:heartbeat:apache \
params configfile="/etc/apache2/httpd.conf" \
op monitor interval="15s"
primitive DRBD ocf:linbit:drbd \
params drbd_resource="r0" \
op monitor interval="120s"
primitive DRBD_FS ocf:heartbeat:Filesystem \
params device="/dev/drbd0" directory="/srv/drbd" fstype="ext4" \
meta target-role="Started"
primitive failover-ip ocf:heartbeat:IPaddr2 \
params ip="123.456.789.101" nic="net0:0" \
op monitor interval="10s" \
meta is-managed="true" target-role="Started"
group APACHE_IP APACHE failover-ip \
meta target-role="Started"
ms DRBD_MS DRBD \
meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true" target-role="Started"
colocation FS_ON_DRBD inf: DRBD_FS DRBD_MS:Master
order FS_AFTER_DRBD inf: DRBD_MS:promote DRBD_FS:start
property $id="cib-bootstrap-options" \
dc-version="1.1.7-61a079313275f3e9d0e85671f62c721d32ce3563" \
cluster-infrastructure="openais" \
expected-quorum-votes="2" \
stonith-enabled="false" \
no-quorum-policy="ignore" \
last-lrm-refresh="1375713403"
rsc_defaults $id="rsc-options" \
resource-stickiness="100"