DRBD help

Posted on 2007-07-21
Last Modified: 2013-12-06
Hi all,

 I have a few questions about DRBD. All of this is on Centos5 with DRBD 8

My current set up consists of 3 servers we will call them server1, server2 and server3.

Server1 and Server2 are going to be mirrored using DRBD and also be exporting my gnbd block devices(Server1 primary and Server2 secondary). I have created 3 partitions one for the metadata for DRBD and 2 others for xen domU's on both Server1 and Server2. I set up a vip address for Server1 and Server2 to use incase of failover.

Server3 will be importing the gnbd block devices for my xen domU's. In the event of a server outage the idea is for Server3 never to be disconnected from the gnbd block devices unless of course the whole site goes down. So basically if Server1 goes down then Server2 will pickup.

My confusion with DRBD:
If I have the partition i.e /dev/VolGroup02/test (7g partition) on Server1 and Server2 assigned to /dev/drbd0 where do I install my xen domU's? Do I export test as a gnbd device and install my domU? Or do I install it on /dev/drbd0?

When I create a drbd mirror with the test partition and do mkfs.ext3 everything syncs I can then export the device using gnbd and mount it, create a file and see that file when I make server1 secondary and bring up server2 as primary.

But if I install my xen domU on this gnbd device I cannot do that anymore drbd no longer recognizes the file system anymore and doesn't mirror the data real time I have to tell drbd that one of them is out of sync. And then it will sync them up. Should I be installing it this way? Should I install the xen domU first and then put drbd on it? I a little lost as to what I'm missing.

I'm hoping someone can point me in the right direction.
Question by:wilsj
    LVL 7

    Accepted Solution

    The answer is /dev/drdb0
    You should act as if /dev/drdb0 is your block device ("think" of it as your /dev/sda device), and everything should be done above it.

    DRDB should be agnostic to the contents of the partition. It is supposed to work as your virtual disk as well.
    LVL 5

    Author Comment

    Ok, so do I export /dev/drbd0 through gnbd?

    Also what if I already have information on a partition should I create a new partition and just copy the information over after drbd is setup?
    LVL 7

    Expert Comment

    In general, the answer is yes to both questions.
    LVL 5

    Author Comment

    ok thanks a lot for your help.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
    Having issues meeting security compliance criteria because of those pesky USB drives? Then I can help you! This article will explain how to disable USB Mass Storage devices in Windows Server 2008 R2.
    This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
    This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now