InstallDcache195Ext

From T2B Wiki
Jump to navigation Jump to search

Installing dCache 1.9.5 on machine with extended Quattor template

  • This page describes the steps needed to get dCache up and running on a machine that was deployed with a quattor template that was extended for dCache
  • Start postgresql, Quattor will take care of this after reboot
/etc/init.d/postgresql start
  • In /var/lib/pgsql/data/pg_hba.conf add
local   all         all                        trust
host    all         all         127.0.0.1/32   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 "" 
  • Import pnfs database:
    • go to jefke.wn and in /storage/userbackup/Maite_Db_backup/ find the last files and copy to the machine
scp jefke.wn:/storage/userbackup/Maite_Db_backup/full_1334628123-pnfsdb.tar /var
scp jefke.wn:/storage/userbackup/Maite_Db_backup/full_1334628123.gz /var
    • 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
cd /opt
tar -xvf /var/full_1334628123-pnfsdb.tar
mv opt/pnfsdb/ . 
rm -rf opt/
    • Populate the pnfs database
su – postgres
zcat /var/full_1334628123.gz | psql postgres


  • Run install script of dcache.
    • Before you do this you have to remove /pnfs, it is put there by quattor to make all /store/user/username directories.
rm -rf /pnfs/
    • Make sure pnfs is running
/opt/pnfs/bin/pnfs start
    • Needed a little hack in the script to mount fs from localhost (really needed, I don't think so)
/opt/d-cache/install/install.sh
    • with line 260 replace RET=${RET:-localhost} by RET="localhost"
  • In case the machine name is not anymore maite.iihe.ac.be some additional changes need to be performed:
    • /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)'
  • To be able to use the admin interface:
cd /root/.ssh
scp ccq:/root/dCache_essential_config/keys/dcache_admin_key .
scp ccq:/root/dCache_essential_config/keys/dcache_admin_key.pub .
scp ccq:/root/dCache_essential_config/keys/dcache_admin_config .
cat ~/.ssh/dcache_admin_key.pub >> /opt/d-cache/config/authorized_keys
    • Go to the admin interface
ssh -F /root/.ssh/dcache_admin_config admin@localhost


Template:TracNotice