http://tldp.org/HOWTO/Kerberos-Infrastructure-HOWTO/server-replication.html
Ergaenzungen:
In /etc/inetd.conf muss folgende Zeile sein:
krb5_prop stream tcp nowait root /usr/sbin/kpropd kpropd
inetd muss neu gestartet werden.
kpropd.acl muss bei Debian unter /etc/krb5kdc/kpropd.acl liegen.
In kpropd.acl muss der kanonical name (Ausgabe von /bin/hostname) des Adminservers eingetragen werden, nicht ein alias.
In /etc/krb5.conf kann aber der alias für kdc = ... benutzt werden.
/etc/krb5kdc/stash muss vom Kerberos Adminserver (Hauptserver) auf den zweiten Kerberosserver kopiert werden.
Zuerst muss ein weiterer AFS-Server eingerichtet werden, wie im entsprechenden Kapitel beschrieben.
Nun können Readonly-Replikationen erstellt werden. Das heisst, ein AFS-Volume wird auf einen zweiten Server kopiert. Beim lesenen Zugriff wird die Last nachher auf beide Server verteilt, bei schreibendem Zugriff wird auf den Hauptserver geschrieben.
Beispiel mit qloc als zweitem Server:
vos addsite qloc /vicepb root.afs # legt die Replikation auf Server qloc an vos release root.afs # Synchronisiert die Replikation mit dem Original
ACHTUNG: Daten müssen periodisch mit ``vos release <volumename>'' synchronisiert werden.
Werden Daten geschrieben, sind diese zuerst nur auf dem Hauptserver verfügbar. Ein Client, der eine Replikation verwendet, sieht noch die alte Version. Erst ein ``vos release <volumename>'' synchronisiert die Daten wieder.
DIESE ART REPLIKATION IST DESHALB NICHT FUER DYNAMISCHE VERZEICHNISSE WIE HOME ODER SIGNALS GEEIGNET
Ich empfehle aber zumindest root.afs und root.cell zu replizieren, damit die AFS-Zelle auch funktioniert, wenn der Hauptserver ausfällt.
Das LDAP-Verzeichnis kann von einem Masterserver auf mehrere Slaves repliziert werden. Wir verwenden den Syncrepl Mechanismus.
Auf dem Hauptserver muss folgendes in /etc/ldap/slapd.conf eingetragen werden:
# Schema and objectClass definitions include /etc/ldap/schema/core.schema include /etc/ldap/schema/cosine.schema include /etc/ldap/schema/nis.schema include /etc/ldap/schema/inetorgperson.schema # Schema check allows for forcing entries to # match schemas for their objectClasses's schemacheck on # Where the pid file is put. The init.d script # will not stop the server if you change this. pidfile /var/run/slapd/slapd.pid # List of arguments that were passed to the server argsfile /var/run/slapd.args # Read slapd.conf(5) for possible values loglevel 0 # Where the dynamically loaded modules are stored modulepath /usr/lib/ldap moduleload back_bdb ####################################################################### # Specific Backend Directives for bdb: # Backend specific directives apply to this backend until another # 'backend' directive occurs backend bdb checkpoint 512 30 ####################################################################### # Specific Backend Directives for 'other': # Backend specific directives apply to this backend until another # 'backend' directive occurs #backend <other> ####################################################################### # Specific Directives for database #1, of type bdb: # Database specific directives apply to this databasse until another # 'database' directive occurs database bdb # The base of your directory in database #1 suffix "dc=sed,dc=ethz,dc=ch" rootdn "cn=Manager,dc=sed,dc=ethz,dc=ch" rootpw "daspasswort" # Where the database file are physically stored for database #1 directory "/var/lib/ldap" # Indexing options for database #1 index objectClass eq # Save the time that the entry gets modified, for database #1 lastmod on # sessionlog is needed for syncrepl sessionlog 123 999 access to attrs=userPassword by dn="cn=admin,dc=sed,dc=ethz,dc=ch" write by dn="cn=Manager,dc=sed,dc=ethz,dc=ch" write by anonymous auth by self write by * none access to dn.base="" by * read access to * by dn="cn=admin,dc=sed,dc=ethz,dc=ch" write by * read
Auf den Replikationsservern muss folgendes in /etc/ldap/slapd.conf eingetragen werden:
# Schema and objectClass definitions include /etc/ldap/schema/core.schema include /etc/ldap/schema/cosine.schema include /etc/ldap/schema/nis.schema include /etc/ldap/schema/inetorgperson.schema # Where the pid file is put. The init.d script # will not stop the server if you change this. pidfile /var/run/slapd/slapd.pid # List of arguments that were passed to the server argsfile /var/run/slapd.args # Read slapd.conf(5) for possible values loglevel 0 # Where the dynamically loaded modules are stored modulepath /usr/lib/ldap moduleload back_bdb moduleload back_monitor #moduleload syncprov.la #moduleload back_ldap # We don't need any access to this DSA #restrict "all" # consumer proxy database definitions backend bdb checkpoint 512 30 database bdb suffix "dc=sed,dc=ethz,dc=ch" rootdn "cn=Manager,dc=sed,dc=ethz,dc=ch" rootpw "daspasswort" # Where the database file are physically stored for database #1 directory "/var/lib/ldap" # Indexing options for database #1 index objectClass eq # Save the time that the entry gets modified, for database #1 lastmod on access to attrs=userPassword by dn="cn=admin,dc=sed,dc=ethz,dc=ch" write # by dn="cn=Manager,dc=sed,dc=ethz,dc=ch" write by anonymous auth by self write by * none access to dn.base="" by * read access to * by dn="cn=admin,dc=sed,dc=ethz,dc=ch" write by * read # HACK: use the RootDN of the monitor database as UpdateDN so ACLs apply # without the need to write the UpdateDN before starting replication acl-bind bindmethod=simple binddn="cn=Monitor" credentials=monitor # HACK: use the RootDN of the monitor database as UpdateDN so ACLs apply # without the need to write the UpdateDN before starting replication syncrepl rid=1 provider=ldap://ldap.seismo.ethz.ch:389 type=refreshOnly interval=00:00:05:00 binddn="cn=Manager,dc=sed,dc=ethz,dc=ch" bindmethod=simple credentials=daspasswort searchbase="dc=sed,dc=ethz,dc=ch" filter="(objectClass=*)" attrs="*,structuralObjectClass,entryUUID,entryCSN,creatorsName,createTimestamp,modifiersName,modifyTimestamp" schemachecking=off scope=sub type=refreshAndPersist retry="5 5 300 5" #overlay syncprov database monitor
Stefan Heimers 2011-02-25