Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Philipp Reisner schrieb:
> On Thursday 29 October 2009 14:30:34 Dimitrij Hilt wrote:
>
>> Lars Ellenberg schrieb:
>>
>>> On Mon, Oct 19, 2009 at 02:43:52PM +0200, Robert Dahlem wrote:
>>>
>>>> On 19.10.2009 11:51, Lars Ellenberg wrote:
>>>>
>>>>>>> I'm trying to install DRBD 0.8.3.4 on top of Linux 2.6.31.3.
>>>>>>> When trying to start DRBD I get an Oops:
>>>>>>>
>>>>> Did it even occur to you that you could also try the "usual"
>>>>> out-of tree module build?
>>>>>
>>>> Sorry, but no, that didn't occur to me. I used the kernel-patch method
>>>> since 0.7 and always preferred it, because there are two drawbacks with
>>>> the "usual" method:
>>>>
>>>> 1.) If you prepare your system for a new kernel version you need to
>>>> remember a special depmod command to prevent ending up with "modprobe:
>>>> FATAL: Module drbd not found" after a reboot:
>>>>
>>>> depmod -ae `cat /usr/src/linux/include/config/kernel.release`
>>>>
>>>> That was not needed with the kernel-patch method.
>>>>
>>>> 2.) If you have a running system and recompile/reinstall your kernel,
>>>> after "make modules_install" the drbd module is gone. You always need to
>>>> remember to change to the drbd directory and do "make install" again.
>>>>
>>> So you alwasy roll your own kernel. Ok.
>>>
>>> I think "most" use a distro kernel, and most distros solve those
>>> problems with package management, dependencies and trigger scripts,
>>> maybe a system like dkms and possibly a lazy depmod during boot.
>>>
>> Same problem here with Debian, Kernel 2.6.30-bpo.1-amd64 from
>> backports.org and DRBD-8.3.5. DRBD was build as modules source an
>> compiled as Module for this kernel. Server was running 8.3.0 a long time
>> without any problems. After update if drbd starts we get anytime a
>> kernel Oops:
>>
>
> Please see here:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552439
>
> The issue is, that DRBD has to work on a high number of distribution kernels,
> and all these kernels differ in various ways. You can configure the compile
> process in drbd_config.h. Actually we deliver a script
> (scripts/adjust_drbd_config_h.sh) which looks at the kernel source on your
> machine and sets all those little defines in drbd_config.h in a way that
> the compilation process works.
>
> Unfortunately, the way the debian packaging works, they never call that
> script. For many years no user became aware of that fact, because the
> drbd_config.h we ship is the way it should be for the vanilla upstream
> kernel. Debian's distribution kernels are usually much closer to the
> vanilla kernel than the kernels of the other distributions are.
>
> But now, there is a setting in drbd_config.h (KERNEL_HAS_CN_SKB_PARMS)
> that does not break the compilation process, you only get a warning,
> but later on the module will OOPS!
>
> Your way out:
> Unpack the plain .tar.gz distribution from oss.linbit.com and simply
> call make in there. Either use the drbd/drbd.ko from that build,
> or copy the correcter drbd_config.h over to your debian packaging
> stuff... and redo the module assistant thing...
>
> Also following the user's guild way to produce a .deb should produce
> a correct module:
>
> http://www.drbd.org/users-guide/s-build-deb.html
>
> To my knowledge, only the vanilla debian packaging is broken.
>
Does not works for me:
make[1]: Entering directory `/usr/local/src/DRBD/8.3.5/drbd-8.3/drbd'
Calling toplevel makefile of kernel source tree, which I believe is in
KDIR=/usr/src/linux-headers-2.6.30-bpo.1-amd64
test -f ../scripts/adjust_drbd_config_h.sh && \
KDIR=/usr/src/linux-headers-2.6.30-bpo.1-amd64 O= /bin/bash
../scripts/adjust_drbd_config_h.sh
/usr/src/linux-headers-2.6.30-bpo.1-amd64
/usr/local/src/DRBD/8.3.5/drbd-8.3/drbd
ls: cannot access
/usr/src/linux-headers-2.6.30-bpo.1-amd64/include/linux/gfp.h: No such
file or directory
ls: cannot access
/usr/src/linux-headers-2.6.30-bpo.1-amd64/include/linux/types.h: No such
file or directory
ls: cannot access
/usr/src/linux-headers-2.6.30-bpo.1-amd64/include/linux/slab.h: No such
file or directory
ls: cannot access
/usr/src/linux-headers-2.6.30-bpo.1-amd64/include/linux/net.h: No such
file or directory
Sorry, automagic adjustment of drbd_config.h failed.
For well known 2.6. kernels, no adjustment to the shipped
drbd_config is necessary.
You need to verify it yourself.
make[1]: [kbuild] Error 2 (ignored)
make -C /usr/src/linux-headers-2.6.30-bpo.1-amd64
SUBDIRS=/usr/local/src/DRBD/8.3.5/drbd-8.3/drbd modules
make[2]: Entering directory `/data/src/linux-headers-2.6.30-bpo.1-amd64'
CC [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_buildtag.o
CC [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_bitmap.o
CC [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_proc.o
CC [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_worker.o
CC [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_receiver.o
CC [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_req.o
CC [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_actlog.o
CC [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/lru_cache.o
CC [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_main.o
CC [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_strings.o
CC [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_nl.o
/usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_nl.c: In function
'drbd_nl_init':
/usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_nl.c:2384: warning: passing
argument 3 of 'cn_add_callback' from incompatible pointer type
CC [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_tracing.o
LD [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd.o
LD [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_trace.o
Building modules, stage 2.
MODPOST 2 modules
CC /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd.mod.o
LD [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd.ko
CC /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_trace.mod.o
LD [M] /usr/local/src/DRBD/8.3.5/drbd-8.3/drbd/drbd_trace.ko
make[2]: Leaving directory `/data/src/linux-headers-2.6.30-bpo.1-amd64'
mv .drbd_kernelrelease.new .drbd_kernelrelease
Memorizing module configuration ... done.
make[1]: Leaving directory `/usr/local/src/DRBD/8.3.5/drbd-8.3/drbd'
Module build was successful.
Any proposal how i can build clean module for backported Kernel?
linux-headers are installed.
Thanks,
Dimitrij