To utilize replication, a replication server needs to be installed. It consists of an LDAP server. The Globus Toolkit 2.2 provides an LDAP server than can be used for this purpose. See “Installation” on page 211. In the Globus Toolkit 2.2 the GSI security infrastructure is not used to modify entries in the LDAP repository. Consequently, a password and an LDAP administrator need to be defined for the replica server. It will be used each time from the client side to perform write operations to the LDAP tree.
The Globus Toolkit 2.2 provides a single shell command for manipulating replica catalog objects. The format of the command is:
globus-replica-catalog HOST OBJECT ACTION
Where:
HOST specifies the logical collection in the replica catalog as well of the information needed to connect to the LDAP server (a user and a password). The Globus Toolkit V2.2 uses an LDAP directory so the URL for a collection follows the format ldap://host:[port]/dn where dn is the distinguished name of the collection. The HOST format is therefore:
-host <collection URL> -manager <manager DN> -password <file>
Two environment variables can be used to avoid typing the -host and -manager option each time:
- GLOBUS_REPLICA_CATALOG_HOST for the logical collection distinguished name.
- GLOBUS_REPLICA_CATALOG_MANAGER for the manager distinguished name.
- file contains the password used during the connection.
OBJECT indicates which entry in the replica catalog the command will act upon:
- -collection for a collection that was specified in the -host option
- -location <name>
- -logicalfile <name>
ACTION determines which operations will be executed on the entry. There are four categories: Creation/deletion, attributes modifications, files names manipulation in the logical collection file lists and location file lists, and finally search operations. See the Globus documentation for more information.
In the following example scenario, we propose to create a logical collection called itsoCollection in the Replica Catalog created in “Installation” on page 211. This collection consists of five files that are located on two different servers, g0.itso-guarani.com and t0.itso-tupi.com. Three files are stored on g0.itso-guarani.com, and two others are located on t0.itso-tupi.com. The two locations host a GridFTP server.
The steps are:
We can now perform a few requests:
Search for all locations that contain file4 and file5:
Create a file FilesToBeFound that contains the files we are looking for:
for i in file4 file5; do echo $i >> FilesToBeFound;done
Perform the request:
globus-replica-catalog -password password -collection -find-locations FilesToBeFound uc
Then you should receive the following output:
filename=file4 filename=file5 uc=gridftp://g0.itso-tupi.com/home/globus/storage
uc means URL Constructor and is the attribute used in the LDAP directory to store the location URL.
Check the size attribute for the file file2:
globus-replica-catalog -password password -logicalfile "file2" -list-attributes size
You receive:
size=200000
The installation process is explained at:
http://www.globus.org/gt2/replica.html
It consists of the following steps:
1. | Add a new schema that defines objects manipulated for replica management. It can be downloaded from: http://www.globus.org/gt2/replica.schema.txt Copy this file to $GLOBUS_LOCATION/etc/openldap/schema/replica.schema. Edit $GLOBUS_LOCATION/etc/openldap/slapd.conf to reflect your site’s requirements (for all bolded entries). # See slapd.conf(5) for details on configuration options. # This file should NOT be world readable. # include /usr/local/globus/etc/openldap/schema/core.schema include /usr/local/globus/etc/openldap/schema/replica.schema pidfile /usr/local/globusvar/slapd.pid argsfile /usr/local/globus/var/slapd.args ############################################################### # ldbm database definitions ############################################################### database ldbm suffix "dc=itso-maya,dc=com" rootdn "cn=Manager, dc=itso-maya,dc=com " rootpw globus directory /usr/local/globus/var/openldap-ldbm index objectClass eq Be sure to include the following two lines in the file near the top: schemacheck off include /usr/local/globus/etc/openldap/schemas/replica.schema |
2. | Start the LDAP daemon: export LD_LIBRARY_PATH=$GLOBUS_LOCATION/etc $GLOBUS_LOCATION/libexec/slapd -f $GLOBUS_LOCATION/etc/openldap/slapd.conf |
3. | The LDAP daemon sends a message to the syslogd daemon though the local4 facility. Add the following line in /etc/syslogd.conf: Local4.* /var/log/ldap.log Issue service syslogd reload to enable LDAP error messages. For any issues regarding the LDAP server, you can check/var/log/ldap.log to determine what the problem might be. |
4. | Initialize the catalog.
|
18.191.111.30