DRBD Kernel module

How do I see a list of the modules that is included in the Kernel? When I do a modprobe -l I get nothing.

I am looking for the DRBD module. This module is included in the stock Ubuntu Hardy Kernel, so maybe it is in the latest Linode.

If not is it possible to compile using the source here http://linode.com/src/ and insert at boot?

Regards Bjorn

8 Replies

If your Linode is running under UML, you are provided with a monolithic kernel and you cannot install kernel modules. The config files showing what was built-in were in the pastebin but they seem to have been aged out.

If your Linode is running under Xen, you again get a monolithic kernel but you can insert kernel modules. You will need to make sure that they were built against the same library versions as the Linode kernel you are using or build them yourself using the correct libraries (not necessarily the ones in your distro).

@pclissold:

The config files showing what was built-in were in the pastebin but they seem to have been aged out.
I think /proc/config.gz should have the config for the currently running kernel in either UML or Xen. At least it is present on the two kernels I have running on linodes.

Thanks. I am running XEN. I got some good help on the IRC channel by avongauss.

Turns out I need to compile the module and insert it a boot. One problem is I need to use same GCC version as the original Kernel was compiled with and that is hard to find. Probably other issues but this is the critical path for now.

@pclissold:

If your Linode is running under UML, you are provided with a monolithic kernel and you cannot install kernel modules. The config files showing what was built-in were in the pastebin but they seem to have been aged out.

If your Linode is running under Xen, you again get a monolithic kernel but you can insert kernel modules. You will need to make sure that they were built against the same library versions as the Linode kernel you are using or build them yourself using the correct libraries (not necessarily the ones in your distro).

Any update on how you went with this bstadil? Or anyone else?

DRBD looks like the best option for async HA between linodes. Things like rsync/rdiff-backup get messy for failback.

Cheers

I managed to install and load the DRBD module on one of my Linodes like this (I'm using Gentoo):

The linode is Xen with a 2.6.18.8-linode10 kernel so I got the http://linode.com/src/2.6.18.8-linode10.tar.bz2 sources.

Once you've unpacked it in /usr/src and symlinked linux -> 2.6.18.8-linode10 then:

cd /usr/src/linux
cp /proc/config.gz .
gunzip config.gz
mv config .config
make

Once that's done you should have a compiled version of the kernel you are running.

Then you can do a:

emerge --nodeps drbd-kernel drbd

(I did nodeps because the drbd-kernel package tries to pull in gentoo-sources, which is unnecessary)

To load the drbd module I had to force it:

modprobe -f drbd

Not using force resulted in the following error because I have gcc-4.1 and the original linode kernel is compiled with 4.0:

drbd: version magic '2.6.18.8-linode10 SMP mod_unload Xen PENTIUM4 REGPARM gcc-4.1' should be '2.6.18.8-linode10 SMP mod_unload Xen PENTIUM4 REGPARM gcc-4.0'

Forcing the module load worked, I'm just doing the same on my second linode now and I'll post an update once I have it working on them both.

HTH!

Did you have to do anything extra to have the module load automatically on reboot?

In Debian you add the module name to the file /etc/modules to get it to load at boot. I'm guessing this is done for you in gentoo when you emerge like this:

emerge --nodeps drbd-kernel drbd

If you need to use the -f option to load the module, then add this to line as well. Apparently this can look either like this:

-f drbd

or like this

drdb force=1

See this other thread for a less gentoo-ified version of this set of instructions for building your own modules.

Note that it is not necessary to compile the whole kernel. You only need the module(s) in question, so make modules make modules_install covers it. This will save you a lot of time.

Thank you for posting detailed instructions here.

I need DRBD to run, however, I would really prefer to use CentOS rather than Gentoo.

I need to use DRBD's Dual-primary mode, which provides concurrent access to data across nodes. But this mode requires a shared cluster file system with a distributed lock manager. GFS (Red Hat Global File System) is my preferred file system for this purpose.

Would anyone be kind enough to point me in the right direction?

Please keep us updated of your progress.

Thank you!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct