Enabling your resource for the first time

After you have completed initial resource configuration as outlined in the previous sections, you can bring up your resource.


Each of the following steps must be completed on both nodes.

  1. Create device metadata. This step must be completed only on initial device creation. It initializes DRBD's metadata:

    drbdadm create-md resource
    v08 Magic number not found
    Writing meta data...
    initialising activity log
    NOT initialized bitmap
    New drbd meta data block sucessfully created.

  2. Attach to backing device. This step associates the DRBD resource with its backing device:

    drbdadm attach resource

  3. Set synchronization parameters. This step sets synchronization parameters for the DRBD resource:

    drbdadm syncer resource

  4. Connect to peer. This step connects the DRBD resource with its counterpart on the peer node:

    drbdadm connect resource


    You may collapse the steps drbdadm attach, drbdadm syncer, and drbdadm connect into one, by using the shorthand command drbdadm up.

  5. Observe /proc/drbdDRBD's virtual status file in the /proc filesystem, /proc/drbd, should now contain information similar to the following:

    cat /proc/drbd
    version: 8.3.0 (api:88/proto:86-89)
    GIT-hash: 9ba8b93e24d842f0dd3fb1f9b90e8348ddb95829 build by buildsystem@linbit, 2008-12-18 16:02:26
     1: cs:Connected ro:Secondary/Secondary ds:Inconsistent/Inconsistent C r---
        ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:200768

    The Inconsistent/Inconsistent disk state is expected at this point.

By now, DRBD has successfully allocated both disk and network resources and is ready for operation. What it does not know yet is which of your nodes should be used as the source of the initial device synchronization.