Project

General

Profile

Using CernVM-FS (CVMFS)

We have published NOvA offline, online and DDT repositories to CVMFS, as well as the externals. Fermilab has also published all the UPS products which live under /grid/fermiapp area to CVMFS. With the installation of CVMFS on your own computers, you can directly browse the repositories and setup certain UPS products (if the product has a version compatible with your OS).

This page shows the instruction of how to setup CVMFS on a Linux machine as well as on a Mac. Most of the information posted on this page can be found at https://cernvm.cern.ch/portal/filesystem/quickstart but with some NOvA specific change of configuration.

Setup CVMFS on Linux

To install, proceed according to the following steps:
  1. Install the CernVM-FS packages. With yum, run
    sudo yum install cvmfs cvmfs-config-default
    
  2. If yum does not show the latest packages, clean the yum cache by yum clean all. On Ubuntu, use
    sudo apt-get install cvmfs cvmfs-config-default
    
  3. If apt does not show the latest packages, run
     sudo apt-get update before.
    
  4. For the base setup, run
    cvmfs_config setup.
    
  5. If you migrate from a previous version of CernVM-FS, check the release notes if there is anything special to do for migration.
  6. Create /etc/cvmfs/default.local and open the file for editing.
    Select the desired repositories by setting
    CVMFS_REPOSITORIES=repo1,repo2,....
    

    For NOvA, for instance, set
    CVMFS_REPOSITORIES=fermilab.opensciencegrid.org,nova.opensciencegrid.org
    
  7. Specify the HTTP proxy servers on your site with
    CVMFS_HTTP_PROXY="http://myproxy1:port|http://myproxy2:port" 
    

    or use direct connection:
    CVMFS_HTTP_PROXY=DIRECT
    
  8. Check if CernVM-FS mounts the specified repositories by
    cvmfs_config probe
    

    If the probe fails, try to restart autofs with
    sudo service autofs restart
    

Mac OS X

On Mac OS X, CernVM-FS uses Fuse for OSX (link is external). It is not integrated with autofs, i.e. repositories need to be manually mounted. In order to install, proceed according to the following steps:
  1. Install the CernVM-FS package by opening the .pkg file on this page: https://cernvm.cern.ch/portal/filesystem/downloads
  2. Create /etc/cvmfs/default.local and open the file for editing
    Select the desired repositories by setting
    CVMFS_REPOSITORIES=repo1,repo2,....
    

    For NOvA, for instance, set
    CVMFS_REPOSITORIES=fermilab.opensciencegrid.org,nova.opensciencegrid.org
    
  3. Specify the HTTP proxy servers on your site with
    CVMFS_HTTP_PROXY="http://myproxy1:port|http://myproxy2:port" 
    

    or use direct connection:
    CVMFS_HTTP_PROXY=DIRECT
    
  4. Mount your repositories like
    sudo mkdir -p /cvmfs/cms.cern.ch
    sudo mount -t cvmfs cms.cern.ch /cvmfs/cms.cern.ch
    

Examples of using CVMFS:

  • Getting a valid kx509 certificate and a valid VOMS proxy (tested on MacOS Sierra and SLF6).
    kinit
    . /cvmfs/fermilab.opensciencegrid.org/products/common/etc/setup
    setup kx509
    kx509
    voms-proxy-init --rfc --voms=fermilab:/fermilab/nova/Role=Analysis --noregen
    

You can then use the valid proxy to access files on dcache via xrootd, e.g.

setup fife_utils
export SAM_EXPERIMENT=nova
xrdcp `samweb get-file-access-url --location=dcache --schema=xroot neardet_genie_nonswap_nogenierw_fhc_v08_2000_r00010377_s02_c001_R16-03-03-prod2reco.d_v1_20160224_073123_sim.caf.root`