Le 20/03/2013 00:51, Andreas Kurz a écrit :
> 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
> 

Hello,

        thanks for the slapd mirror idea it's works but I hava got one problem,
when one server stop I can continue to add information in the first one,
and when the second server failback It doesn't resync data automaticaly.

I have to manualy done that :

crn node standby ldap01-server
cd /var/lib/ldap
rm -rf __db.00* log.* *.bdb
crm node online ldap01-server


Sincerely
-- 
                         ''~``
                        ( o o )
+------------------.oooO--(_)--Oooo.---------------------+
| Guillaume Chéramy - Guidtz                             |
| French open source system administrator                |
| E-Mail : [email protected]                        |
| Website : http://blog.cheramy.name                     |
|                                                        |
|                    (   )                               |
+---------------------\ (----(   )-----------------------+
                       \_)    ) /
                             (_/
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to