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.
  1. Make sure there are no updates in progress.
  2. Stop the supplier server.
  3. 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/
  4. 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
  5. Stop the Directory Server instance:
    # systemctl stop dirsrv
  6. 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 file dse.ldif.bak. Directory Server uses this file name to keep a known working copy of the dse.ldif file.
  7. Edit the /etc/dirsrv/slapd-instance_name/dse.ldif file.
    1. Search for replication agreements. For example:
      dn: cn=replica,cn=dc\5c3Dexample\5c2Cdc\5c3Dcom,cn=mapping tree,cn=config
    2. Remove the line containing the nsState attribute from every replication agreement.
  8. Start the Directory Server instance:
    # systemctl start dirsrv.target
  9. Monitor the error log file for error messages. For details, see Section E.2.3, “Viewing Logs”.
    If the replication fails:
    1. Remove the changelog configuration: Section 15.15, “Removing the Changelog”.
    2. Restart the Directory Server and Admin Console:
      # systemctl restart dirsrv.target
      # systemctl restart dirsrv-admin.service
    3. Create replication agreements: Section 15.3, “Replication Scenarios”.