On 2013-03-18 16:53, [email protected] wrote: > Hello, > > I'll try for a week to make a cluster with 2 servers for slapd HA. > ldap01 is the master slapd server, ldap02 is a replica server. All is ok > with Debian and /etc/ldap/slapd.conf configuration. > > So now I wants if ldap01 fail that ldap02 became master for continue to > add data in ldap database. And if ldap01 failback I wants it became > slave of ldap02 for resync data. > > So I'll try this configuration with pacemaker multi-state with this > configuration : > > # crm configure show > node ldap01 \ > attributes standby="off" > node ldap02 \ > attributes standby="off" > primitive LDAP-SERVER ocf:custom:slapd-ms \ > op monitor interval="30s" > primitive VIP-1 ocf:heartbeat:IPaddr2 \ > params ip="10.0.2.30" broadcast="10.0.2.255" nic="eth0" > cidr_netmask="24" iflabel="VIP1" \ > op monitor interval="30s" timeout="20s" > ms MS-LDAP-SERVER LDAP-SERVER \ > params config="/etc/ldap/slapd.conf" lsb_script="/etc/init.d/slapd" \ > meta clone-max="2" clone-node-max="1" master-max="1" > master-node-max="1" notify="false" target-role="Master" > colocation LDAP-WITH-IP inf: VIP-1 MS-LDAP-SERVER > order LDAP-AFTER-IP inf: VIP-1 MS-LDAP-SERVER > property $id="cib-bootstrap-options" \ > dc-version="1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff" \ > cluster-infrastructure="openais" \ > expected-quorum-votes="2" \ > stonith-enabled="false" \ > no-quorum-policy="ignore" \ > last-lrm-refresh="1363619724" > > I use a ocf slapd-ms script provided by this article : > http://foaa.de/old-blog/2010/10/intro-to-pacemaker-part-2-advanced-topics/trackback/index.html#master-slave-primus-inter-pares >
"interesting" setup and resource agent .... you should really go with the well tested slapd resource agent that comes with the resource-agent package, use slapd as a clone resource and setup slapd to run in mirror-mode. Regards, Andreas -- Need help with Pacemaker? http://www.hastexo.com/now > So my problem is that all the deux nodes start as Slaves for > MS-LDAP-SERVER : > > Last updated: Mon Mar 18 16:53:05 2013 > Last change: Mon Mar 18 16:53:01 2013 via crmd on ldap02 > Stack: openais > Current DC: ldap01 - partition with quorum > Version: 1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff > 2 Nodes configured, 2 expected votes > 3 Resources configured. > ============ > > Online: [ ldap01 ldap02 ] > > VIP-1 (ocf::heartbeat:IPaddr2): Started ldap01 > Master/Slave Set: MS-LDAP-SERVER [LDAP-SERVER] > Slaves: [ ldap01 ldap02 ] > > Could somone helps me ? > > Thanks > _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
