The standard configuration assumes that the database server is
      installed on the same machine as the replica service
      — usually the admin node of the dCache instance.  If
      this is not the case you need to set the property
      replica.db.host.
    
      To create and configure the database
      replica used by the replica
      service in the database server do:
    
[root] #createdb -U dcache replica[root] #psql -U dcache -d replica -f /usr/share/dcache/replica/psql_install_replicas.sql
      To activate the replica service you need to
    
- Enable the - replicaservice in a layout file.- [<someDomain>] ... [<someDomain>/replica] 
- Configure the service in the - /etc/dcache/dcache.conffile on the node with the- dCacheDomainand on the node on which the- pnfsmanageris running.- dcache.enable.replica=true - Note- It will not work properly if you defined the - replicaservice in one of the layout files and set this property to- noon the node with the- dCacheDomainor on the node on which the- pnfsmanageris running.
- Define a pool group for the resilient pools if necessary. 
- Start the - replicaservice.
      In the default configuration, all pools of the dCache instance
      which have been created with the command dcache pool
      create will be managed.  These pools are in the pool
      group named default which does exist by
      default.  The replica service will keep the number of
      replicas between 2 and 3 (including). At each restart of the
      replica service the pool configuration in the database will
      be recreated.
    
Example:
	  This is a simple example to get started with. All your pools
	  are assumed to be in the pool group
	  default.
	
- In your layout file in the directory - /etc/dcache/layoutsdefine the- replicaservice.- [dCacheDomain] ... [replicaDomain] [replicaDomain/replica] 
- In the file - /etc/dcache/dcache.confset the value for the property- replicaManagerto- trueand the- replica.poolgroupto- default.- dcache.enable.replica=true replica.poolgroup=default 
- The pool group - defaultexists by default and does not need to be defined.
- To start the - replicaservice restart dCache.- [root] #- dcache restart
For more complex installations of dCache you might want to define a pool group for the resilient pools.
      Define the resilient pool group in the
      /var/lib/dcache/config/poolmanager.conf file on the host running
      the poolmanager service.  Only pools defined in the resilient
      pool group will be managed by the replica service.
    
Example:
	Login to the admin interface and cd to the PoolManager.
	Define a poolgroup for resilient pools and add pools to that
	poolgroup.
      
(local) admin >cd PoolManager(PoolManager) admin >psu create pgroup ResilientPools(PoolManager) admin >psu create pool pool3(PoolManager) admin >psu create pool pool4(PoolManager) admin >psu addto pgroup ResilientPools pool3(PoolManager) admin >psu addto pgroup ResilientPools pool4(PoolManager) admin >save
	  By default the pool group named
	  ResilientPools is used for replication.
	
	  To use another pool group defined in
	  /var/lib/dcache/config/poolmanager.conf for replication,
	  please specify the group name in the
	  etc/dcache.conf file.
	
replica.poolgroup=<NameOfResilientPoolGroup>.
 
   