BenV's notes

DRBD 8.4.1 compiling the kernel module

by on Feb.09, 2012, under Software

In an attempt to try out the latest DRBD version (8.4.1 atm) on a new Xen installation, I ran into some issues.
Initially I built the kernel with the included DRBD module, but I soon realized that this version was older than I wanted to play with (the included version was 8.3.11), so I grabbed the source and tried to build it myself.

root@newxen:/usr/src# wget -q http://oss.linbit.com/drbd/8.4/drbd-8.4.1.tar.gz
root@newxen:/usr/src# tar zxf drbd-8.4.1.tar.gz
root@newxen:/usr/src# cd drbd-8.4.1
root@newxen:/usr/src/drbd-8.4.1# ./configure --with-xen --with-utils --with-km
# bunch of non-problematic output
root@newxen:/usr/src/drbd-8.4.1# make
# didn't look like problems here either
root@newxen:/usr/src/drbd-8.4.1# make install
# yadieyada
root@newxen:/usr/src/drbd-8.4.1# modprobe drbd
FATAL: Error inserting drbd (/lib/modules/3.2.0-rc1-BenV/updates/drbd.ko): Unknown symbol in module, or unknown parameter (see dmesg)
root@newxen:/usr/src/drbd-8.4.1# dmesg | tail
[3012165.078242] drbd: Unknown symbol crc32c (err 0)

Huh… guess I didn’t enable the crc32c module. So I go to my kernel source, make menuconfig -> Library routines -> put CRC32 on ‘m’, save the config, make modules, make modules_install.
There, that should fix it. I load the ‘crc32c’ module, and modprobe the drbd module.
Same error. Huh.
Trying to recompile the drbd module to see if I missed something I notice:

WARNING: "crc32c" [/usr/src/drbd-8.4.1/drbd/drbd.ko] undefined!

Mhrm, I should have noticed that before.
Funny thing is, DRBD does not specify any depends:

root@newxen:/usr/src# modinfo -F depends

root@newxen:/usr/src#

After dicking around for a while I read some threads on crc32c and libcrc32c and not having their dependencies in order when included from yadiada…

… waaait a minute!
LIBcrc32c?
Retry! Kernel source, make menuconfig -> Library routines -> ” CRC32c (Castagnoli, et al) Cyclic Redundancy-Check” on ‘m’, save the config, make modules, make modules_install.
No warnings. Recompiling and reinstalling drbd-8.4.1: no crc32c warning.
Finally:

root@newxen:/usr/src/drbd-8.4.1# modprobe drbd
root@newxen:/usr/src/drbd-8.4.1# cat /proc/drbd
version: 8.4.1 (api:1/proto:86-100)
GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by root@newxen.localdomain, 2012-02-09 11:25:34

Time to play 🙂




:, , , ,

Leave a Reply

You must be logged in to post a comment.

Archives

  • 2018 (1)
  • 2016 (1)
  • 2015 (7)
  • 2014 (4)
  • 2013 (11)
  • 2012 (27)
  • 2011 (26)
  • 2010 (25)
  • 2009 (68)