[plug] Problems building drbd for an SMP 2.2.16 kernel

Richard Sharpe sharpe at ns.aus.com
Wed Jul 5 12:20:40 WST 2000


At 06:16 PM 7/6/00 +0800, raven wrote:
>Richard Sharpe wrote:
>
>> Hi,
>>
>> I am trying to build drbd for a 2.2.16SMP machine, but am having problems
>> when I try to load the module (drbd.o).
>>
>> It tells me that the module was build for a 2.2.16-3 kernel, while we are
>> running on a 2.2.16-3SMP kernel.
>
>Version defines are at the top of /usr/src/linux/Makefile eg.
>
>VERSION = 2
>PATCHLEVEL = 2
>SUBLEVEL = 16
>EXTRAVERSION = -1

Yes.

>If you want to be able to compile and load a module without rebuilding the
>kernel you need to compile a kernel with:
>
>CONFIG_MODVERSIONS not set
>
>This corresponds to not checking version info for modules.

OK, this is useful info. However, my problem changed today, in that the
version mismatch went away, and now I had a whole lot of undefined symbols,
like vmalloc and kfree, things that are in /proc/ksyms. A careful look
reveals that the RH supplied 2.2.16-3SMP kernel RPM exports versioned
symbols with a prefix of smp.

Doing an 'inmod -P smp drbd' fixed the problem ...

Now to figure out how to have this done vi conf.modules and modprobe and
kmod, and then to replace the mumble performance mumble sucking mumble
rsync with drbd on these two SMP beasties I manage. rsyncing 8GB is not
fun, even over 100Mb/s.

>>
>>
>> This suggests that somewhere there is a version file that contains that
>> magic info incorrectly.
>>
>
>The version file is /usr/include/linux/version.h
>Redhat copy this file to other names when the kernel-*.rpm 's are created
>but I believe that this the file that is used. I could be wrong about this.
>
>Short story is you need to compile a kernel and compile the module against
>that kernel config.
>There should be no need to modify the veraion string if the module is
>compiled against the correct kernel.
>
>But are you sure it is a 2.2 module. I have seen some hint of independent
>module compile and install in the 2.[34] doco?
>
>
>
>

Regards
-------
Richard Sharpe, sharpe at ns.aus.com
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Co-author, SAMS Teach Yourself Samba in 24 Hours
Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course
Author: First Australian 2-day, intensive, hands-on Samba course




More information about the plug mailing list