While mounting Ceph filesystem, got a modprobe not found

I’m in the process of trying to get a Ceph installation working. For the most part, I have it down, but then I hit a roadblock when I tried to mount the cephfs file system. Eventually, I want to do this at boot for my Plex server but I can’t even mount it manually, through fileSystems, or systemd mount.

In all cases, when I try to mount, I get this error:

systemd[1]: Mounting /media...
mount[3174]: sh: line 1: modprobe: command not found
mount[3173]: mount error 22 = Invalid argument
mount[3173]: failed to load ceph kernel module (127)
systemd[1]: media.mount: Mount process exited, code=exited, status=32/n/a
systemd[1]: media.mount: Failed with result 'exit-code'.
systemd[1]: Failed to mount /media.

Looking up the code, I found this discussion which talks about how modprobe is hard-coded to not have a path but the PATH has been wiped out because of the setuid mount program which means it can’t mount it at all.

I do have the Ceph modules loaded already in the system.

> lsmod | grep ceph
ceph                  499712  0
libceph               471040  1 ceph
netfs                  49152  1 ceph
libcrc32c              16384  1 libceph
fscache               389120  1 ceph

I’m not really sure how to move forward with this. I tried a number of ways of trying to override that package to try getting in ${kmod}/bin/modprobe, but kept getting an infinite recursion so I suspect that is a poor understanding of Nix.

The various Ceph commands are working fine, so I suspect it is currently hung up on that modprobe.

If it helps, I’m working with a flake-based setup using colmena to deploy. Everything else is pretty stable.

Any help or suggestions would be greatly appreciated. My children are harassing me about not having their Plex running. :smiley:

Thank you.

It can’t find the modprobe command in PATH. You can either expand PATH to contain the directory if the SUID wrapper but I am not sure if ceph has even permissions to run that. You could also remove the modprobe command entirely or add a modprobe dummy command which always returns true.

Would you be so kind as to give me hints (or show me) of how to do this? I’ve tried a few times and nothing is working.

Hosted by Flying Circus.