[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 295
  • Last Modified:

DRBD help

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.
0
wilsj
Asked:
wilsj
  • 2
  • 2
1 Solution
 
ezatonCommented:
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.
0
 
wilsjAuthor Commented:
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?
0
 
ezatonCommented:
In general, the answer is yes to both questions.
0
 
wilsjAuthor Commented:
ok thanks a lot for your help.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now