Setup CVMFS

Setting up a VOBox for CVMFS use

 

This wiki page aims to explain the steps that should be taken on a VOBox in order to use CVMFS.

 

Installation

 

Before explaining the installation steps, we clarify that CVMFS must be available both on the VOBOX and WorkerNodes.

 

  • Start setting this repo file:

[cernvm]
name=CVMFS Repository
baseurl=http://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs/x86_64
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CernVM

[cernvm-testing]
name=CernVM testing packages
baseurl=http://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs-testing/EL/$releasever/$ba\
search/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CernVM
gpgcheck=1
enabled=0
protect=1

 

  • And then to install:

wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-CernVM
http://cvmrepo.web.cern.ch/cvmrepo/yum/RPM-GPG-KEY-CernVM

yum -y install cvmfs cvmfs-init-scripts

 

  • Once installed, set the CVMFS cache dir:

chown cvmfs:cvmfs /var/lib/cvmfs_cache (or the folder pointed by CVMFS_CACHE_BASE, see below)
chmod 700 /var/lib/cvmfs_cache

Then you can set the CVMFS config file (/etc/cvmfs/default.local) according to your environment is:

CVMFS_REPOSITORIES=alice.cern.ch
CVMFS_HTTP_PROXY="http://squid1.your-domain:3128;http://squid2.your-domain:3128"
CVMFS_QUOTA_LIMIT=20000
CVMFS_CACHE_BASE=/var/cache/cvmfs

       

      - CVMFS_CACHE_BASE is to specify which local directory(on work nodes) to cache the files from CVMFS server or squid serve

      - CVMFS_REPOSITORIES is to specify which software repository you want to use on your work nodes, if you want to use multiple ones, use colon to separate them, as CVMFS_REPOSITORIES=alice.cern.ch

      - CVMFS_HTTP_PROXY is to specify the squid server(s) to be used for local caching. It supports both load balance and failover

      - CVMFS_QUOTA_LIMIT is to specify how much local space you give CVMFS to cache files.

       

      • Run:

      cvmfs_config setup
      service autofs start
      chkconfig autofs on
      cvmfs_config chksetup

       

       

      Running AliEn after installation

       

      Before being able to use CVMFS effectively, we need to change the LDAP configuration for PackMan. We will take care of that when ready to proceed in your site.

      Also, please don't hardcode in ".alien/Environment" anything from:

      ALIEN_ROOT, ALIEN_PATH, ALIEN_LD_LIBRARY_PATH, GLOBUS_LOCATION, X509_CERT_DIR, GAPI_LOCATION, MYPROXY_LOCATION

      this will be setup by CVMFS automatically.

      Besides, make sure if ALIEN_ORGANISATION is defined, is to ALICE, all in capital letters (ALIEN_ORGANISATION=ALICE).

      Also, remove all old installations and symlinks to them to avoid missuse.

       

      In case you use 'aliend' to manage the services, check the file '.alien/etc/aliend/ALICE/startup.conf', you need to modify the line:  ' AliEnCommand="/cvmfs/alice.cern.ch/bin/alien" '. Besides, you can remove PackMan from 'AliEnServices...' since the instance is not needed anymore.

       

      For sites running SL6, ENSURE you have installed: http://linuxsoft.cern.ch/wlcg/sl6/x86_64/HEP_OSlibs_SL6-1.0.11-0.el6.x86_64.rpm

      If you have other Linux flavour, or prefer to install only libraries specifically needed by ALICE, you will need:

      > bind-utils (for 'host') - this is apparently missing only on SL6
      > gfortran
      > libXpm

      > attr (missing in some cases: nfs-mounts, bind-mounts, source built skipping requirements...)
      > compat-libgfortran (for libgfortran.so.1) - this is needed for some old packages, which do not have SLC6 build

      > tcl  (since alienv script uses modules utility that depends on libtcl)

      > If you have an error related to 'Term::ReadLine' you will need also libtermcap2.

       

      You have to make sure that you run everything from within CVMFS environment. Note that you DO NOT need to start PackMan service anymore.

       

      Add '/cvmfs/alice.cern.ch/bin' to your PATH. Then you should run commands normally (remember cleaning your old installations, bin folder...so there is not any missuse).

       

      -----

       

      Try some AliEn commands, such as 'alien --printenv' to test your are using the right AliEn and it has a proper configuration and environment. If everything looks ok, start the services as specified before.

       

      Known problems and workarounds

       

      If executing jobs, they fail with an error on some log like:

      Fortran runtime error: Read-only file system

       

      This is caused by CVMFS being read-only and happening only on some kernels. See ticket: https://cern.service-now.com/service-portal/view-incident.do?n=INC299258

      There are two ways to fix it:

      o) SL6 kernels >= 2.6.32-358.11.1.el6 have the bug fixed

      o) With cvmfs >= 2.1.12, set CVMFS_MOUNT_RW=yes in
      /etc/cvmfs/default.local

      Restart autofs and CE after this.

       

      Important: if CVMFS is not mounted in the default location, please make sure the right path is put in LDAP or the environment of CE service knows about it.