[Pacemaker] Multiple DRBD resources how best to configure resources on top.

Brett Delle Grazie brett.dellegrazie at gmail.com
Mon Feb 21 12:45:49 EST 2011


Forgot to add:

RHEL 5.6, pacemaker 1.0.10, drbd 8.3.10, kernel 2.6.18-238.1.1.el5

On 21 February 2011 17:44, Brett Delle Grazie
<brett.dellegrazie at gmail.com> wrote:
> Hi,
>
> If I have two DRBD resources:
> resourceA
> resourceB
>
> What's the best way to configure the constraints in pacemaker so that
> a tomcat resource, which serves both of them when mounted,
> will not be started unless they are both present? My current
> configuration (below) fails to migrate correctly when drbd_B fails due
> to network glitch
> and tomcat fails to stop.  In this case, the demote on drbd_B fails
> because the directory is still mounted and I end up with a split brain
> scenario.  Basically I want to force drbd_A and drbd_B to be master on
> the same system.
>
> Currently I have:
> node nodeA
> node nodeB
>
> primitive drbd_A ocf:linbit:drbd \
>        params drbd_resource="A" \
>        op start interval="0" timeout="240" \
>        op stop interval="0" timeout="100" \
>        op monitor interval="30"
> primitive drbd_B ocf:linbit:drbd \
>        params drbd_resource="B" \
>        op start interval="0" timeout="240" \
>        op stop interval="0" timeout="100" \
>        op monitor interval="30"
>
> primitive fs_A ocf:heartbeat:Filesystem \
>        params device="/dev/drbd/by-res/A" directory="/mnt/A"
> fstype="ext3" options="defaults,noatime" \
>        op start interval="0" timeout="60" \
>        op stop interval="0" timeout="60" \
>        op monitor interval="60" timeout="40" depth="0"
> primitive fs_B ocf:heartbeat:Filesystem \
>        params device="/dev/drbd/by-res/B" directory="/mnt/B"
> fstype="ext3" options="defaults,noatime" \
>        op start interval="0" timeout="60" \
>        op stop interval="0" timeout="60" \
>        op monitor interval="60" timeout="40" depth="0"
>
> primitive tomcat_tc1 ocf:heartbeat:tomcat \
>        params tomcat_user="tomcat" catalina_home="/opt/tomcat6"
> catalina_base="/home/tomcat/tc1"
> catalina_pid="/home/tomcat/tc1/temp/tomcat.pid"
> catalina_rotate_log="NO" script_log="/home/tomcat/tc1/logs/tc1.log"
> statusurl="http://localhost/manager/serverinfo"
> java_home="/usr/lib/jvm/java" \
>        op start interval="0" timeout="60" \
>        op stop interval="0" timeout="20" \
>        op monitor interval="60" timeout="30" start-delay="60"
> primitive vip_1 ocf:heartbeat:IPaddr2 \
>        params ip="10.xx,xx,xx" nic="bond0" iflabel="3" \
>        op monitor interval="10" timeout="20"
> group grp_1 fs_A fs_B vip_1 tomcat_tc1
>
> ms ms_drbd_A drbd_A \
>        meta master-max="1" master-node-max="1" clone-max="2"
> clone-node-max="1" notify="true"
> ms ms_drbd_B drbd_B \
>        meta master-max="1" master-node-max="1" clone-max="2"
> clone-node-max="1" notify="true"
>
> location loc_ms_drbd_A ms_drbd_A 100: nodeA
> location loc_ms_drbd_B ms_drbd_B 100: nodeA
>
> colocation A_on_drbdA inf: grp_1 ms_drbd_A:Master
> colocation B_on_drbdB inf: grp_1 ms_drbd_B:Master
>
> order A_after_drbdA inf: ms_drbd_A:promote grp_1:start
>
> Is there a better way to configure this?
>
> Thanks for any help  /pointers.
>
> --
> Best Regards,
>
> Brett Delle Grazie
>



-- 
Best Regards,

Brett Delle Grazie




More information about the Pacemaker mailing list