Atom feed of this document
  
 

 Configuring DRBD

The Pacemaker based RabbitMQ server requires a DRBD resource from which it mounts the /var/lib/rabbitmq directory. In this example, the DRBD resource is simply named rabbitmq:

rabbitmq DRBD resource configuration (/etc/drbd.d/rabbitmq.res). 

resource rabbitmq {
  device    minor 1;
  disk      "/dev/data/rabbitmq";
  meta-disk internal;
  on node1 {
    address ipv4 10.0.42.100:7701;
  }
  on node2 {
    address ipv4 10.0.42.254:7701;
  }
}

This resource uses an underlying local disk (in DRBD terminology, a backing device) named /dev/data/rabbitmq on both cluster nodes, node1 and node2. Normally, this would be an LVM Logical Volume specifically set aside for this purpose. The DRBD meta-disk is internal, meaning DRBD-specific metadata is being stored at the end of the disk device itself. The device is configured to communicate between IPv4 addresses 10.0.42.100 and 10.0.42.254, using TCP port 7701. Once enabled, it will map to a local DRBD block device with the device minor number 1, that is, /dev/drbd1.

Enabling a DRBD resource is explained in detail in the DRBD User’s Guide. In brief, the proper sequence of commands is this:

drbdadm create-md rabbitmq  1
drbdadm up rabbitmq  2
drbdadm -- --force primary rabbitmq  3

1

Initializes DRBD metadata and writes the initial set of metadata to /dev/data/rabbitmq. Must be completed on both nodes.

2

Creates the /dev/drbd1 device node, attaches the DRBD device to its backing store, and connects the DRBD node to its peer. Must be completed on both nodes.

3

Kicks off the initial device synchronization, and puts the device into the primary (readable and writable) role. See Resource roles (from the DRBD User’s Guide) for a more detailed description of the primary and secondary roles in DRBD. Must be completed on one node only, namely the one where you are about to continue with creating your filesystem.

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page

loading table of contents...