9.2. 복제 토폴로지에서 공급자 제거

복제 토폴로지에서 공급업체를 완전히 제거하는 것은 허브 또는 소비자를 제거하는 것보다 더 어렵습니다. 이는 토폴로지의 모든 공급업체가 다른 공급 업체에 대한 정보를 저장하고 공급 업체를 실수로 사용할 수 없는 경우에도 해당 정보를 유지하기 때문입니다.

Directory Server는 RUV(복제 업데이트 벡터)라는 메타데이터 집합의 복제 토폴로지에 대한 정보를 유지합니다. RUV에는 해당 지역의 ID, URL, 최신 변경 상태 번호(CSN) 및 첫 번째 변경의 CSN과 같은 공급 업체에 대한 정보가 포함되어 있습니다. 공급업체와 소비자 모두 RUV 정보를 저장하고 복제 업데이트를 제어하는 데 사용합니다.

공급업체를 완전히 제거하려면 구성 항목과 함께 메타데이터를 제거해야 합니다.

사전 요구 사항

  • 삭제 방법은 공급업체입니다.
  • 호스트가 토폴로지의 다른 서버에 공급업체 역할을 하는 경우 다른 공급업체 또는 허브를 구성하여 이러한 서버로 데이터를 복제하여 분리되지 않도록 합니다.

절차

  1. 제거할 공급업체의 경우:

    1. 접미사와 해당 데이터베이스를 나열합니다.

      # dsconf -D "cn=Directory Manager" ldap://host-to-remove.example.com backend suffix list
      dc=example,dc=com (userroot)

      데이터베이스 이름을 기록해 둡니다.

    2. 추가 업데이트를 방지하려면 데이터베이스를 읽기 전용 모드로 설정합니다.

      # dsconf -D "cn=Directory Manager" ldap://host-to-remove.example.com backend suffix set --enable-readonly "userroot"
    3. 토폴로지의 다른 모든 서버가 이 공급자로부터 모든 데이터를 수신할 때까지 기다립니다. 확인하려면 다른 서버의 CSN이 공급 업체의 CSN보다 크거나 같은지 확인하려면 다음을 수행하십시오.

      # ds-replcheck online -D "cn=Directory Manager" -w password -m ldap://host-to-remove.example.com:389 -r ldap://server.example.com:389 -b dc=example,dc=com
      ================================================================================
               Replication Synchronization Report  (Tue Mar  5 09:46:20 2021)
      ================================================================================
      
      Database RUV's
      =====================================================
      
      Supplier RUV:
        {replica 1 ldap://host-to-remove.example.com:389} 5c7e8927000100010000 5c7e89a0000100010000
        {replicageneration} 5c7e8927000000010000
      
      Replica RUV:
        {replica 1 ldap://host-to-remove.example.com:389} 5c7e8927000100010000 5c7e8927000400010000
        {replica 2 ldap://server.example.com:389}
        {replicageneration} 5c7e8927000000010000
    4. 복제본 ID를 표시합니다.

      # dsconf -D "cn=Directory Manager" ldap://host-to-remove.example.com replication get --suffix "dc=example,dc=com" | grep -i "nsds5replicaid"
      nsDS5ReplicaId: 1

      이 예에서 복제 ID는 1 입니다. 이 절차의 마지막 단계에 대한 복제본 ID를 기록하십시오.

  2. 삭제하려는 호스트와 복제 계약에 동의한 모든 공급업체에서 다음을 수행합니다.

    1. 복제된 접미사의 복제 계약을 나열합니다.

      # dsconf -D "cn=Directory Manager" ldap://server.example.com 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
      ...

      cn 속성에는 다음 단계에서 필요한 복제 계약 이름이 포함되어 있습니다.

    2. 복제 계약을 제거합니다.

      # dsconf -D "cn=Directory Manager" ldap://server.example.com repl-agmt delete --suffix "dc=example,dc=com" example-agreement
  3. 제거할 공급업체에서 모든 접미사에 대한 복제를 비활성화합니다.

    # dsconf -D "cn=Directory Manager" ldap://host-to-remove.example.com replication disable --suffix "dc=example,dc=com"

    복제를 비활성화하면 이 서버에서 이 접미사에 대한 모든 복제 계약도 자동으로 삭제됩니다.

  4. 진행하기 전에 ds-replcheck 출력의 Replica RUV 섹션에 나열된 모든 Directory Server 인스턴스가 온라인 상태인지 확인합니다.
  5. 토폴로지의 나머지 공급업체 중 하나에서 복제본 ID의 RUV를 정리합니다.

    # dsconf -D "cn=Directory Manager" ldap://server.example.com repl-tasks cleanallruv --suffix "dc=example,dc=com" --replica-id 1

    이 명령을 실행하려면 이 절차의 이전 단계에 표시된 복제본 ID를 지정해야 합니다.

검증

  • ds-replcheck 명령 출력에서 제거한 호스트의 복제본 ID 및 URL이 있는 항목이 남아 있지 않은지 확인합니다.

    # ds-replcheck online -D "cn=Directory Manager" -w password -m ldap://host-to-remove.example.com:389 -r ldap://server.example.com:389 -b dc=example,dc=com

다음 단계

  • 테스트 목적으로 삭제된 인스턴스를 사용하려면 읽기 전용 모드를 비활성화합니다.

    # dsconf -D "cn=Directory Manager" ldap://host-to-remove.example.com backend suffix set --disable-readonly userroot
    중요

    테스트 목적으로 토폴로지에서 제거한 인스턴스를 사용하려는 경우 클라이언트가 계속 사용하지 않아야 합니다.

  • 인스턴스를 제거합니다.

    # dsctl instance_name remove --do-it