CernVM-FS Configuration Examples


Please follow the instructions in the quickstart chapter of the CernVM-FS technical report.

Select Repositories

Let's assume you want to support ATLAS and LHCb software. Create or edit /etc/cvmfs/default.local and set,,

The following table lists the available repositories and the repositories they rely on.  We recommend to set least 25G as a shared quota for all repositories in /etc/cvmfs/default.local and to ensure that the filesystem hosting the cache has at least an additional 15% safety margin.
Note: For Grid sites deploying the Grid UI by other means, please ignore the CernVM-FS dependency.

Repository Description Dependencies ALICE experiment software ALICE conditions data ATLAS experiment software ATLAS conditions database CMS experiment software LHCb experiment software NA61 experiment software BES experiment software Grid User Interface LCG application’s area software Geant4 software

Change Cache Quota and Location

Let's assume we want to have a 25G shared cache for all the configured repositories and let's also assume that we want to change the default cache location from /var/lib/cvmfs to the existing directory /var/scratch/cvmfs.

If you're about to change a current cache location or if you decrease the quota, run sudo cvmfs_config wipecache first in order to wipe out the current location. Create or edit /etc/cvmfs/default.local and set

CVMFS_CACHE_BASE=/var/scratch/cvmfs # omit if you want to use the default /var/lib/cvmfs

Since the CernVM-FS quota is a soft quota, ensure that the file system hosting the cache has an additional 15% free space. If you use SElinux in restrictive mode, you also need to set the cvmfs cache label for the new cache directory with

sudo chcon -Rv --type=cvmfs_cache_t /var/scratch/cvmfs

Note: Please keep in mind that the cache location has to be on local storage.  Please take care that tmpwatch doesn't clean the cvmfs cache directory behind your back.

Select the Grid UI Version in the Repository

The repository provides two symbolic links that facilitate selecting the version of the Grid UI software that is supposed to by used on a particular grid site.  The symbolic link /cvmfs/ points to a reasonbly recent version that should fit in many cases.

The symbolic link /cvmfs/ is a so-called variant symbolic link.  It can be customized by sites.  The target of this symbolic link will be set by CernVM-FS at mount time depending on the GLITE_VERSION environment variable.  With the cvmfs-config-default package, /cvmfs/ will point to /cvmfs/ by default.  In order to change that to a different target, set GLITE_VERSION=<new_target> in any of the CernVM-FS configuration files for, for instance in /etc/cvmfs/default.local.

Specify Local Site Proxies

Let's assume you have two Squid proxies (squid1 and squid2), both listening on port 3128, which you want to configure load-balanced and with fail-over in case one of them is offline.  Create or edit /etc/cvmfs/default.local and set


followed by cvmfs_config reload.

Setup a Local Squid Server

Squid is very powerful and has lots of configuration and tuning options. For CernVM- FS we require only the very basic static content caching. If you already have a Frontier Squid installed you can use it for cvmfs as well

Otherwise, start from a standard Scientific Linux 5 or 6 Squid and adjust as follows. Browse through your /etc/squid/squid.conf and make sure the following lines appear accordingly

max_filedesc 8192
maximum_object_size 1024 MB
cache_mem 128 MB
maximum_object_size_in_memory 128 KB
# 50 GB disk cache
cache_dir ufs /var/spool/squid 50000 16 256

Check your Squid configuration with squid -k parse. Create the hard disk cache area with squid -z. In order to make the increased number of file descriptors effective for Squid, execute ulimit -n 8192 prior to starting the Squid service.
If you're using ACLs, don't forget to add ACLs allow rules for the Stratum 1 servers, for example like this:

acl cvmfs dst
acl cvmfs dst
acl cvmfs dst
acl cvmfs dst
acl cvmfs dst
acl cvmfs dst
acl cvmfs dst
acl cvmfs dst
acl cvmfs dst
acl cvmfs dst
acl cvmfs dst
acl cvmfs dst
http_access allow cvmfs

You are here