3.3. 명령줄을 사용하여 새 서버를 기존 서버의 공급자로 구성
새 서버 provider 2.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--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 <supplier2_instance_name> repl-agmt init-status --suffix "dc=example,dc=com" example-agreement-supplier2-to-supplier1 Agreement successfully initialized.복제 상태를 표시합니다.
# dsconf <supplier2_instance_name> 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복제 상태및마지막 업데이트 상태필드를 확인합니다.
문제 해결
기본적으로 서버의 모든 계약에 대한 복제 유휴 시간 제한은 1시간입니다. 시간 초과로 인해 대규모 데이터베이스 초기화가 실패하는 경우
nsslapd-idletimeout매개변수를 더 높은 값으로 설정합니다. 예를 들어 매개변수를7200(2시간)으로 설정하려면 다음을 입력합니다.# dsconf <supplier2_instance_name> config replace nsslapd-idletimeout=7200무제한 기간을 설정하려면
nsslapd-idletimeout을0으로 설정합니다.