3.2. コマンドラインを使用した、既存サーバーの新規サーバーに対するサプライヤーとしての設定
既存のサーバー supplier1.example.com
をサプライヤーとして準備するには、次のことを行う必要があります。
- 接尾辞のレプリケーションを有効にします。
- 新規サプライヤーへのレプリカ合意を作成します。
- 新しいサプライヤーを初期化します。
レプリケーショントポロジーの既存のサプライヤーでこの手順を実行します。
前提条件
-
参加するサプライヤーで
dc=example,dc=com
接尾辞のレプリケーションを有効にしている。
手順
dc=example,dc=com
接尾辞のレプリケーションを有効にします。dsconf <supplier1_instance_name> replication enable --suffix "dc=example,dc=com" --role "supplier" --replica-id 2 --bind-dn "cn=replication manager,cn=config" --bind-passwd "password"
# dsconf <supplier1_instance_name> replication enable --suffix "dc=example,dc=com" --role "supplier" --replica-id 2 --bind-dn "cn=replication manager,cn=config" --bind-passwd "password"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow このコマンドは、
supplier1.example.com
ホストをdc=example,dc=com
接尾辞のサプライヤーとして設定し、このエントリーのレプリカ ID を2
に設定します。また、このコマンドは、指定したパスワードを持つcn=replication manager,cn=config
ユーザーを作成し、このアカウントが接尾辞の変更をこのホストにレプリケートするのを許可します。重要トポロジー内のすべてのサプライヤーにわたって、1 つの接尾辞に対するレプリカ ID は
1
から65534
の間の一意の整数である必要があります。レプリカ合意を追加し、新規サーバーを初期化します。
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 このコマンドは、
example-agreement-supplier1-to-supplier2
という名前のレプリカ合意を作成します。レプリカ合意は、新規サプライヤーのホスト名、プロトコル、新規サプライヤーへのデータの接続や複製時にサプライヤーが使用する認証情報などの設定を定義します。この合意の作成後、Directory Server は
supplier2.example.com
を初期化します。複製するデータ量によっては、初期化に時間がかかる場合があります。
検証
レプリケーション設定を表示します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow これらのパラメーターは以下を示しています。
-
nsDS5ReplicaBindDN
は、レプリケーションマネージャーアカウントを指定します。 -
nsDS5ReplicaRoot
は、レプリケートされる接尾辞を設定します。 -
nsDS5ReplicaType
を3
に設定して、このホストがサプライヤーであることを定義します。
-
初期化が成功したかどうかを確認します。
dsconf <supplier1_instance_name> repl-agmt init-status --suffix "dc=example,dc=com" example-agreement-supplier1-to-supplier2
# dsconf <supplier1_instance_name> repl-agmt init-status --suffix "dc=example,dc=com" example-agreement-supplier1-to-supplier2 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 <supplier1_instance_name> config replace nsslapd-idletimeout=7200
# dsconf <supplier1_instance_name> config replace nsslapd-idletimeout=7200
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 無制限の期間を設定するには、
nsslapd-idletimeout
を0
に設定します。