[DRBD-user] drbd, pacemaker, multiple drbd instances.

Christiaan den Besten chris at prolocation.net
Sat Oct 17 10:03:28 CEST 2009

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


For the record, solved it, perhaps nice for others wanting to do the  
same :

- removed the 'colocation c_meta_with_data_10' colocation
- added a group grp_mailstore10 with members 'fs_mailstore10_data' and  
'fs_mailstore10_meta'

I am now able to migrate between nodes by moving the resource  
grp_mailstore10 around ...

bye,
Chris

On Oct 16, 2009, at 1:32 AM, Christiaan den Besten wrote:

> Hi !
>
> I have been trying all night to combine some of the pacemaker crm  
> examples from the drbd manual (combing stuff from the default  
> example to setup a mysql instance with the stacked version :) ... )  
> to setup a configuration which requires -two- drbd volumes to get  
> online on the same node before starting the mailserver daemon.
>
> Basicly I have 2 drbd devices, one for 'maildata' and one for  
> 'metadata'. Both need to be master on the same node, have their  
> filesystems mounted, use ip2 to setup a floating ip-address and  
> start the mail-server daemon.
>
> I came up with the following crm config :
>
> ---
> primitive cyrus-imapd10 lsb:cyrus-imapd10
> primitive drbd_mailstore10_data ocf:linbit:drbd \
>       params drbd_resource="r_mailstore10-data" \
>       op monitor interval="15s"
> primitive drbd_mailstore10_meta ocf:linbit:drbd \
>       params drbd_resource="r_mailstore10-meta" \
>       op monitor interval="15s"
> primitive fs_mailstore10_data ocf:heartbeat:Filesystem \
>       params device="/dev/drbd_mailstore10-data" directory="/ 
> mailstores/mailstore10/data"
> primitive fs_mailstore10_meta ocf:heartbeat:Filesystem \
>       params device="/dev/drbd_mailstore10-meta" directory="/ 
> mailstores/mailstore10/meta"
> primitive ip_mailstore10 ocf:heartbeat:IPaddr2 \
>       params ip="10.0.129.82" nic="eth0"
> ms ms_mailstore10_data drbd_mailstore10_data \
>       meta master-max="1" master-node-max="1" clone-max="2" clone- 
> node-max="1" notify="true"
> ms ms_mailstore10_meta drbd_mailstore10_meta \
>       meta master-max="1" master-node-max="1" clone-max="2" clone- 
> node-max="1" notify="true"
> colocation c_cyrus_with_ip10 inf: cyrus-imapd10 ip_mailstore10
> colocation c_ip_on_meta_10 inf: ip_mailstore10  
> ms_mailstore10_meta:Master
> colocation c_meta_with_data_10 inf: ms_mailstore10_meta  
> ms_mailstore10_data:Master
> colocation fs_mailstore10_data_on_drbd inf: fs_mailstore10_data  
> ms_mailstore10_data:Master
> colocation fs_mailstore10_meta_on_drbd inf: fs_mailstore10_meta  
> ms_mailstore10_meta:Master
> order fs_after_mailstore10_data_on_drbd inf:  
> ms_mailstore10_data:promote fs_mailstore10_data:start
> order fs_after_mailstore10_meta_on_drbd inf:  
> ms_mailstore10_meta:promote fs_mailstore10_meta:start
> order o_cyrus_after_ip_10 inf: ip_mailstore10 cyrus-imapd10:start
> order o_ip_after_meta_10 inf: fs_mailstore10_meta ip_mailstore10:start
> property $id="cib-bootstrap-options" \
>       dc-version="1.0.5-462f1569a43740667daf7b0f6b521742e9eb8fa7" \
>       cluster-infrastructure="openais" \
>       expected-quorum-votes="2" \
>       no-quorum-policy="ignore" \
>       stonith-enabled="false" \
>       default-resource-stickiness="1000" \
>       last-lrm-refresh="1255645853"
> ---
>
> This almost works, I gets up just fine on the primary node. But when  
> I migrate the resource (cyrus-imapd10) to the secondary node, the  
> roles of the 'data' drbd switch nicely, but the 'meta' drbd roles  
> don't. The 'new master' becomes master, but the 'old master' goes to  
> 'unconfigured' state and not 'slave' (so it stops instead of going  
> to secondary). Therefore the migration succeeds, but I can't migrate  
> 'back' since the former master hasn't switched its 'meta' drbd to  
> Secondary but to Unknown (stopped).
>
> I am new with pacemaker's crm, so still trying to get the hang of  
> it .....
>
> I was trying to build it like:
>
>   - Let one node become master for 'data'
>   - Colocate filesystem 'data' with drbd-data-master  
> (fs_mailstore10_data_on_drbd)
>   - Order filesystem mount with master for  
> 'data' (fs_after_mailstore10_data)
>
>   - Colocate 'meta' with master for 'data' node (c_meta_with_data)
>   - Colocate filesystem 'meta' with drbd-meta-master  
> (fs_mailstore10_meta_on_drbd)
>   - Order filesystem mount with master for  
> 'meta' (fs_after_mailstore10_meta)
>
>   - Colocate ip-address with filesystem mount of  
> 'meta' (c_ip_on_meta_10)
>   - Order ip-start on node with 'meta' filesystem mounted  
> (o_ip_after_meta_10)
>   - Colocate cyrus-daemon on node with ip-address (c_cyrus_with_ip10)
>   - Order cyrus start on node with ip-address (o_cyrus_after_ip_10)
>
> Any tips are apprecitated about the configuration above, it 'almost'  
> seems to work :)
>
> bye,
> Chris
>
>
>
>
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user




More information about the drbd-user mailing list