InstalldCacheHeadnode

From T2B Wiki
Jump to navigation Jump to search

Installation of a dCache Headnode

This page details the installation of a quick backup of the dCache headnode and will become the page that details the installation of the new, still to be installed, headnode.

Re-installing the old maite

On re-installing the old maite, a number of problems were encountered after the machine was installed with the "dCache headnode" template from quattor.
In the rest of the document, all the backups that were taken are located in : jefke.wn:/storage/userbackup/<something>

Missing config files and symbolic links

Make sure the following symbolic links are present:

ln -s /opt/pnfs/bin/pnfs /etc/init.d/pnfs
ln -s /opt/d-cache/bin/dcache-core /etc/init.d/dcache-core
ln -s /opt/d-cache/bin/dcache-srm /etc/init.d/dcache-srm
ln -s /pnfs/fs /pnfs/ftpBase
ln -s /pnfs/fs/usr /pnfs/iihe

Copy all the config files from the backup at /storage/userbackup/Maite_Config/config_dCache.tar.gz

mv /opt/d-cache /opt/d-cache_orig

and untar the file.

Restore the backup of the database

First, just applying the quattor templates did not result in anything working. these are the manual tweaks that are necessary:
Copy the latest backup of the pnfs database from /storage/userbackup/Maite_Db_backup. You need

<something>pnfsdb.tar
full_<something>

untar pnfsdb.tar to /opt/pnfsdb
import the pnfsdb into the newly created DB as the user postgres:

su - postgres
zcat <path to gzipped full dump> | psql postgres

Now verify with the ssh interface to dcache that the DB has been restored.

Miscellaneous configuration

Backup script for the pnfs database:

vi /etc/cron.daily/backup_postgres.sh

and add:


dest=/var/postgres-backup/full_<tt>date '+%s'</tt>
tar cvf ${dest}-pnfsdb.tar /opt/pnfsdb
echo "doing pg_dumpall"
su - postgres -c "pg_dumpall | gzip > $dest.gz"
echo "done"
scp ${dest}-pnfsdb.tar jefke.wn:/storage/userbackup/Maite_Db_backup
scp $dest.gz jefke.wn:/storage/userbackup/Maite_Db_backup
find /var/postgres-backup -mtime +30 | xargs rm
ssh  -qx jefke.wn "find /storage/userbackup/Maite_Db_backup -mtime +30 | xargs rm"

Make sure /var/postgres-backup/ exists and is writable by the user postgres.

copy the file /storage/userbackup/Maite_Config/damadori.tar and untar it in /root

fire up dcache

ncm-ncd --co dcache
/opt/d-cache/bin/dcache start


Template:TracNotice