3.3. コマンドラインを使用した、新規サーバーの既存サーバーに対するサプライヤーとしての設定

新しいサーバー supplier2.example.com をサプライヤーとして準備するには、次のいずれかの方法を使用します。

  • 接尾辞のレプリケーションを有効にします。
  • 既存サーバーへのレプリカ合意を作成します。
警告

新しいサーバーから既存のサプライヤーを初期化しないでください。それ以外の場合は、新規サーバーの空のデータベースは、既存のサプライヤーのデータベースを上書きします。

既存のサプライヤーに以下の手順を適用します。

  • 新しいサーバーへのレプリカ合意を作成します。
  • 新しいサーバーを初期化します。

前提条件

  • 新規サーバーで dc=example,dc=com 接尾辞のレプリケーションを有効にしている。
  • 既存のサーバーで dc=example,dc=com 接尾辞のレプリケーションを有効にしている。
  • 参加する新しいサーバーが正常に初期化されている。

手順

  • レプリカ合意を既存のインスタンスに追加します。

    # dsconf -D "cn=Directory Manager" ldap://supplier2.example.com repl-agmt create --suffix "dc=example,dc=com" --host "supplier1.example.com" --port 389 --conn-protocol LDAP --bind-dn "cn=replication manager,cn=config" --bind-passwd "password" --bind-method SIMPLE example-agreement-supplier2-to-supplier1
  • --init オプションを使用して、新しいインスタンスにレプリカ合意を追加します。

    # dsconf -D "cn=Directory Manager" ldap://supplier1.example.com repl-agmt create --suffix "dc=example,dc=com" --host "supplier2.example.com" --port 389 --conn-protocol LDAP --bind-dn "cn=replication manager,cn=config" --bind-passwd "password" --bind-method SIMPLE --init example-agreement-supplier1-to-supplier2

検証

  1. 合意のステータスを表示します。

    # dsconf -D "cn=Directory Manager" ldap://supplier2.example.com repl-agmt init-status --suffix "dc=example,dc=com" example-agreement-supplier2-to-supplier1
    Agreement successfully initialized.
  2. レプリケーションのステータスを表示します。

    # dsconf -D "cn=Directory Manager" ldap://supplier2.example.com repl-agmt status --suffix "dc=example,dc=com" example-agreement-supplier2-to-supplier1
    Status For Agreement: ""example-agreement-supplier2-to-supplier1 (supplier1.example.com:389)
    Replica Enabled: on
    Update In Progress: FALSE
    Last Update Start: 20210331073540Z
    Last Update End: 20210331073540Z
    Number Of Changes Sent: 7:1/0
    Number Of Changes Skipped: None
    Last Update Status: Error (0) Replica acquired successfully: Incremental update succeeded
    Last Init Start: 20210331073535Z
    Last Init End: 20210331073539Z
    Last Init Status: Error (0) Total update succeeded
    Reap Active: 0
    Replication Status: Not in Synchronization: supplier (60642649000000070000) consumer (Unavailable) State (green) Reason (error (0) replica acquired successfully: incremental update succeeded)
    Replication Lag Time: Unavailable

    Replication Status フィールドおよび Last Update Status フィールドを確認します。

トラブルシューティング

  1. デフォルトでは、サーバー上のすべての合意に対するレプリケーションアイドルタイムアウトは 1 時間です。タイムアウトが原因で大規模なデータベースの初期化が失敗する場合は、nsslapd-idletimeout パラメーターをより高い値に設定します。たとえば、パラメーターを 7200(2 時間) に設定するには、次のコマンドを実行します。

    # dsconf -D "cn=Directory Manager" ldap://supplier2.example.com config replace nsslapd-idletimeout=7200

    無制限の期間を設定するには、nsslapd-idletimeout0 に設定します。