3.3. コマンドラインを使用した、新規サーバーの既存サーバーに対するサプライヤーとしての設定
新しいサーバー supplier2.example.com
をサプライヤーとして準備するには、次のいずれかの方法を使用します。
- 接尾辞のレプリケーションを有効にします。
- 既存サーバーへのレプリカ合意を作成します。
新しいサーバーから既存のサプライヤーを初期化しないでください。それ以外の場合は、新規サーバーの空のデータベースは、既存のサプライヤーのデータベースを上書きします。
既存のサプライヤーに以下の手順を適用します。
- 新しいサーバーへのレプリカ合意を作成します。
- 新しいサーバーを初期化します。
前提条件
-
新規サーバーで
dc=example,dc=com
接尾辞のレプリケーションを有効にしている。 -
既存のサーバーで
dc=example,dc=com
接尾辞のレプリケーションを有効にしている。 - 参加する新しいサーバーが正常に初期化されている。
手順
レプリカ合意を既存のインスタンスに追加します。
dsconf <supplier2_instance_name> 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
# dsconf <supplier2_instance_name> 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow --init
オプションを使用して、新しいインスタンスにレプリカ合意を追加します。dsconf <supplier1_instance_name> 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
# dsconf <supplier1_instance_name> 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
検証
合意のステータスを表示します。
dsconf <supplier2_instance_name> repl-agmt init-status --suffix "dc=example,dc=com" example-agreement-supplier2-to-supplier1
# dsconf <supplier2_instance_name> repl-agmt init-status --suffix "dc=example,dc=com" example-agreement-supplier2-to-supplier1 Agreement successfully initialized.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow レプリケーションのステータスを表示します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replication Status
フィールドおよびLast Update Status
フィールドを確認します。
トラブルシューティング
デフォルトでは、サーバー上のすべての合意に対するレプリケーションアイドルタイムアウトは 1 時間です。タイムアウトが原因で大規模なデータベースの初期化が失敗する場合は、
nsslapd-idletimeout
パラメーターをより高い値に設定します。たとえば、パラメーターを7200
(2 時間) に設定するには、次のコマンドを実行します。dsconf <supplier2_instance_name> config replace nsslapd-idletimeout=7200
# dsconf <supplier2_instance_name> config replace nsslapd-idletimeout=7200
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 無制限の期間を設定するには、
nsslapd-idletimeout
を0
に設定します。