9.3. コマンドラインを使用したレプリカのデモート
以下のようにデモートできます。
- サプライヤーまたはハブをコンシューマーへ
- ハブをコンシューマーへ
このセクションでは、dc=example,dc=com
接尾辞のレプリカをデモートする方法を説明します。
前提条件
- Directory Server インスタンスがレプリケーショントポロジーのメンバーである。
- デモートするレプリカがサプライヤーまたはハブである。
手順
デモートするレプリカに必要なくなったレプリカ合意がある場合は、たとえばレプリカをコンシューマーにデモートする場合、レプリカ合意を削除します。
レプリカのレプリカ合意をリスト表示します。
dsconf <instance_name> repl-agmt list --suffix "dc=example,dc=com"
# dsconf <instance_name> repl-agmt list --suffix "dc=example,dc=com" dn: cn=example-agreement,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config cn: example-agreement ...
Copy to Clipboard Copied! Toggle word wrap Toggle overflow cn
属性には、次の手順に必要なレプリカ合意名が含まれます。レプリカからレプリカ合意を削除します。
dsconf <instance_name> repl-agmt delete --suffix "dc=example,dc=com" example-agreement
# dsconf <instance_name> repl-agmt delete --suffix "dc=example,dc=com" example-agreement
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
インスタンスをデモートします。
dsconf <instance_name> replication demote --suffix "dc=example,dc=com" --newrole "hub_or_consumer"
# dsconf <instance_name> replication demote --suffix "dc=example,dc=com" --newrole "hub_or_consumer"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 設定するロールに応じて
--newrole
パラメーターをhub
またはconsumer
に設定します。- レプリカをハブとして設定していて、トポロジー内の他のホストに更新を送信する必要がある場合は、レプリカ合意を作成します。