14.1.1.2. Installing and Configuring DRBD

To install DRBD you can choose either the pre-built binary installation packages or you can use the source packages and build from source. If you want to build from source you must have installed the source and development packages.

If you are installing using a binary distribution then you must ensure that the kernel version number of the binary package matches your currently active kernel. You can use uname to find out this information:

shell> uname -r
2.6.20-gentoo-r6

Once DRBD has been built and installed, you need to edit the /etc/drbd.conf file and then run a number of commands to build the block device and set up the replication.

Although the steps below are split into those for the primary node and the secondary node, it should be noted that the configuration files for all nodes should be identical, and many of the same steps have to be repeated on each node to enable the DRBD block device.

Building from source:

To download and install from the source code:

  1. Download the source code.

  2. Unpack the package:

    shell> tar zxf drbd-8.3.0.tar.gz
  3. Change to the extracted directory, and then run make to build the DRBD driver:

    shell> cd drbd-8.3.0
    shell> make
  4. Install the kernel driver and commands:

    shell> make install

Binary Installation:

  • SUSE Linux Enterprise Server (SLES)

    For SUSE, use yast:

    shell> yast -i drbd

    Alternatively:

    shell> rug install drbd
    
  • Debian

    Use apt-get to install the modules. You do not need to install any other components.

    shell> apt-get install drbd8-utils drbd8-module
    
  • Debian 3.1 and 4.0

    You must install the module-assistant to build the DRBD kernel module, in addition to the DRBD components.

    shell> apt-get install drbd0.7-utils drbd0.7-module-source \
      build-essential module-assistant
    shell> module-assistant auto-install drbd0.7
    
  • CentOS

    DRBD can be installed using yum:

    shell> yum install drbd kmod-drbd
  • Ubuntu

    You must enable the universe component for your preferred Ubuntu mirror in /etc/apt/sources.list, and then issue these commands:

    shell> apt-get update
    shell> apt-get install drbd8-utils drbd8-module-source \
      build-essential module-assistant
    shell> module-assistant auto-install drbd8
    
  • Gentoo

    You can now emerge DRBD 0.8.x into your Gentoo installation:

    root-shell> emerge drbd

    Once drbd has been downloaded and installed, you need to decompress and copy the default configuration file from /usr/share/doc/drbd-8.0.7/drbd.conf.bz2 into /etc/drbd.conf.

Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout