Hi, On Tue, Apr 27, 2010 at 10:51:29AM +0200, Frank Lazzarini wrote: > Hey everyone, > > I've got a technical question. In short is it possible to colocate a > group to two master slave resources. I know it's an awkward question. > But in my case I have two drbd resource to two different masterslave > resources (because I use two different hard drives for the two drbd > resources), so what I want is that both filesystems, the virtual ip and > the samba resource are always started and only started when both master > slave resources are master on the same node. (weird right) > > Maybe someone has an idea to solves this otherwise, and I am maybe not > thinking right. Here's my crm for the moment (would be nice to have > color coding in the mails somehow :) ) > > > node $id="73288296-569b-41f5-8b14-cf2f0fac8cf7" db01 > node $id="a276707f-f3fd-4726-a7c1-8147c03a6336" db02 > primitive drbd0 ocf:linbit:drbd \ > params drbd_resource="r0" > primitive drbd1 ocf:linbit:drbd \ > params drbd_resource="r1" > primitive fs0 ocf:heartbeat:Filesystem \ > params device="/dev/drbd0" directory="/data/database" fstype="ext4" > primitive fs1 ocf:heartbeat:Filesystem \ > params device="/dev/drbd1" directory="/data/documents" > fstype="ext4" options="acl" > primitive ip ocf:heartbeat:IPaddr2 \ > params ip="10.80.80.73" nic="eth0" > primitive samba ocf:heartbeat:anything \ > params binfile="/usr/sbin/smbd" > group cluster ip fs0 fs1 samba > ms ms-drbd0 drbd0 \ > meta master-max="1" master-node-max="1" clone-max="2" > clone-node-max="1" notify="true" target-role="Master" > ms ms-drbd1 drbd1 \ > meta master-max="1" master-node-max="1" clone-max="2" > clone-node-max="1" notify="true" > location ms-drbd0-master-on-db01 ms-drbd0 \ > rule $id="ms-drbd0-master-on-db01-rule" $role="master" 100: > #uname eq db01 > location ms-drbd1-master-on-db01 ms-drbd1 \ > rule $id="ms-drbd1-master-on-db01-rule" $role="master" 100: > #uname eq db01 > colocation cluster-with-drbdmaster inf: cluster ms-drbd0:Master > order ms-drbd0-before-cluster inf: ms-drbd0:promote cluster:start
This is what I would do: # group svc samba ip? group svc ip samba colocation fs0-with-drbd0 inf: fs0 ms-drbd0:Master order drbd0-before-fs0 inf: ms-drbd0:promote fs0:start colocation fs1-with-drbd1 inf: fs1 ms-drbd1:Master order drbd1-before-fs1 inf: ms-drbd1:promote fs1:start # these two are resource sets # (perhaps reference svc instead of samba?) order fs-before-smb inf: ( fs0 fs1 ) samba colocation smb-with-fs inf: samba ( fs0 fs1 ) This configuration allows the two filesystems to start/stop independently (and in parallel). However, one issue is that stopping one of them would stop the service too (samba). Don't know how to keep samba running with only one filesystem available. Test the configuration thoroughly! Thanks, Dejan > property $id="cib-bootstrap-options" \ > dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \ > cluster-infrastructure="Heartbeat" \ > stonith-enabled="false" \ > no-quorum-policy="ignore" \ > last-lrm-refresh="1272034422" > > > > > here is crm_mon (perhaps it helps to get the idea without reading the > whole crm configure thingie) > > > Online: [ db02 db01 ] > > Master/Slave Set: ms-drbd0 > Masters: [ db01 ] > Slaves: [ db02 ] > Master/Slave Set: ms-drbd1 > Masters: [ db01 ] > Slaves: [ db02 ] > Resource Group: cluster > ip (ocf::heartbeat:IPaddr2): Started db01 > fs0 (ocf::heartbeat:Filesystem): Started db01 > fs1 (ocf::heartbeat:Filesystem): Started db01 > samba (ocf::heartbeat:anything): Started db01 > > > > Cheers everyone > > > > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
