Configuring the DRBD Service

[Note]Note

The following procedure uses the server names node 1 and node 2, and the cluster resource name r0. It sets up node 1 as the primary node. Make sure to modify the instructions to use your own node and file names.

  1. Log in as the root user or equivalent on each node.

  2. Open the /etc/drbd.conf file on the primary node (node1) in a text editor, modify the following parameters in the on hostname {} sections, then save the file.

    • hostname

    • device

    • disk

    • address

    • meta-disk

    All of these options are explained in the examples in the /usr/share/doc/packages/drbd/drbd.conf file and in the man page of drbd.conf(5).

  3. Copy the /etc/drbd.conf file to the /etc/drbd.conf location on the secondary server (node 2).

    scp /etc/drbd.conf <node 2> /etc
    
  4. Initialize and start the drbd service on both systems by entering the following on each node:

    rcdrbd start
    
  5. Configure node1 as the primary node by entering the following on node1:

    drbdsetup /dev/drbd0 primary --do-what-I-say
    
    [Note]Note

    The --do-what-i-say option has been renamed to --overwrite-data-of-peer in the recent versions of DRBD.

  6. Check the DRBD service status by entering the following on each node:

    rcdrbd status
    

    Before proceeding, wait until the block devices on both nodes are fully synchronized. Repeat the rcdrbd status command to follow the synchronization progress.

  7. After the block devices on both nodes are fully synchronized, format the DRBD device on the primary with a file system such as reiserfs. Any Linux file system can be used. For example, enter

    mkfs.reiserfs -f /dev/drbd0 
    
    [Important]Important

    Always use the /dev/drbd<n> name in the command, not the actual /dev/disk device name.


SUSE® Linux Enterprise Server Storage Administration Guide 10