Basic dCache Installation Core Developers

Pnfs Installation

If pnfs is not yet installed, run the following commands (You need to be root)
#
#   get and install pnfs
#
cd /tmp
wget http://www.dcache.org/downloads/pnfs-3.1.10-11.i386.rpm
rpm -i pnfs-3.1.10-11.i386.rpm
cd /opt/pnfs.3.1.10/pnfs/tools
mkdir /opt/pnfs-db
./install-s
#
You should get the following output: (please fill out the red part)
#

   WARNING
   --------
 This install script will exit in case it finds a pnfs service
 already installed on this node.

 The log file of this session is : /tmp/pnfs-install-1123852142.log

 Checking nfs servers : Ok
      Preparing setup : Ok
  Pnfs Base Directory : /opt/pnfs.3.1.10/pnfs

 Need to ask some questions ...

  Log Directory [/var/log] :
  Database Directory : /opt/pnfs-db

 Creating database admin
 Creating database data1

 Starting pnfs server   ... Ok
 Trying to talk to dbserver 0 [1122] ... Ok
 Trying to talk to dbserver 1 [1122] ... Ok
             Trying to mount 'pnfs' : Ok
        Correcting pnfs permissions : Ok
 Detecting wormhole target (config) : 0000000000000000000010E0
                  Digging wormholes :  dig-0-ok dig-1-ok Done
             Creating database link : Ok
 Setting mount permissions to world : Ok




If you got those messages, the pnfsserver is running and pnfs can be mounted.
mkdir -p /pnfs/fs
mount -o hard,rw,noac,intr,vers=2,udp localhost:/fs /pnfs/fs
The green parts might be necessary on some linux versions.
Remarks :
The pnfs stop/start script is /opt/pnfs.3.1.10/pnfs/tools/pnfs.server. It needs to be called as root. It can be executed in its tools directory or may be copied to the /etc/init.d start/stop directory.
cd /opt/pnfs.3.1.10/pnfs/tools
./pnfs.server stop
#
# resp. 
#
./pnfs.server start

Core dCache compilation

This could (can) be done as regular user.
       #
       # define your home
       #
       DCACHE_HOME=/home/<YourHomePath>/dcache-work
       mkdir -p $DCACHE_HOME       
       cd $DCACHE_HOME
       cvs checkout -r production-1-6-5 diskCacheV111
       
       #
       # We only need the basic dCache; it won't compile without those 'rm's
       #
       cd diskCacheV111
       rm -rf srm scripts tomcat
       rm -rf services/authorization services/TransferManager.java services/GsiftpTransferManager.java
       rm -rf movers/Remote*.java doors/Gsi*.java
       #
       #  and compile
       #
       export CLASSPATH
       CLASSPATH=$DCACHE_HOME/diskCacheV111/classes/cells.jar:$DCACHE_HOME
       javac `find . -name "*.java"`
       

Prepare pnfs for dCache

This must be done as root

Pnfs must get some information to prepare the dCache config files.

   cd $DCACHE_HOME/diskCacheV111/jobs
   su root
   ...
   ./prepare-pnfs.sh
   
The script tries to findout whatever it needs and displays the result before doing something. Please check if the output is ok. If you reply no the script displays its usage text so that you can correct incomplete or wrong information. Otherwise, (replying 'yes') the setup is done.

   ./init-devel.sh
   
The script will try to find all pnfs's mounted on your machine. Please select the locally mounted one (/pnfs/fs).
   Checking for config directory ... Ok
   Preparing pnfs filesystem ... Ok

    Please choose one of the following

   e : <exit>
   1 : /pnfs/fs   (server=localhost:/fs,serverId=desy.de,serverName=watphrakeo.desy.de)

    e,1 ? 1

   Creating billing and statistics ... Ok


    Checking Users database .... Ok
   Preparing keys ... Ok
   Preparing skin ... Ok

   

Creating and registering pool(s)

There is no automated script which creates pools. So we need to to do this manually. The procedure decribed here has to be repeated for each pool. Please make sure, the pools have reasonable sizes ( > 1 GB each ).

Starting the Core dCache

       export CLASSPATH
       CLASSPATH=$DCACHE_HOME/diskCacheV111/classes/cells.jar:$DCACHE_HOME
       #
       #
       cd $DCACHE_HOME/diskCacheV111
       java dmg.cells.services.Domain Test -batch config/basic.batch -param dcacheHome=`pwd` 
       

Preparing for I/O (dccp only)

You can only do I/O if all services on the web page are active, including at least one pool. (http://localhost:2288/cellInfo)
Get the dccp client.
   mkdir -p  <clientBinaryPath>/dcap
   cd <clientBinaryPath>/dcap
   wget http://www.dcache.org/downloads/dcap-1.2.30.tgz
   tar xzf dcap-1.2.30.tgz
   PATH=<clientBinaryPath>/dcap/dcap-1.2.30/bin:$PATH
   
Customize the pnfs filesystem permissions to your needs. You need to do this on the node, the system is running.
    #
    #  assuming, there is a local user 'jeronimo'
    #
    cd /pnfs/fs/usr/data
    mkdir -p home/jeronimo
    cd home
    chown jeronimo jeronimo   
   
Switching to user 'jeronimo', you may do this :
      #
      # if necessary : PATH=<clientBinaryPath>/dcap/dcap-1.2.30/bin:$PATH
      #
      dccp -d2  /etc/group  /pnfs/fs/usr/data/home/jeronimo
      #