LVM gives "modprobe" errors on non-modular monolithic Linux kernels
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@sm-srv228:~# zgrep -i cache /proc/config.gz |grep -i dm CONFIG_DM_CACHE=y CONFIG_DM_CACHE_MQ=y CONFIG_DM_CACHE_SMQ=y CONFIG_DM_CACHE_CLEANER=y
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@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
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.
--Ivan
Quoted 47 lines · Ivan Zahariev
Hello,
Here is an example of the problem:
# lvconvert --yes --type cache --cachepolicy smq --cachepool vg0/lv_cache_s188-vp vg0/s188modprobe: ERROR:
../libkmod/libkmod.c:557kmod_search_moddep()could not open moddep file '/lib/modules/4.4.30-grsec/modules.dep.bin'
/sbin/modprobefailed: 1Strace shows that "lvconvert" calls "modprobe" because it can't find some paths in "
/sys/module":*
/sys/module/dm_cache_smq
*/sys/module/dm_cache_mqAt the same time, these modules are already in the kernel. Here is a proof:
root@sm-srv228:~# zgrep -i cache /proc/config.gz |grep -i dm CONFIG_DM_CACHE=y CONFIG_DM_CACHE_MQ=y CONFIG_DM_CACHE_SMQ=y CONFIG_DM_CACHE_CLEANER=ySo 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@sm-srv228:~# find /sys/module/dm_cache -type f /sys/module/dm_cache/parameters/cache_copy_throttleMy 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
Signature · 8 lines
*Ivan Zahariev* Head of Linux Engineering and Operations www.icdsoft.com <http://www.icdsoft.com> -- dm-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/dm-devel