Skip to content

CVMFS

Installing and Configuring CVMFS

Step 1: Install CVMFS Client

  1. Update the package list and install the CVMFS client:

    sudo apt-get update
    sudo apt-get install cvmfs fuse
    
  2. Modify the /etc/fuse.conf and include or uncomment user_allow_other.

Step 2: Configure CVMFS Client

  1. Edit the CVMFS configuration file:

    sudo vi /etc/cvmfs/default.local
    
  2. Add the following lines to configure the repositories and HTTP proxy:

    CVMFS_REPOSITORIES="unpacked.cern.ch"
    CVMFS_HTTP_PROXY="DIRECT"
    CVMFS_CACHE_BASE="/mnt/scratch/cvmfs/$(hostname)"
    
    • CVMFS_REPOSITORIES: Specifies the CVMFS repositories to be used.
    • CVMFS_HTTP_PROXY: Specifies the HTTP proxy settings. Use "DIRECT" if no proxy is needed.
    • CVMFS_CACHE_BASE: Specifies the base directory for caching files. For our cluster, it is stored in the scratch area.
  3. (Optional) Set the cache quota:

    CVMFS_QUOTA_LIMIT=10000  # Cache size in MB (10 GB)
    

Step 3: Create Mount Point

  1. Create the mount point directory:

    sudo mkdir -p /cvmfs/unpacked.cern.ch
    sudo chmod 755 /cvmfs/unpacked.cern.ch
    

Step 4: Mount the CVMFS Repository

  1. Mount the repository using the CVMFS client:

    sudo cvmfs2 -o allow_other unpacked.cern.ch /cvmfs/unpacked.cern.ch
    
  2. In some cases you might need to run:

    sudo mount -t cvmfs unpacked.cern.ch /cvmfs/unpacked.cern.ch
    

Step 5: Verify the Mount

  1. Verify that the repository is mounted and accessible:

    ls /cvmfs/unpacked.cern.ch
    

    You should see the contents of the CVMFS repository.

Step 6: (Optional) Configure Automatic Mounting

  1. To automatically mount the CVMFS repository at boot time, add an entry to fstab:

    sudo vi /etc/fstab
    
  2. Add the following line to the file:

    cvmfs2 /cvmfs fuse defaults,allow_other 0 0
    
  3. Save and close the file.

Step 7: Restart CVMFS Client (if needed)

  1. If you made changes to the configuration, restart the CVMFS client to apply the changes:

    sudo cvmfs_config reload
    

To load another cvmfs repository

To load any additional cvmfs repository, like grid.cern.ch we need to just modify the file /etc/cvmfs/default.local, like:

CVMFS_REPOSITORIES="unpacked.cern.ch,grid.cern.ch,cms.cern.ch"

and then do cvmfs_config reload.

If this does not work, try with:

sudo mkdir -p /cvmfs/grid.cern.ch
sudo mount -t cvmfs grid.cern.ch /cvmfs/grid.cern.ch

Troubleshooting

  • If you encounter issues, check the CVMFS logs for more information:

    sudo cat /var/log/cvmfs/*.log
    
  • Ensure that the CVMFS client service is running:

    sudo systemctl status cvmfs
    
  • If the service is not found, try starting it manually:

    sudo service cvmfs start
    

By following these steps, you should be able to successfully install and configure CVMFS on your machine.