From T2B Wiki
Jump to navigation Jump to search

Installing dCache 1.9.5 from scratch

Virtual machine

  • Installed a base machine
    • It is a virtual machine on with 2 CPUs and 2GB of RAM

Installation and setup

  • Get latest release:
rpm -ivh dcache-server-1.9.5-29.noarch.rpm
  • Install PostgreSQL
yum install -y postgresql postgresql-devel postgresql-jdbc postgresql-libs postgresql-python postgresql-server postgresql-contrib
/etc/init.d/postgresql start
chkconfig postgresql on
  • In /var/lib/pgsql/data/pg_hba.conf add
local   all         all                        trust
host    all         all   trust
host    all         all         ::1/128        trust
  • and restart
/etc/init.d/postgresql restart
  • Create db and user
createuser -U postgres --no-superuser --no-createrole --createdb --pwprompt srmdcache
createdb -U srmdcache dcache
  • Generate keys
ssh-keygen -b 768 -t rsa1 -f /opt/d-cache//etc/server_key -N ""
ssh-keygen -b 1024 -t rsa1 -f /opt/d-cache//etc/host_key -N "" 
  • Install pnfs
rpm -ivh pnfs-postgresql-3.1.18-1-SL5x.x86_64.rpm

  • Import pnfs database:
    • go to jefke.wn and in /storage/userbackup/Maite_Db_backup/ find a file with pnfsdb.tar (any will do).
    • Untar it in the correct location. Hint: tar -tf to see where the tree structure of the tarball.
    • This configures contains the metadata for the pnfs database
    • Also copy the last file full_*.gz, which contains the full pnfs database.
su - postgres
zcat <path to gzipped full database> | psql postgres
  • Run install script of dcache.
    • Needed a little hack in the script to mount fs from localhost
    • with line 260 replace RET=${RET:-localhost} by RET="localhost"
  • Copy all files from maite ~/.ssh to new machine
    • make sure permissions are 700
    • import keys in dcache
cat ~/.ssh/ >> /opt/d-cache/config/authorized_keys
  • Change the following files
    • /pnfs/fs/admin/etc/config/serverName
    • /pnfs/fs/admin/etc/config/dCache/dcache.conf
    • vi "/pnfs/iihe/cms/store/user/odevroed/.(config)(dCache)/dcache.conf"
    • more info in the dcache book in the section Global Configuration with Wormholes
  • Run this
touch /pnfs/fs/admin/etc/config/dCache/'.(fset)(dcache.conf)(io)(on)'
  • Copy files from /etc/grid-security (not the keys)
mv EGI-trustanchors.repo /etc/yum.repos.d/
yum install ca-policy-egi-core
yum install lcg-CA
  • This machine was installed as a base machine. Therefore the user and groups were not present. They have been created (only the relevant ones) by hand to be able to test the machine.
  • The way dCache is handling the authorisation changed; in case /Role= and /Capability= are null they are ommited. This means that the entries in /etc/grid-security/grid-vorolemap should not be
"/C=BE/O=BEGRID/OU=ELEM/OU=VUB/CN=Joris Maes" "/cms/becms/Role=NULL/Capability=NULL" jmmaes

but it should be

"/C=BE/O=BEGRID/OU=ELEM/OU=VUB/CN=Joris Maes" "/cms/becms" jmmaes


  • Fire up the server
/opt/d-cache/bin/dcache start|restart|stop|status

  • Go into admin mode
ssh -F /root/.ssh/dcache_admin_config admin@localhost


  • Installation