Thanks for all your error reports, I didn't forget it. I'll cleanup my guide soon. Thanks again!

DRDB cheat-sheet

# Create resource
    drbdadm create-md r0
# Attach resource
    drbdadm attach r0
# Connect resource
    drbdadm connect r0
# Set sync speed in MB
    drbdsetup /dev/drbd1 syncer -r 5M
# Initialize/re-synchronize
    drbdadm -- --overwrite-data-of-peer primary r0
# Bring resource up
    drbdadm up r0
# Bring resource down
    drbdadm down r0
# Get status
    cat /proc/drbd

/etc/drbd.d/global_common.conf

/etc/drbd.d/global_common.conf
    global {
      usage-count no;
    }
    common {
      protocol C;
    }

/etc/drbd.d/r0.res

resource r0 {
    device    /dev/drbd1;
    disk      /dev/vdb1;
    meta-disk internal;
    net {
        allow-two-primaries;
    }
    startup {
        become-primary-on both;
    }
    on vbox3 {
        address   10.1.1.1:7789;
    }
    on vbox3clone {
        address   10.1.1.2:7789;
    }
}

Discussion

Navigation

Learn Linux The Hard Way