Linode.com Forum Forum Index Linode.com Forum
Linode Community Forums
 


DRBD Kernel module

Click here to go to the original topic

 
       Linode.com Forum Forum Index -> Linux Networking
Author Message
bstadil



Joined: 14 Jul 2008
Posts: 5

Posted: Sun Jul 20, 2008 12:03 am    Post subject: 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
Back to top  
pclissold



Joined: 24 Oct 2003
Posts: 470
Location: Netherlands

Posted: Sun Jul 20, 2008 6:07 pm    Post subject:  

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).
Back to top  
Stever



Joined: 07 Dec 2007
Posts: 41
Location: NC, USA

Posted: Sun Jul 20, 2008 9:19 pm    Post subject:  

pclissold wrote: 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.
Back to top  
bstadil



Joined: 14 Jul 2008
Posts: 5

Posted: Sun Jul 20, 2008 9:51 pm    Post subject:  

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 wrote: 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).
Back to top  
fundlebot



Joined: 19 Aug 2008
Posts: 4
Location: Melbourne, AU

Posted: Tue Aug 19, 2008 10:16 pm    Post subject: drbd  

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
Back to top  
theboywho



Joined: 20 Aug 2008
Posts: 1

Posted: Wed Aug 20, 2008 2:07 pm    Post subject:  

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:

Code: 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:

Code: 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:

Code: 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:

Code: 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!
Back to top  
jimcooncat



Joined: 06 Dec 2005
Posts: 8

Posted: Tue Sep 02, 2008 8:22 am    Post subject: Looking forward to update.  

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



Joined: 14 Apr 2007
Posts: 20

Posted: Wed Sep 03, 2008 3:52 pm    Post subject:  

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:
Code: 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:
Code: -f drbd
or like this
Code: 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 Code: make modules
make modules_install covers it. This will save you a lot of time.
Back to top  
joeaston



Joined: 02 Sep 2008
Posts: 1

Posted: Tue Sep 09, 2008 5:25 am    Post subject: Awesome!  

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!
Back to top  
 
       Linode.com Forum Forum Index -> Linux Networking
Page 1 of 1