Scope of this document
This web page briefly summarizes steps to install the dCache in resilient mode. It's meant as 'aide-memoire' for people doing dCache packaging. The document is of very little use for dCache end users. You may find useful information on how to operate the Resilient Module at the Resilient Manual.Prerequisites
- The Postgres database must be installed and running on the machine hosting the replica manager module.
- The database must be enabled for tcp (enable "tcpip_socket" in "postgresql.conf")
- The database shall listen on service port 5432 (is default), or port may be configured later in replica.batch
- If you want to allow non-local connections to DB, you need to add more "host" records in "pg_hba.conf" to allow host running replicaDomain to connect to DB.
Database Preparation
- A database with the name replicas must be created.
- A user enstore must be created with password NoPassword (configurable)
- User enstore needs to have all permissions on database replicas
- run
psql -d replicas -U enstore -f pd_dump-s-U_enstore.sqlto initialize the database tables. Find file pd_dump-s-U_enstore.sql in the dCache source tree directory diskCacheV111/replicaManager.dCache Preparation
Suppose Resilient Manager cells was created with the name replicaManager, then
- Add the following "create" command line option to the start sequence of the
- PoolManager (in dCache.batch or other), to forward pool status changed messages
create diskCacheV111.poolManager.PoolManagerV5 PoolManager \
...
-poolStatusRelay=replicaManager \
-watchdog=300:300 \
...
- PnfsManager (in pnfs.batch or other), to forward file added to/deleted from pool messages :
create diskCacheV111.namespace.PnfsManagerV3 PnfsManager \
...
-cmRelay=replicaManager \
...
- collector (httpd.batch), to display Resilience Manager status on cells status page :
create diskCacheV111.cells.WebCollectorV3 collector \
...
replicaManager \
- Make sure <postgressbase>/share/java/postgresql.jar with jdbc driver (or other, like pgjdbc2.jar, postgresql-8.0-310.jdbc2.jar) is added to variable classpath in the config/dCacheSetup file.
- Make sure you've set the flag "-dbURL=..." with the proper host name runnin DB in the replica.batch flag if DB is not running on local host. Make sure connection is enabled from "replicaManager" host to the host running DB in the postgres configuration file "pg_hba.conf" (on the host running DB).
- For hybrid dCache (ReplicaManagerV2) you shall configure resilient pool group (e.g. ResilientPools ) in PoolManager.conf, check Resilient Manual for details.
- make sure proper configuration files (or symbolic links) were created during dCache installation or by running jobs/initPackage.sh:
in $DCACHE/config
replicaSetup -> dCacheSetup
in $DCACHE/jobs
replica -> wrapper2.sh
replica.lib.sh -> generic.lib.sh"p2p" option for the pool is not required for the normal operation of Resilence Manager, but you may add the option '-p2p=precious' to the "create" command of the pool in the pool.batch file or p2p=precious in the pool 'poollist' files.
The dCache config contains a valid batch file (replica.batch) for starting the resilient manager. A possible simple configuration would look likecreate diskCacheV111.replicaManager.ReplicaManagerV2 replicaManager \If you would like to change default parameters you may add more arguments like
"default \
-export \
-configDirectory=/opt/d-cache/config \
-dbClass=diskCacheV111.replicaManager.ReplicaDbV1 \
-hotRestart \
-min=2 -max=3 "
create diskCacheV111.replicaManager.ReplicaManagerV2 replicaManager \The parameter configDirectory should point to the dCache config directory.
"default \
-export \
-configDirectory=/opt/d-cache/config \
-dbClass=diskCacheV111.replicaManager.ReplicaDbV1 \
-coldStart \
-min=2 -max=3 \
-maxWorkers=6 \
-debug=true \
-dbURL=jdbc:postgresql://dbservernode.domain.edu:5432/replicas \
-jdbcDrv=org.postgresql.Driver \
-dbUser=myDBUserName \
-dbPass=myDBUserPassword \
-poolWatchDogPeriod=60 \
-waitDBUpdateTO=60 \
-delayDBStartTO=1200 \
-delayAdjStartTO=1260 \
-waitReplicateTO=43200 \
-waitReduceTO=43200 "For the default values of the parameters and the meaning of the other parameters and for an introduction into the management of the resilient cache please consult the Resilient Manual.
When you verified Resilience Manager starts and runs normally on your system, you may add to or uncomment "replica" in the the start/ stop sequence of the dcache startup script, e.g. /opt/d-cache/bin/dcache-opt .