Hi everybody,

I´m new to cluster setups and set up a "Webserver" cluster with an Apache, 
MySQL and DRBD for storage (2 Nodes).

I´ve put the primitives for ClusterIP, Apache, MySQL and the DRBD Filesystem 
in a group.
Idea behind that was, if one of those primitives fails on one machine, all 
services should switch over to the second machine.

So everything works fine if both nodes are up and i put one node in standby for 
example. Then the DRBD master switches to the second node and all services 
move there too.

But if one machine crashes (aka shutdown for a test) the DRBD Master disappers 
and the slave stays "slave".
This shouldn´t be the default or am I wrong?
Got my configurations attached, maybe someone can give me a hint.


Best regards,
Florian




drbd.conf
------------------------
resource r0 {
        #handlers {
        #   split-brain "/usr/lib/drbd/notify-split-brain.sh root";
        #   fence-peer "/usr/lib/drbd/crm-fende-peer.sh";
        #   after-resync-target "/usr/lib/drbd/crm-unfence-peer.sh";
        #}
        startup { 
           wfc-timeout 1; 
           degr-wfc-timeout 2; 
        }
        #net {
        #   after-sb-0pri discard-younger-primary;
        #   after-sb-1pri discard-secondary;
        #   after-sb-2pri disconnect;
        #}
        #disk {
        #   fencing resource-only;
        #}
        protocol C;
        device /dev/drbd_r0 minor 0;
        disk /dev/sdb1;
        meta-disk internal;

        on ws1 {
                address 1.2.3.4:7780;
        }

        on ws2 {
                address 1.2.3.5:7780;
        }

        syncer {
                rate 30M;
        }




crm configure show
-------------------------------------

node ws1 
node ws2 
primitive Apache ocf:heartbeat:apache \
        params configfile="/etc/apache2/httpd.conf" \
        op monitor interval="1min"
primitive ClusterIP ocf:heartbeat:IPaddr2 \
        params ip="1.2.3.10" cidr_netmask="32" \
        op monitor interval="30s"
primitive MySQL ocf:heartbeat:mysql \
        op monitor interval="30s" timeout="60s" \
        params config="/etc/my.cnf" datadir="/srv/mysql"
primitive WebFS ocf:heartbeat:Filesystem \
        params device="/dev/drbd_r0" directory="/mnt/" fstype="ext3"
primitive wwwdrbd ocf:linbit:drbd \
        params drbd_resource="r0" \
        op monitor interval="60s"
group Webserver ClusterIP WebFS Apache MySQL
ms WebData wwwdrbd \
        meta master-max="1" master-node-max="1" clone-max="2" 
clone-node-max="1" 
notify="true"
location cli-prefer-ClusterIP Webserver \
        rule $id="cli-prefer-rule-ClusterIP" inf: #uname eq ws2
colocation fs_on_drbd inf: Webserver WebData:Master
order WebFS-after-WebData inf: WebData:promote Webserver:start
property $id="cib-bootstrap-options" \
        dc-version="1.1.2-ecb1e2ea172ba2551f0bd763e557fccde68c849b" \
        cluster-infrastructure="openais" \
        expected-quorum-votes="2" \
        no-quorum-policy="ignore" \
        last-lrm-refresh="1290003545" \
        stonith-enabled="false" \
        startup-fencing="false"
rsc_defaults $id="rsc-options" \
        resource-stickiness="100"
op_defaults $id="op_defaults-options" \
        record-pending="false"






cluster log
-----------------------------

Nov 22 11:19:10 ws2 pengine: [11265]: notice: clone_print:  Master/Slave Set: 
WebData [wwwdrbd]
Nov 22 11:19:10 ws2 pengine: [11265]: notice: short_print:      Slaves: [ ws2 
]
Nov 22 11:19:10 ws2 pengine: [11265]: notice: short_print:      Stopped: [ 
wwwdrbd:0 ]
Nov 22 11:19:10 ws2 pengine: [11265]: notice: group_print:  Resource Group: 
Webserver
Nov 22 11:19:10 ws2 pengine: [11265]: notice: native_print:      ClusterIP      
(ocf::heartbeat:IPaddr2):       Stopped 
Nov 22 11:19:10 ws2 pengine: [11265]: notice: native_print:      WebFS  
(ocf::heartbeat:Filesystem):    Stopped 
Nov 22 11:19:10 ws2 pengine: [11265]: notice: native_print:      Apache 
(ocf::heartbeat:apache):        Stopped 
Nov 22 11:19:10 ws2 pengine: [11265]: notice: native_print:      MySQL  
(ocf::heartbeat:mysql): Stopped 
Nov 22 11:19:10 ws2 pengine: [11265]: notice: LogActions: Leave resource 
wwwdrbd:0       (Stopped)
Nov 22 11:19:10 ws2 pengine: [11265]: notice: LogActions: Leave resource 
wwwdrbd:1       (Slave ws2)
Nov 22 11:19:10 ws2 pengine: [11265]: notice: LogActions: Leave resource 
ClusterIP       (Stopped)
Nov 22 11:19:10 ws2 pengine: [11265]: notice: LogActions: Leave resource WebFS  
(Stopped)
Nov 22 11:19:10 ws2 pengine: [11265]: notice: LogActions: Leave resource 
Apache  (Stopped)
Nov 22 11:19:10 ws2 pengine: [11265]: notice: LogActions: Leave resource MySQL  
(Stopped)
Nov 22 11:19:51 ws2 crm_attribute: [12794]: info: Invoked: crm_attribute -N 
ws2 -n master-wwwdrbd:1 -l reboot -D 
Nov 22 11:20:51 ws2 crm_attribute: [12823]: info: Invoked: crm_attribute -N 
ws2 -n master-wwwdrbd:1 -l reboot -D 
Nov 22 11:21:51 ws2 crm_attribute: [12852]: info: Invoked: crm_attribute -N 
ws2 -n master-wwwdrbd:1 -l reboot -D 
Nov 22 11:22:51 ws2 crm_attribute: [12881]: info: Invoked: crm_attribute -N 
ws2 -n master-wwwdrbd:1 -l reboot -D 







----------------------------------------------------------------------------------------
Dipl.-Inf. (FH) Florian Götz
Rechenzentrum Hochschule Mannheim
Paul-Wittsack-Straße 10 
68163 Mannheim
Tel: 0621/292-6232       

EMail:  f.go...@hs-mannheim.de
Internet:       http://www.rz.hs-mannheim.de

-----
_______________________________________________
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to