You do have to stop the master to add a slave, no way around it. The
master creates the replog, and the replog contains the list of hosts to
replicate to. My procedure for adding slaves is as follows:
-
Change slapd.conf to list the new slave.
-
Stop slurpd and manually edit slurpd.status, copying the line of
and existing slave, changing the name to match the new slave.
-
Stop slapd on an existing slave. Copy the database to the new
slave. Start slapd on both slaves.
-
Restart slapd on the master.
-
Restart slurpd.
By, for instance, creating an "administrative" slave, you can always
take down a non-production slave to do copies. Also, stopping the master
only causes writes to fail, not reads -- presuming that you direct
most or all read traffic to read-only slaves.
|
One thing I haven't noticed mentioned in the instructions here or in the Admin Guide is that the placement of the replica (and probably the replog ) is important. It must be after the database specification which it is replicating. When running slurpd -d 255 , the following message was issued:
Replica ldap.example.com:389, skip repl record for UID=BJENSEN,OU=PEOPLE,DC=EXAMPLE,DC=COM (not mine)
You might also notice the replog entries lack the required replica entry, before the change to be make.
Note: this comment is only partially correct and might be misleading. See this comment.
|