[dm-devel] LVM gives "modprobe" errors on non-modular monolithic Linux kernels

Ivan Zahariev famzah at icdsoft.com
Wed Mar 15 07:21:59 UTC 2017

Hi guys,

Is this more work than simply exporting a "version" in every 
"dm_cache_*" module, in order for it to have a "/sys/module" path entry?

Should I file a bug regarding this?

Best regards.

On 13.3.2017 г. 14:15 ч., Ivan Zahariev wrote:
> Hello,
> Here is an example of the problem:
>    # lvconvert --yes --type cache --cachepolicy smq --cachepool
>    vg0/lv_cache_s188-vp vg0/s188
>    modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could
>    not open moddep file '/lib/modules/4.4.30-grsec/modules.dep.bin'
>       /sbin/modprobe failed: 1
> Strace shows that "lvconvert" calls "modprobe" because it can't find 
> some paths in "/sys/module":
>  * /sys/module/dm_cache_smq
>  * /sys/module/dm_cache_mq
> At the same time, these modules are already in the kernel. Here is a 
> proof:
>    root at sm-srv228:~# zgrep -i cache /proc/config.gz |grep -i dm
> So the real problem is that the modules are compiled in the monolithic 
> kernel but are not seen in "/sys/module". At the same time, even with 
> a monolithic kernel, some modules do have their corresponding 
> directories in "/sys/module", like the "dm_cache" module, for example:
>    root at sm-srv228:~# find /sys/module/dm_cache -type f
>    /sys/module/dm_cache/parameters/cache_copy_throttle
> My naive research concluded that non-modular monolithic Linux kernels 
> export the compiled-in modules in "/sys/module" only if one of the 
> following is true:
>  * the kernel module exports any parameters in the
>    "/sys/module/$module/parameters" directory
>  * or the kernel module has a "version" file 
> "/sys/module/$module/version"
> In a nutshell, please export a "version" of all "dm_cache_*" modules, 
> so that even in monolithic Linux kernels we can have a directory in 
> "/sys/module" for them. This way the LVM2 tools won't give out 
> sporadic "modprobe" errors when ran on monolithic Linux kernels.
> Does all this make sense? Is the patch something trivial which we can 
> backport into our custom 4.4.30 Linux kernel?
> Thanks.
> --Ivan

*Ivan Zahariev*
Head of Linux Engineering and Operations
www.icdsoft.com <http://www.icdsoft.com>

More information about the dm-devel mailing list