Jump to content

CernVM File System

From MukeWiki

CernVM-FS is a distributed read-only software distribution system, implemented as a POSIX filesystem in user space (FUSE) using HTTP transport, to deliver software in a fast and reliable fashion at global scale.

Installation repo

$ dnf install https://cvmrepo.s3.cern.ch/cvmrepo/yum/cvmfs-release-latest.noarch.rpm

Tento RPM balik okrem samotneho /etc/yum.repos.d/cernvm.repo obsahuje aj GPG kluce a scriptlet, ktory v cernvm.repo modifikuje baseurl pre nie default EL distribucie (napr. na fedora alebo suse). See also cvmfs-release.spec and cernvm.repo. Repository je primarne urcene pre CERN oficialne distribucie (RHEL, AlmaLinux). Baliky pre aktualnu Fedoru mozu niekedy meskat.

/etc/yum.repos.d/cernvm.repo (AlmaLinux 9)

[cernvm]
name=CernVM packages
baseurl=http://cvmrepo.s3.cern.ch/cvmrepo/yum/cvmfs/EL/$releasever/$basearch/ http://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs/EL/$releasever/$basearch/
enabled=1

[cernvm-config]
name=CernVM-FS extra config packages
baseurl=http://cvmrepo.s3.cern.ch/cvmrepo/yum/cvmfs-config/EL/$releasever/$basearch/ http://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs-config/EL/$releasever/$basearch/
enabled=0

lxplus.cern.ch (RHEL 9, 2025-06)

/etc/yum-puppet.repos.d/cvmfs.repo

[cvmfs]
name=CVMFS yum repository for el9
baseurl=https://cvmrepo.s3.cern.ch/cvmrepo/yum/cvmfs/EL/9/x86_64
enabled=True

/etc/yum-puppet.repos.d/cvmfs-config.repo

[cvmfs-config]
name=CVMFS config yum repository for el9
baseurl=https://cvmrepo.s3.cern.ch/cvmrepo/yum/cvmfs-config/EL/9/x86_64
enabled=False

URL notes

Je tu mierny chaos pri (repo) URL adresach, see also history:

https://cvmrepo.s3.cern.ch/cvmrepo          # s3           # repo
https://cvmrepo.web.cern.ch/cvmrepo         # web          # browsable repo
https://cvmrepo.s3-website.cern.ch/cvmrepo  # s3-website   # browsable repo (?! not full ?! obsolete ?!)

Pravdepodobne asi jedina uzitocna adresa je CernVM and CernVM-FS Build Products:

https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/?C=M;O=D   => cvmfs-release-latest.noarch.rpm

Page cvmfs-contrib is a place of community-contributed packages related to CernVM-FS but not maintained by the CernVM-FS developer team (nothing interesting).

Installation

$ dnf install cvmfs     # install cvmfs client (only) on AlmaLinux 9, 2025-07
Installing:
 cvmfs                         x86_64     2.13.1-1.el9     cernvm
Installing dependencies:
 cvmfs-config-default          noarch     2.0-1            cernvm
 cvmfs-fuse3                   x86_64     2.13.1-1.el9     cernvm
 cvmfs-libs                    x86_64     2.13.1-1.el9     cernvm
 # and other system packages (i.a. autofs, selinux-policy)

Ostatne baliky z CernVM-FS repo nie su pre beznu pracu (ako client) potrebne. See also cvmfs-universal.spec and cvmfs-config-default.spec.

NOTE Packages su distribuovane "mierne chaoticky". Fedora resp. EPEL baliky su zostavovane za urcitych pravidiel, ktore pri CernVM-FS nie su plne dodrziavane. Pristup k source rpm, resp. k spec files vsak umoznuje relativne rychle zorientovanie sa. Ale hlavne, takto distribuovane baliky sa uz dlhodobo pouzivaju v CERNE, preto nejaka vlastna modifikacia (bez commit-u do oficialneho repo) bude kontraproduktivna.

Fedora rebuild packages

RPM baliky pre aktualnu Fedoru mozu niekedy meskat aj mesiace. Napr. pre Fedora 42 (released 2025-04) boli baliky distribuovane az v 2025-06. V takomto pripade jednoduche (docasne) riesenie spociva v pre-build-ovani 2 source RPM packages v jednom repo (napr. na fedora copr):

cvmfs          => https://ecsft.cern.ch/dist/cvmfs/cvmfs-2.13.0/cvmfs-2.13.0-1.fc41.src.rpm
cvmfs-config   => https://ecsft.cern.ch/dist/cvmfs/cvmfs-config/cvmfs-config-default-2.2-1.src.rpm

Usage and configuration

Pre vyhnutie sa moznym problemom:

Manually mounting is the preferred way (personal opinion) to mount a remote repository.cern.ch. Try also this bash script.

$ mkdir -p /cvmfs/sft.cern.ch
$ mount -t cvmfs sft.cern.ch /cvmfs/sft.cern.ch
CernVM-FS: running with credentials 980:980
CernVM-FS: loading Fuse module... done
CernVM-FS: mounted cvmfs on /cvmfs/sft.cern.ch

$ umount /cvmfs/sft.cern.ch

In contrast to the system's mount(8) command which requires root privileges, CernVM-FS can also be mounted like other Fuse file systems by normal users (via cvmfs2 command), see Private Mount Points.

Pre beznu pracu nie su potrebne zmeny v default configuration. Pripadne zmeny v subore /etc/cvmfs/default.local (nie default.conf), see also list of all CernVM-FS Parameters.

CVMFS_CLIENT_PROFILE=single
CVMFS_HTTP_PROXY=DIRECT

# Local cache directory
CVMFS_CACHE_BASE=/var/lib/cvmfs

# Soft limit in MB for the files in CVMFS_CACHE_BASE (4GB=4000)
CVMFS_QUOTA_LIMIT=4000
$ cvmfs_config showconfig sft.cern.ch     # see cvmfs-config or as bash script cvmfs_config
$ bash -x cvmfs_config probe
Notes
  • Nespustat $ cvmfs_config setup, resp. spustat len v pripade ak chceme mount-ovat s autofs service.
  • Nepokusat sa pouzivat inu ako default /cvmfs directory, rozne scripty pouzivaju tuto directory "fixne".
  • By default, cvmfs presents all files and directories as belonging to the mounting user, which for system mounts under /cvmfs directory is the user and group cvmfs (created by installing cvmfs package), see File Ownership.
  • Cache (files) in directory CVMFS_CACHE_BASE are stored as SQLite 3 database format.

CernVM-FS remote repositories

# currently (2025-06) actively used repos (personal interests)
cvmfs-config.cern.ch
sft.cern.ch
sft-nightlies.cern.ch
alice.cern.ch

# currently (2025-06) actively not used repos (personal interests)
alice-nightlies.cern.ch
last modified file: 2021-08-13 /cvmfs/alice-nightlies.cern.ch/el7-x86_64/Packages/O2/nightly-20210813-2/etc/modulefiles/O2
alice-ocdb.cern.ch
last modified file: 2022-01-03 /cvmfs/alice-ocdb.cern.ch/calibration/data/2018/OCDB/TRD/Calib/DCS/Run285010_285010_v96_s0.root

sft.cern.ch

The SFT (Software Frameworks & Tools) group provide LCG (LHC Computing Grid) Releases, actually WLCG (Worldwide LHC Computing Grid).

The philosophy is to try to use as many packages from the operating system as possible. Package HEP_OSlibs contains the minimal set of packages required on a machine in order for the LCG releases to work. HEP_OSlibs is a pure meta-package that contains no software, contains only build and runtime dependencies of software for LHC experiments. Installing it simply pulls in the packages it depends on, as well as any other packages on which these in turn depend. See also README-el9.md, HEP_OSlibs.spec and WLCG repository.

The most used features of the LCG Releases in /cvmfs/sft.cern.ch/lcg/<feature>
contrib Used for GCC and Clang compilers bundled with Binutils, CMake and other build tools.
views You can make all 800+ packages (including their dependencies) of the LCG software stack available without any installations.
releases If you only need a specific package (including its dependencies) you can also do that.
nightlies Same as releases for the nightly builds. Use single packages instead of an entire view (-> /cvmfs/sft-nightlies.cern.ch/).

For example, LCG views for LCG Release 107 (released 2025-01) are available for 21 supported platforms platforms.

$ ls /cvmfs/sft.cern.ch/lcg/views/LCG_107
# 21 supported platforms:
#   aarch64-el9-gccN, arm64-macN-clangN   e.g. aarch64-el9-gcc14-opt
#   x86_64-el9-clangN, x86_64-el9-gccN    e.g. x86_64-el9-gcc14-opt
#   x86_64-ubuntuN-gccN-opt               e.g. x86_64-ubuntu2404-gcc13-opt (LTS releases 20.04, 22.04, 24.04)
$ du -hs /cvmfs/sft.cern.ch/lcg/views/LCG_107/x86_64-el9-gcc14-opt   # 261M

$ cat /etc/redhat-release   # AlmaLinux release 9.6 (Sage Margay)
$ gcc --version             # gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)
$ type gcc
# gcc is /usr/bin/gcc

$ source /cvmfs/sft.cern.ch/lcg/views/LCG_107/x86_64-el9-gcc14-opt/setup.sh
$ export   # see a lot of changes
NOTE Be patient first time, a lot of data is transferred over the network (and cached on the disk).
$ gcc --version             # gcc (GCC) 14.2.0
# gcc is /cvmfs/sft.cern.ch/lcg/releases/gcc/14.2.0-2f0a0/x86_64-el9/bin/gcc   # regular file
$ root --version            # ROOT Version: 6.34.02
# root is /cvmfs/sft.cern.ch/lcg/views/LCG_107/x86_64-el9-gcc14-opt/bin/root   # symbolic link
#      -> /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.34.02-18eb6/x86_64-el9-gcc14-opt/bin/root
$ geant4-config --version   # 11.3.0
# geant4-config is /cvmfs/sft.cern.ch/lcg/views/LCG_107/x86_64-el9-gcc14-opt/bin/geant4-config   # symbolic link
#               -> /cvmfs/sft.cern.ch/lcg/releases/Geant4/11.3.0-3cd7f/x86_64-el9-gcc14-opt/bin/geant4-config

POZOR V pripade LCG releases (specificky program/balik so vsetkymi potrebnymi zavislostami) nepouzivat directory releases/<program>, ale directory, ktora je vo vnutri LCG_N, t.j. releases/LCG_N/<program>, see also [1].

# AlmaLinux 9.6, gcc 11.5.0

$ source /cvmfs/sft.cern.ch/lcg/releases/LCG_107/Geant4/11.3.0/x86_64-el9-gcc14-opt/Geant4-env.sh
# correct, gcc 14.2.0, geant4 11.3.0

         /cvmfs/sft.cern.ch/lcg/releases/LCG_107/Geant4/11.3.0/x86_64-el9-gcc14-opt   # symbolic link
      -> ../../../Geant4/11.3.0-3cd7f/x86_64-el9-gcc14-opt
$ cd     ../../../Geant4/11.3.0-3cd7f/x86_64-el9-gcc14-opt && pwd
         /cvmfs/sft.cern.ch/lcg/releases/Geant4/11.3.0-3cd7f/x86_64-el9-gcc14-opt

$ source /cvmfs/sft.cern.ch/lcg/releases/Geant4/11.3.0-3cd7f/x86_64-el9-gcc14-opt/Geant4-env.sh
# wrong, cannot get environment for package

Napriek tomu, ze sa pouziva spravna cesta, source script neprebehne v poriadku, resp. je problem s nastavenim roznych premennych, co je pravdepodobne sposobene tym, ze rozne scripts (volane zo source script) pouzivaju relativne cesty a tam sa to "rozbije".

ROOT ako jeden z core programov/balikov v HEP komunite, ma este navyse vlastnu directory.

$ ls /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/
# 143 versions of ROOT (5.22.00a -> 6.36.00)
$ ls /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.36.00
# 11 supported platforms (e.g. x86_64-almalinux9.5-gcc115-opt or x86_64-fedora42-gcc151-opt)

$ cat /etc/redhat-release   # Fedora release 42 (Adams)
$ gcc --version             # gcc (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2)
 
$ source /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.36.00/x86_64-fedora42-gcc151-opt/bin/thisroot.sh
$ root --version            # ROOT Version: 6.36.00

alice.cern.ch

$ source /cvmfs/alice.cern.ch/etc/login.sh
# same as
$ export PATH=/cvmfs/alice.cern.ch/bin:$PATH
$ export ALICE_ENV=1
$ ls /cvmfs/alice.cern.ch/bin/
alien    # $ALIEN_ROOT/bin/alien (sh script), front-end script to access Alice Environment
aliend   # $ALIEN_ROOT/etc/rc.d/init.d/aliend (sh script), startup script for the AliEn services
# ALIEN_ROOT=/cvmfs/alice.cern.ch/x86_64-2.6-gnu-4.1.2/Packages/AliEn/v2-19-395
# actually (2025-07) perl AliEn (released 2017-02)

alienv   # sh script