CVMFS
Installing and Configuring CVMFS¶
Step 1: Install CVMFS Client¶
-
Update the package list and install the CVMFS client:
sudo apt-get update sudo apt-get install cvmfs fuse -
Modify the
/etc/fuse.confand include or uncommentuser_allow_other.
Step 2: Configure CVMFS Client¶
-
Edit the CVMFS configuration file:
sudo vi /etc/cvmfs/default.local -
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.
-
(Optional) Set the cache quota:
CVMFS_QUOTA_LIMIT=10000 # Cache size in MB (10 GB)
Step 3: Create Mount Point¶
-
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¶
-
Mount the repository using the CVMFS client:
sudo cvmfs2 -o allow_other unpacked.cern.ch /cvmfs/unpacked.cern.ch -
In some cases you might need to run:
sudo mount -t cvmfs unpacked.cern.ch /cvmfs/unpacked.cern.ch
Step 5: Verify the Mount¶
-
Verify that the repository is mounted and accessible:
ls /cvmfs/unpacked.cern.chYou should see the contents of the CVMFS repository.
Step 6: (Optional) Configure Automatic Mounting¶
-
To automatically mount the CVMFS repository at boot time, add an entry to fstab:
sudo vi /etc/fstab -
Add the following line to the file:
cvmfs2 /cvmfs fuse defaults,allow_other 0 0 -
Save and close the file.
Step 7: Restart CVMFS Client (if needed)¶
-
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.