For the CMS open data workshop last year, we experimented with different approaches for cvmfs access, and one of them is to have it installed locally and mounted to a CMS open data docker container. I had that working at the time of the workshop in October, and now I’m trying this again. But now, mounting it as a shared volume to the container fails
$ docker run -it --rm --volume "/cvmfs:/cvmfs:shared" cmsopendata/cmssw_5_3_32 /bin/bash
docker: Error response from daemon: path /cvmfs is mounted on /cvmfs but it is not a shared mount.
If I leave out “shared”, the volume is not properly mounted
$ docker run -it --rm --volume "/cvmfs:/cvmfs" cmsopendata/cmssw_5_3_32 /bin/bash
Setting up CMSSW_5_3_32
CMSSW should now be available.
[21:56:07] cmsusr@f4b60152e633 ~/CMSSW_5_3_32/src $ ls /cvmfs
[21:56:18] cmsusr@f4b60152e633 ~/CMSSW_5_3_32/src $
Is there something that has changed, i.e was it installed differently earlier, or is this something totally unrelated? The container image is the same as I used in October and the commands are from my notes at that time so I know that they were working then. The cvmfs install on my laptop has been updated since that time.
If you need more information, I’m happy to provide it. Many thanks for the help!
Best, Kati
PS:
For the sake of completeness, to install, I did the following:
I had exactly this question yesterday. And on mattermost I was told that because of the way docker is working on windows it is not possible to have CVMFS via docker on WSL2. Do I understand your update at the end correctly, that with the separate installation it works via docker container, or do you still have an issue?
Hi, yes, I still have an issue and it does not mount because of “shared”. According to my notes, I had it working on WSL2 using Docker Desktop and Ubuntu linux in October. I would like to track what has changed since then and understand if it is something on the cvmfs installation side (e.g. owner of the local /cvmfs area) or on the docker side. The image I’m using is the same but other updates have surely happened.
Thanks for the answers. I think what both Kati and I are looking at doing is the following. Get the CVMFS image and run it with docker on windows. What I think you are telling us is that we can do that, but we will have to mount the cvmfc of the container to the /cvmfs area by hand. I will play with that tomorrow and report back.
kati@LAPTOP-D2GA3D2E:~$ sudo mount -t cvmfs cms.cern.ch /cvmfs/cms.cern.ch
CernVM-FS: running with credentials 123:130
CernVM-FS: loading Fuse module... done
CernVM-FS: mounted cvmfs on /cvmfs/cms.cern.ch
kati@LAPTOP-D2GA3D2E:~$ cvmfs_config probe
Probing /cvmfs/cms.cern.ch... OK
but the passing the volume as “shared” still does not work and without shared the mounted area in the container is empty (on host it is not). Compared to the automount option, now the cms.cern.ch is visible in the container but still empty.
kati@LAPTOP-D2GA3D2E:~$ docker run -it --rm --volume "/cvmfs:/cvmfs" cmsopendata/cmssw_5_3_32 /bin/bash
Setting up CMSSW_5_3_32
CMSSW should now be available.
[14:29:49] cmsusr@7b52e46708b6 ~/CMSSW_5_3_32/src $ ls /cvmfs/cms.cern.ch
[14:30:07] cmsusr@7b52e46708b6 ~/CMSSW_5_3_32/src $ exit
exit
kati@LAPTOP-D2GA3D2E:~$ docker run -it --rm --volume "/cvmfs:/cvmfs:shared" cmsopendata/cmssw_5_3_32 /bin/bash
docker: Error response from daemon: path /cvmfs is mounted on / but it is not a shared mount.
See 'docker run --help'.
You might be able to map /cvmfs/cms.cern.ch directly, like
docker run -it --rm --volume "/cvmfs/cms.cern.ch:/cvmfs/cms.cern.ch" ...
There is certainly something strange and different on WSL2 than on regular Linux. I’m currently on vacation but back on Tuesday with access to a Windows machine.
Hi,
I’m newbie with cvmfs.
I run CentOS7/CC7 on my win11/wsl machine
I mounted under root
mkdir -p /cvmfs/sw.hsf.org
mount -t cvmfs sw.hsf.org /cvmfs/sw.hsf.org
I managed to get CVMFS working under WSL2 via docker. Instead of mounting into the VM’s own filesystem (which gives the ‘is not a shared mount’ error), I mounted into the system wide /mnt/wsl filesystem. I.E.: