[DRBD-user] newbie question about DRBD

Nate Seif seifn at rstechnicalservices.com
Thu Nov 29 05:21:37 CET 2007

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


En:
If you are compiling the DRBD module (and NOT patching the kernel), then 
you need only compile the module. You should not need to recompile your 
kernel.

If you've extracted the DRBD tarball in /usr/src then you should be able 
to successfully compile the DRBD module by following the steps on the 
wiki.linux-ha.org page.

I'm assuming you've booted the kernel you want to run DRBD with and that 
uname -a shows the kernel version you will be running DRBD with.

# cd /usr/src
# tar -xvf <location_of_your_DRBD_tarball>
# cd <new_DRBD_folder>/drbd
# make clean all
# cd /usr/src/<new_DRBD_folder>
# make install

At this point DRBD module should be compiled. Now start running your DRBD 
module:
# modprobe drbd

Run
# lsmod
to see that the DRBD module is loaded.

If the module hasn't loaded, then check dmesg and your logs for diagnostic 
information.

And of course, make sure you edit your /etc/modules.autoload.d/kernel... 
file to load the module at boot as necessary.

Backup your data before testing DRBD too...

Nate




On Wed, 28 Nov 2007, En Zhu wrote:

> Hello Nate,
>
> Thank you very much.  I did read the URL today.  I
> tried to follow it and I did "make all".  Both "make
> module" and "make tools" were successful.  I did see
> /usr/src/drbd-8.2.1/drbd/drbd.ko was built
> successfully.  Since I'm new to Linux kernel build
> also, I'm really not sure what else I need to do to
> install the drbd module to kernel, so I did "make
> install", I assume it should take care updating kernel
> and it reported successful also.  I didn't do "patch
> DRBD to kernel" since I saw it's an alternative to
> "make all", so I assume I don't need to do it.
>
> Could you let me know if I missed any step?  Thank you
> very much.
>
>
> En
>
> --- Nate Seif <seifn at rstechnicalservices.com> wrote:
>
>> It sounds like you have not properly compiled DRBD
>> or configured your OS
>> for DRBD...
>>
>> Have a peek at:
>> http://wiki.linux-ha.org/DRBD/HowTo/Install
>>
>> Did you compile DRBD using the "patch kernel" or
>> "kernel module" method?
>>
>> If you patched the kernel, did you reboot with the
>> patched kernel? If you
>> compiled the module, did you load the module before
>> trying to start DRBD?
>> (running "# modprobe drbd" ?)
>>
>> Nate
>>
>>
>> On Wed, 28 Nov 2007, En Zhu wrote:
>>
>>> Hello!
>>>
>>> I'm very new to DRBD.  I have spent more than one
>> day
>>> try to install DRBD on my Fedora 7 system with no
>>> luck.  My problem now is when I try to start DRBD
>> with
>>> "/etc/init.d/drbd start", I got:
>>> Starting DRBD resources:    Can not load the drbd
>>> module.
>>>
>>> I'm using a Fedora 7 system.  I downloaded DRBD
>> 8.2.1
>>> source code from linbit.com.  I unzipped it at
>>> /usr/src.  I was able to do "make all" and "make
>>> install" without problem.  Then I modified
>>> /etc/drbd.conf:
>>> resource drbd-resource-0 {
>>>  protocol C;
>>>  handlers {
>>>    pri-on-incon-degr "echo o > /proc/sysrq-trigger
>> ;
>>> halt -f";
>>>  }
>>>  disk {
>>>    on-io-error panic;
>>>  }
>>>  syncer {
>>>    rate 10M; # Note: 'M' is MegaBytes, not
>> MegaBits
>>>  }
>>>  on tiger {
>>>    device    /dev/drbd0;
>>>    disk      /dev/sda10;
>>>    address   192.168.0.77:7789;
>>>    meta-disk  internal;
>>>  }
>>>  on dual {
>>>    device    /dev/drbd0;
>>>    disk      /dev/sda9;
>>>    address   192.168.0.90:7789;
>>>    meta-disk  internal;
>>>  }
>>> }
>>> I'm not sure if there is anything else I should do
>>> now.  It looks I should be able to start drbd
>> server
>>> base on this tutorial:
>>> http://www.linux-ha.org/DRBD/HowTo/Install
>>> However, when I tried to start it, I got the
>> error:
>>> Starting DRBD resources:    Can not load the drbd
>>> module.
>>>
>>> I'm really clueless now.  Could you give me some
>> hints
>>> what I should do to fix the problem?
>>>
>>> Thank you very much!
>>>
>>> En
>>> _______________________________________________
>>> drbd-user mailing list
>>> drbd-user at lists.linbit.com
>>> http://lists.linbit.com/mailman/listinfo/drbd-user
>>>
>>
>
>



More information about the drbd-user mailing list