Show Table of Contents
15.11. Making a Read-Only Replica Updatable
Making a read-only server writable means changing the replica from a dedicated consumer or a hub to a supplier.
- Make sure there are no updates in progress.
- Stop the supplier server.
- Enable the change log:
# ldapmodify -D "cn=Directory Manager" -W -p 389 -h server.example.com -x dn: cn=changelog5,cn=config changetype: add objectClass: top objectClass: extensibleObject cn: changelog5 nsslapd-changelogdir: /var/lib/dirsrv/slapd-instance_name/changelogdb/
- Change the replica role:
- To a single master:
# ldapmodify -D "cn=Directory Manager" -W -p 389 -h server.example.com -x dn: cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config changetype: modify replace: nsDS5ReplicaType nsDS5ReplicaType: 3 - replace: nsDS5Flags nsDS5Flags: 1 - replace: nsDS5ReplicaId nsDS5ReplicaId: unique_replica_id - delete: nsDS5ReplicaBindDN
- To a multi master:
# ldapmodify -D "cn=Directory Manager" -W -p 389 -h server.example.com -x dn: cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config changetype: modify replace: nsDS5ReplicaType nsDS5ReplicaType: 3 - replace: nsDS5Flags nsDS5Flags: 1 - replace: nsDS5ReplicaId nsDS5ReplicaId: unique_replica_id - replace: nsDS5ReplicaBindDN nsDS5ReplicaBindDN: cn=Replication Manager,cn=config
- Stop the Directory Server instance:
# systemctl stop dirsrv
- Back up the
/etc/dirsrv/slapd-instance/dse.ldif
file:# cp /etc/dirsrv/slapd-instance_name/dse.ldif \ /etc/dirsrv/slapd-instance_name/dse.ldif-1
Do not name the backup filedse.ldif.bak
. Directory Server uses this file name to keep a known working copy of thedse.ldif
file. - Edit the
/etc/dirsrv/slapd-instance_name/dse.ldif
file.- Search for replication agreements. For example:
dn: cn=replica,cn=dc\5c3Dexample\5c2Cdc\5c3Dcom,cn=mapping tree,cn=config
- Remove the line containing the
nsState
attribute from every replication agreement.
- Start the Directory Server instance:
# systemctl start dirsrv.target
- Monitor the error log file for error messages. For details, see Section E.2.3, “Viewing Logs”.If the replication fails:
- Delete all replication agreements: Section 15.12, “Removing a Supplier from the Replication Topology”.
- Disable replication: Section 15.9, “Disabling and Re-enabling a Replication Agreement”.
- Remove the changelog configuration: Section 15.15, “Removing the Changelog”.
- Restart the Directory Server and Admin Console:
# systemctl restart dirsrv.target # systemctl restart dirsrv-admin.service
- Enable replication: Section 15.9, “Disabling and Re-enabling a Replication Agreement”.
- Create replication agreements: Section 15.3, “Replication Scenarios”.